Skip to content

Commit

Permalink
No need to use table name in by_star_field, as ActiveRecord will put …
Browse files Browse the repository at this point in the history
…this in automatically if it's needed
  • Loading branch information
radar committed Feb 20, 2012
1 parent 2ec7548 commit 9e76095
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/by_star.rb
Expand Up @@ -14,7 +14,7 @@ module ByStar

def by_star_field(field=nil)
@by_star_field ||= field
@by_star_field || "#{self.table_name}.created_at"
@by_star_field || "created_at"
end

include ByDirection
Expand Down

0 comments on commit 9e76095

Please sign in to comment.