Commit 23a9a168 by Ivan Lan

Add paste_xxx_ids

parent 691deee5
......@@ -145,6 +145,10 @@ module ActsAsPasting
self.paste_#{downcase}_list = ary
end
def paste_#{downcase}_ids
pastings.where(type: "#{type_value}", pasteable_type: #{klass}.base_class.name).pluck(:pasteable_id)
end
def paste_#{downcase}_list= ary, run_save: true
ary = self.class.parsed_condition_ary(ary).select { |a|
a.first == "#{base_class_name}"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment