lib/kentouzu/has_drafts.rb in kentouzu-0.1.0 vs lib/kentouzu/has_drafts.rb in kentouzu-0.1.1

- old
+ new

@@ -37,10 +37,10 @@ class_attribute :drafts_association_name self.drafts_association_name = options[:drafts] || :drafts if ActiveRecord::VERSION::STRING.to_f >= 4.0 # `has_many` syntax for specifying order uses a lambda in Rails 4 has_many self.drafts_association_name, - lambda { order("#{Kentouzu.timestamp_field} ASC, #{self.draft_class_name.constantize.primary_key} ASC") }, + lambda { order("#{Kentouzu.timestamp_field} ASC, #{self.primary_key} ASC") }, :class_name => draft_class_name, :as => :item, :dependent => :destroy else has_many self.drafts_association_name,