Do not expect a controller to exist when looking up action
This commit is contained in:
parent
68856acc82
commit
d5ae9a66a0
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue