lib/ahoy_matey.rb in ahoy_matey-0.1.7 vs lib/ahoy_matey.rb in ahoy_matey-0.1.8
- old
+ new
@@ -38,10 +38,10 @@
end
end
mattr_accessor :user_method
self.user_method = proc do |controller|
- (controller.respond_to?(:current_user) && controller.current_user) || (controller.respond_to?(:current_resource_owner, true) and controller.send(:current_resource_owner))
+ (controller.respond_to?(:current_user) && controller.current_user) || (controller.respond_to?(:current_resource_owner, true) && controller.send(:current_resource_owner)) || nil
end
end
ActionController::Base.send :include, Ahoy::Controller