Module: DataDisplay::Helpers
- Includes:
- Actions
- Defined in:
- lib/data_display/helpers.rb
Constant Summary collapse
- LARGE_ACTIONS =
[:edit, :new, :show, :delete, :update, :create]
- SHORT_ACTIONS =
[:index]
- ACTIONS =
LARGE_ACTIONS + SHORT_ACTIONS
Instance Method Summary collapse
Methods included from Actions
Instance Method Details
#current_action ⇒ Object
21 22 23 |
# File 'lib/data_display/helpers.rb', line 21 def current_action params[:action] end |
#display_short? ⇒ Boolean
13 14 15 |
# File 'lib/data_display/helpers.rb', line 13 def display_short? ACTIONS.include?(current_action) and SHORT_ACTIONS.include?(current_action) or params_id? end |
#params_id? ⇒ Boolean
17 18 19 |
# File 'lib/data_display/helpers.rb', line 17 def params_id? params[:id].present? end |