Refactor Budget::PHASES constant to Budget::Phase::PHASE_KINDS
This commit is contained in:
@@ -54,7 +54,7 @@ class Admin::BudgetsController < Admin::BaseController
|
||||
private
|
||||
|
||||
def budget_params
|
||||
descriptions = Budget::PHASES.map{|p| "description_#{p}"}.map(&:to_sym)
|
||||
descriptions = Budget::Phase::PHASE_KINDS.map{|p| "description_#{p}"}.map(&:to_sym)
|
||||
valid_attributes = [:name, :phase, :currency_symbol] + descriptions
|
||||
params.require(:budget).permit(*valid_attributes)
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user