Sha256: 13c03b828032458e05aaf9027c513b77be3d7f388bc621d43d8c1ef4ca8a4862

Contents?: true

Size: 569 Bytes

Versions: 8

Compression:

Stored size: 569 Bytes

Contents

class Person < ActiveRecord::Base

  has_custom_attributes :telephone => :string, :email => :string do |fields|
    fields.telephone :work, :private, :mobile, :fax
    fields.email :work, :private
    fields.date :born_on, :wed_on, :died_on, :on_model => [ :born_on ]
  end

end

class Product < ActiveRecord::Base

  has_custom_attributes :url => :string

  has_custom_attributes :size => :float do |fields|
    fields.size :width, :height, :depth
    fields.url :details, :on_model => { :details => :details_url }
  end

end

class Location < ActiveRecord::Base

end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
custom-attributes-0.2.17 spec/models.rb
custom-attributes-0.2.16 spec/models.rb
custom-attributes-0.2.15 spec/models.rb
custom-attributes-0.2.12 spec/models.rb
custom-attributes-0.2.5 spec/models.rb
custom-attributes-0.2.4 spec/models.rb
custom-attributes-0.2.3 spec/models.rb
custom-attributes-0.2.2 spec/models.rb