Skip to content

Commit

Permalink
Fix false plurazation of child in event fee
Browse files Browse the repository at this point in the history
  • Loading branch information
felunka committed Mar 14, 2024
1 parent 4a93f1d commit c0aaa7c
Show file tree
Hide file tree
Showing 8 changed files with 16 additions and 11 deletions.
2 changes: 1 addition & 1 deletion app/controllers/events_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ def permit(params)
:deadline_signup,
:fee_member,
:fee_student,
:fee_childen,
:fee_child,
:fee_guest,
:fee_member_single_room,
:fee_guest_single_room,
Expand Down
2 changes: 1 addition & 1 deletion app/views/events/_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

= f.input :fee_member, as: :currency
= f.input :fee_student, as: :currency
= f.input :fee_childen, as: :currency
= f.input :fee_child, as: :currency
= f.input :fee_guest, as: :currency

= f.input :fee_member_single_room, as: :currency
Expand Down
4 changes: 2 additions & 2 deletions app/views/events/show.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
.fw-bold=number_to_currency(@event.fee_student)
= Event.human_attribute_name(:fee_student)
.col
.fw-bold=number_to_currency(@event.fee_childen)
= Event.human_attribute_name(:fee_childen)
.fw-bold=number_to_currency(@event.fee_child)
= Event.human_attribute_name(:fee_child)
.col
.fw-bold=number_to_currency(@event.fee_guest)
= Event.human_attribute_name(:fee_guest)
Expand Down
4 changes: 2 additions & 2 deletions app/views/registrations/_event_info.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
.fw-bold=number_to_currency(event.fee_student)
= Event.human_attribute_name(:fee_student)
.col
.fw-bold=number_to_currency(event.fee_childen)
= Event.human_attribute_name(:fee_childen)
.fw-bold=number_to_currency(event.fee_child)
= Event.human_attribute_name(:fee_child)
.col
.fw-bold=number_to_currency(event.fee_guest)
= Event.human_attribute_name(:fee_guest)
Expand Down
4 changes: 2 additions & 2 deletions app/views/registrations/_invitation_page.pdf.haml
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@
.fw-bold=number_to_currency(@event.fee_student)
= Event.human_attribute_name(:fee_student)
.col
.fw-bold=number_to_currency(@event.fee_childen)
= Event.human_attribute_name(:fee_childen)
.fw-bold=number_to_currency(@event.fee_child)
= Event.human_attribute_name(:fee_child)
.col
.fw-bold=number_to_currency(@event.fee_guest)
= Event.human_attribute_name(:fee_guest)
Expand Down
2 changes: 1 addition & 1 deletion config/locales/models/de.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ de:
base_fee_guest: 'Basispreis (ohne Hotel) für Gäste'
fee_member: 'Basispreis für Mitglieder'
fee_student: 'Studierende und Auszubildende (Mitglieder)'
fee_childen: 'Kinder (unter 18 Jahre, Mitglieder)'
fee_child: 'Kinder (unter 18 Jahre, Mitglieder)'
fee_guest: 'Gäste und Nichtmitglieder'
fee_member_single_room: 'Einzelzimmerzuschlag Mitglieder'
fee_guest_single_room: 'Einzelzimmerzuschlag Gäste'
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class RenameFeeChildrenToFeeChildInEvents < ActiveRecord::Migration[7.0]
def change
rename_column :events, :fee_childen, :fee_child
end
end
4 changes: 2 additions & 2 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema[7.0].define(version: 2023_05_21_171247) do
ActiveRecord::Schema[7.0].define(version: 2024_03_14_191425) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"

Expand All @@ -23,7 +23,7 @@
t.date "deadline_signup"
t.decimal "fee_member", precision: 10, scale: 2, default: "0.0"
t.decimal "fee_student", precision: 10, scale: 2, default: "0.0"
t.decimal "fee_childen", precision: 10, scale: 2, default: "0.0"
t.decimal "fee_child", precision: 10, scale: 2, default: "0.0"
t.decimal "fee_guest", precision: 10, scale: 2, default: "0.0"
t.decimal "fee_member_single_room", precision: 10, scale: 2, default: "0.0"
t.decimal "fee_guest_single_room", precision: 10, scale: 2, default: "0.0"
Expand Down

0 comments on commit c0aaa7c

Please sign in to comment.