diff options
author | Mike Gehard <mike.gehard@gmail.com> | 2011-09-09 15:48:43 -0600 |
---|---|---|
committer | Mike Gehard <mike.gehard@gmail.com> | 2011-09-09 15:48:43 -0600 |
commit | 6c43532cb6b649417cf1a3661d9255d9212f162a (patch) | |
tree | bca1177cdbc95de5bbe6b65bf48e050ad95b679d /actionpack/test/lib | |
parent | 06e400eef2672a918f357a3294ba679bf5c5a933 (diff) | |
download | rails-6c43532cb6b649417cf1a3661d9255d9212f162a.tar.gz rails-6c43532cb6b649417cf1a3661d9255d9212f162a.tar.bz2 rails-6c43532cb6b649417cf1a3661d9255d9212f162a.zip |
Silence Ruby warnings about uninitialized instance variable.
Diffstat (limited to 'actionpack/test/lib')
-rw-r--r-- | actionpack/test/lib/controller/fake_models.rb | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/actionpack/test/lib/controller/fake_models.rb b/actionpack/test/lib/controller/fake_models.rb index cbef74f992..363403092b 100644 --- a/actionpack/test/lib/controller/fake_models.rb +++ b/actionpack/test/lib/controller/fake_models.rb @@ -48,26 +48,19 @@ module Quiz end end -class Post < Struct.new(:title, :author_name, :body, :secret, :written_on, :cost) +class Post < Struct.new(:title, :author_name, :body, :secret, :persisted, :written_on, :cost) extend ActiveModel::Naming include ActiveModel::Conversion extend ActiveModel::Translation alias_method :secret?, :secret + alias_method :persisted?, :persisted def initialize(*args) super @persisted = false end - def persisted=(boolean) - @persisted = boolean - end - - def persisted? - @persisted - end - attr_accessor :author def author_attributes=(attributes); end |