Skip to content

Commit

Permalink
Merge pull request concerto#906 from concerto/pluginInfo
Browse files Browse the repository at this point in the history
Error if no controller hooks are specified in plugin
  • Loading branch information
augustf committed Mar 30, 2014
2 parents eab4c31 + ea7062e commit 3391bff
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/concerto/plugin_info.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,8 +99,10 @@ def add_view_hook(controller_name, hook_sym, options={})
# Returns an array of hashes specifying all of the requested
# hooks into the given controller.
def get_controller_hooks(controller_name)
return @controller_hooks.select do |h|
h[:controller_name] == controller_name
if @controller_hooks
return @controller_hooks.select do |h|
h[:controller_name] == controller_name
end
end
end

Expand Down

0 comments on commit 3391bff

Please sign in to comment.