Permalink
Browse files

use a ruby method why don't you

  • Loading branch information...
philmill committed Jun 22, 2011
1 parent 304e5bd commit 54df61cb185208818af8f8ecae9a0473d7cfc68f
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/sweepers/user_sweeper.rb
@@ -17,7 +17,7 @@ def after_destroy(resource)
private
def get_id(resource)
- resource.class.name == 'User' ? resource.id : resource.user_id
+ resource.is_a?(User) ? resource.id : resource.user_id
end
end

0 comments on commit 54df61c

Please sign in to comment.