Do not expect a controller to exist when looking up action

This commit is contained in:
Jason Webster 2013-05-01 15:31:53 -07:00 committed by Vasiliy Ermolovich
parent 68856acc82
commit d5ae9a66a0
1 changed files with 1 additions and 1 deletions

View File

@ -456,7 +456,7 @@ module SimpleForm
# The action to be used in lookup.
def lookup_action
@lookup_action ||= begin
action = template.controller.action_name
action = template.controller && template.controller.action_name
return unless action
action = action.to_sym
ACTIONS[action] || action