Created
February 14, 2011 19:49
-
-
Save matheusca/826416 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Addict | |
include Mongoid::Document | |
embeds_many :addict_photos | |
accepts_nested_attributes_for :addict_photos | |
field :date, :type => Date | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class AddictPhoto | |
include Mongoid::Document | |
embedded_in :addict, :inverse_of => :addict_photo | |
mount_uploader :image, AddictUploader | |
field :right, :type => Boolean | |
field :left, :type => Boolean | |
field :up, :type => Boolean | |
field :down, :type => Boolean | |
field :size, :type => Integer | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment