Skip to content

Commit

Permalink
updating define_attribute_methods documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
Francesco Rodriguez committed May 14, 2012
1 parent 05234b3 commit 00c94d7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion activemodel/README.rdoc
Expand Up @@ -41,7 +41,7 @@ behavior out of the box:
include ActiveModel::AttributeMethods

attribute_method_prefix 'clear_'
define_attribute_methods [:name, :age]
define_attribute_methods :name, :age

attr_accessor :name, :age

Expand Down
2 changes: 1 addition & 1 deletion activemodel/lib/active_model/dirty.rb
Expand Up @@ -30,7 +30,7 @@ module ActiveModel
#
# include ActiveModel::Dirty
#
# define_attribute_methods [:name]
# define_attribute_methods :name
#
# def name
# @name
Expand Down
2 changes: 1 addition & 1 deletion activemodel/test/cases/dirty_test.rb
Expand Up @@ -3,7 +3,7 @@
class DirtyTest < ActiveModel::TestCase
class DirtyModel
include ActiveModel::Dirty
define_attribute_methods [:name, :color]
define_attribute_methods :name, :color

def initialize
@name = nil
Expand Down
4 changes: 2 additions & 2 deletions guides/source/active_model_basics.textile
Expand Up @@ -20,7 +20,7 @@ class Person

attribute_method_prefix 'reset_'
attribute_method_suffix '_highest?'
define_attribute_methods ['age']
define_attribute_methods 'age'

attr_accessor :age

Expand Down Expand Up @@ -99,7 +99,7 @@ require 'active_model'

class Person
include ActiveModel::Dirty
define_attribute_methods [:first_name, :last_name]
define_attribute_methods :first_name, :last_name

def first_name
@first_name
Expand Down

0 comments on commit 00c94d7

Please sign in to comment.