class Article

Attributes

author_id[R]
id[R]

Public Instance Methods

name() click to toggle source
# File test/template/prototype_helper_test.rb, line 31
def name
  @id.nil? ? 'new article' : "article ##{@id}"
end
new_record?() click to toggle source
# File test/template/prototype_helper_test.rb, line 30
def new_record?; @id.nil? end
save() click to toggle source
# File test/template/prototype_helper_test.rb, line 29
def save; @id = 1; @author_id = 1 end
to_key() click to toggle source
# File test/template/prototype_helper_test.rb, line 28
def to_key() id ? [id] : nil end