Permalink
Browse files

respond_to? return false if current_user method is private. added tru…

…e as second parameter
  • Loading branch information...
stricte authored and jnunemaker committed Mar 28, 2010
1 parent f4a73e3 commit 74eca664d6031d96ecce03994889d869cf84479b
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/user_stamp.rb
View
@@ -41,8 +41,8 @@ def before_validation(record)
private
def current_user
- if controller.respond_to?(UserStamp.current_user_method)
+ if controller.respond_to?(UserStamp.current_user_method, true)
controller.send UserStamp.current_user_method
end
end
-end
+end

0 comments on commit 74eca66

Please sign in to comment.