Module: MegaBar::FieldsHelper
- Defined in:
- app/helpers/mega_bar/fields_helper.rb
Instance Method Summary collapse
Instance Method Details
#pre_render ⇒ Object
3 4 5 6 7 8 9 10 11 |
# File 'app/helpers/mega_bar/fields_helper.rb', line 3 def pre_render if params[:action] == 'edit' # these are for some virtual attributes. @index_field_display = FieldDisplay.by_fields(@model.id).by_action('index').present? ? 'y':'' @show_field_display = FieldDisplay.by_fields(@model.id).by_action('show').present? ? 'y':'' @new_field_display = FieldDisplay.by_fields(@model.id).by_action('new').present? ? 'y':'' @edit_field_display = FieldDisplay.by_fields(@model.id).by_action('edit').present? ? 'y':'' end end |