Class: Author
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Author
- Extended by:
- ActiveModel::Naming
- Defined in:
- lib/acts_as_versioned/test/fixtures/page.rb,
lib/prototype_legacy_helper/test/test_prototype_helper.rb
Direct Known Subclasses
Defined Under Namespace
Classes: Nested
Instance Attribute Summary collapse
-
#id ⇒ Object
readonly
Returns the value of attribute id.
Instance Method Summary collapse
Instance Attribute Details
#id ⇒ Object (readonly)
Returns the value of attribute id.
20 21 22 |
# File 'lib/prototype_legacy_helper/test/test_prototype_helper.rb', line 20 def id @id end |
Instance Method Details
#name ⇒ Object
23 24 25 |
# File 'lib/prototype_legacy_helper/test/test_prototype_helper.rb', line 23 def name @id.nil? ? 'new author' : "author ##{@id}" end |
#new_record? ⇒ Boolean
22 |
# File 'lib/prototype_legacy_helper/test/test_prototype_helper.rb', line 22 def new_record?; @id.nil? end |
#save ⇒ Object
21 |
# File 'lib/prototype_legacy_helper/test/test_prototype_helper.rb', line 21 def save; @id = 1 end |