lib/by_star.rb in by_star-0.7.1 vs lib/by_star.rb in by_star-0.7.2
- old
+ new
@@ -10,9 +10,15 @@
module ByStar
def self.included(base)
base.extend ClassMethods
base.send(:include, InstanceMethods)
+ base.class_eval do
+ def self.by_star_field(value=nil)
+ @by_star_field ||= value
+ @by_star_field || "#{self.table_name}.created_at"
+ end
+ end
end
module ClassMethods
include RangeCalculations
include Shared