mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-01-17 06:52:27 +01:00
[bug] create a plan does not set its name
This commit is contained in:
parent
9b3375e7dd
commit
f75633e64e
@ -7,6 +7,7 @@
|
||||
- Fix a bug: invoices with total = 0, are marked as paid on site even if paid by card
|
||||
- Fix a bug: after disabling a group, its associated plans are hidden from the interface
|
||||
- Fix a bug: in case of unexpected server error during stripe payment process, the confirm button is not unlocked
|
||||
- Fix a bug: create a plan does not set its name
|
||||
- [TODO DEPLOY] `rake db:migrate`
|
||||
- [TODO DEPLOY] -> (only dev) yarn install
|
||||
- [TODO DEPLOY] add `RECAPTCHA_SITE_KEY` and `RECAPTCHA_SECRET_KEY` environment variables (see [doc/environment.md](doc/environment.md) for configuration details)
|
||||
|
@ -19,6 +19,7 @@ class Plan < ActiveRecord::Base
|
||||
after_create :create_machines_prices
|
||||
after_create :create_spaces_prices
|
||||
after_create :create_statistic_type
|
||||
after_create :set_name
|
||||
|
||||
|
||||
validates :amount, :group, :base_name, presence: true
|
||||
@ -109,4 +110,8 @@ class Plan < ActiveRecord::Base
|
||||
'Possible causes: the type or the subtype were not created successfully.'
|
||||
end
|
||||
end
|
||||
|
||||
def set_name
|
||||
update_columns(name: human_readable_name)
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user