mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Removing unwanted method and adding to accessor for getter history
This commit is contained in:
parent
423b2626d8
commit
bf31d7b224
1 changed files with 3 additions and 4 deletions
|
@ -5,11 +5,10 @@ class Dog
|
|||
include ActiveModel::Validations
|
||||
include ActiveModel::Validations::Callbacks
|
||||
|
||||
attr_accessor :name
|
||||
attr_writer :history
|
||||
attr_accessor :name, :history
|
||||
|
||||
def history
|
||||
@history ||= []
|
||||
def initialize
|
||||
@history = []
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue