Sha256: 4324ae2292523cfcac36e30d350be0649a39d28b52c074e5f1d3ba99f0c9dcfa
Contents?: true
Size: 291 Bytes
Versions: 6
Compression:
Stored size: 291 Bytes
Contents
class Category < ActiveRecord::Base attr_accessible :name, :parent_id has_many :categories, :foreign_key => :parent_id belongs_to :parent, :foreign_key => :parent_id, :class_name => "Category" def self.token_json(items) items.map{|i| {:id => i.id, :name => i.name} } end end
Version data entries
6 entries across 6 versions & 1 rubygems