Class: Joey::Photo
Instance Attribute Summary
Attributes inherited from Model
Instance Method Summary collapse
- #valid? ⇒ Boolean
-
#validate ⇒ Object
has_association :comments, “Comment”.
Methods inherited from Model
define_properties, find, has_association, hash_populating_accessor, #initialize, recognize?
Constructor Details
This class inherits a constructor from Joey::Model
Instance Method Details
#valid? ⇒ Boolean
16 17 18 19 |
# File 'lib/joey/photo.rb', line 16 def valid? self.validate self.errors.empty? end |
#validate ⇒ Object
has_association :comments, “Comment”
12 13 14 |
# File 'lib/joey/photo.rb', line 12 def validate valid = true end |