Skip to content

Commit

Permalink
use a ruby method why don't you
Browse files Browse the repository at this point in the history
  • Loading branch information
philmill committed Jun 22, 2011
1 parent 304e5bd commit 54df61c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/sweepers/user_sweeper.rb
Expand Up @@ -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.