lib/drafting/base_class_methods.rb in drafting-0.3.1 vs lib/drafting/base_class_methods.rb in drafting-0.4.0
- old
+ new
@@ -13,14 +13,14 @@
raise ArgumentError unless parent_class
unless parent_class.method_defined? :drafts
parent_class.class_eval do
def drafts(user)
- Draft.where(:user => user, :parent => self)
+ Draft.where(user: user, parent: self)
end
def self.child_drafts(user)
- Draft.where(:user => user, :parent_type => self.base_class.name)
+ Draft.where(user: user, parent_type: self.base_class.name)
end
end
end
self.draft_parent = options[:parent]