Files
nairobi/app/components/admin/budgets_wizard/creation_step_component.rb
Julian Herrero f8d6ba12d7 Add headings step to budget creation
Co-Authored-By: decabeza <alberto@decabeza.es>
2021-06-08 18:45:53 +02:00

23 lines
445 B
Ruby

class Admin::BudgetsWizard::CreationStepComponent < ApplicationComponent
attr_reader :record, :next_step_path
def initialize(record, next_step_path)
@record = record
@next_step_path = next_step_path
end
private
def show_form?
record.errors.any?
end
def i18n_namespace
i18n_namespace_with_budget.gsub("budget_", "")
end
def i18n_namespace_with_budget
record.class.table_name
end
end