class Author

Attributes

id[R]

Public Instance Methods

name() click to toggle source
# File test/template/prototype_helper_test.rb, line 18
def name
  @id.nil? ? 'new author' : "author ##{@id}"
end
new_record?() click to toggle source
# File test/template/prototype_helper_test.rb, line 17
def new_record?; @id.nil? end
save() click to toggle source
# File test/template/prototype_helper_test.rb, line 16
def save; @id = 1 end
to_key() click to toggle source
# File test/template/prototype_helper_test.rb, line 15
def to_key() id ? [id] : nil end