Skip to content

Commit

Permalink
Bugfix: if controller is a symbol camelize will fail
Browse files Browse the repository at this point in the history
  • Loading branch information
vhochstein committed Oct 20, 2010
1 parent 3cf4de7 commit aa49b2c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/components.rb
Expand Up @@ -97,7 +97,7 @@ def component_response(options, reuse_response)
# determine the controller class for the component request
def component_class(options)
if controller = options[:controller]
controller.is_a?(Class) ? controller : "#{controller.camelize}Controller".constantize
controller.is_a?(Class) ? controller : "#{controller.to_s.camelize}Controller".constantize
else
self.class
end
Expand Down

0 comments on commit aa49b2c

Please sign in to comment.