Module: AdminAssistant::FormViewMethods

Included in:
FormView, MultiFormView
Defined in:
lib/admin_assistant/form_view.rb

Instance Method Summary collapse

Instance Method Details

#actionObject



3
4
5
6
7
8
9
# File 'lib/admin_assistant/form_view.rb', line 3

def action
  if %w(new create).include?(controller.action_name)
    'create'
  else
    'update'
  end
end

#controllerObject



11
12
13
# File 'lib/admin_assistant/form_view.rb', line 11

def controller
  @action_view.controller
end