Sha256: 3ff48d619a2ece815693a5f8117ad3b4217f25a23a119b3a0c74beb27b9a5310
Contents?: true
Size: 345 Bytes
Versions: 6
Compression:
Stored size: 345 Bytes
Contents
class Product < ActiveRecord::Base attr_accessible :name, :category_ids has_many :product_has_categories has_many :categories, :through => :product_has_categories alias_method :category_ids_old=, :category_ids= def category_ids=(ids) ids = ids.split(",").map(&:to_i) if ids.is_a?(String) self.category_ids_old=ids end end
Version data entries
6 entries across 6 versions & 1 rubygems