Module: Admin::FormsHelper

Defined in:
app/helpers/admin/forms_helper.rb

Instance Method Summary collapse

Instance Method Details

#model_fiels_collection(model, field_name) ⇒ Object



2
3
4
# File 'app/helpers/admin/forms_helper.rb', line 2

def model_fiels_collection(model, field_name)
  model.send(field_name.pluralize).keys.map { |field| [I18n.t("activerecord.attributes.#{model.to_s.downcase}.#{field_name.pluralize}.#{field}"), field] }
end