Sha256: 20adec3376b1154623d7e8f43648cea01326356a7e39ef8aab8e481f267dad1c

Contents?: true

Size: 570 Bytes

Versions: 3

Compression:

Stored size: 570 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

3 entries across 3 versions & 1 rubygems

Version Path
custom-attributes-0.2.1 spec/models.rb
custom-attributes-0.2.0 spec/models.rb
custom-attributes-0.1.2 spec/models.rb