Sha256: 9bcd329747a64ede679ff807c08ddfe56ee78f0a89141d19e556ed26057396f3
Contents?: true
Size: 830 Bytes
Versions: 9
Compression:
Stored size: 830 Bytes
Contents
# store items as ids, not names def standardize_item cardish if (id = Card.id cardish) "~#{id}" else Rails.logger.info "no id for '#{cardish}' added to id pointer" nil end end def item_ids args={} item_strings(args).map do |item| item = standardize_item item unless item.match?(/^~/) item.to_s.tr("~", "").to_i end.compact end def item_names args={} item_ids(args).map(&:cardname).compact end def pod_content item_names.join "\n" end def replace_references _old_name, _new_name # noop end # override reference creation so there are no referee_keys # (referee_keys can screw things up for these cards when things get renamed) def create_references_out referee_ids = item_ids return if referee_ids.empty? Reference.mass_insert(referee_ids.map { |rid| [id, rid, "null", "'L'"] }) end
Version data entries
9 entries across 9 versions & 1 rubygems