module Rexport::ExportItemMethods

Public Instance Methods

attributes_for_copy() click to toggle source
# File lib/rexport/export_item_methods.rb, line 28
def attributes_for_copy
  attributes.slice("position", "name", "rexport_field")
end

Private Instance Methods

generate_name_from_rexport_field() click to toggle source
# File lib/rexport/export_item_methods.rb, line 38
def generate_name_from_rexport_field
  rexport_field.split(".").last(2).map(&:titleize).join(" - ")
end
replace_blank_name_with_rexport_field() click to toggle source
# File lib/rexport/export_item_methods.rb, line 34
def replace_blank_name_with_rexport_field
  self.name = generate_name_from_rexport_field if name.blank?
end