aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2011-09-14 00:27:45 -0700
committerSantiago Pastorino <santiago@wyeworks.com>2011-09-14 00:27:45 -0700
commit5f28c2272237850d70e16938087294f55353b66f (patch)
treea9e5b2e711ffa3242d7389444c181153f668df8b /actionpack/test
parent410b0ec1b712ce34f0fafb6505876d21e8007db7 (diff)
parent6c43532cb6b649417cf1a3661d9255d9212f162a (diff)
downloadrails-5f28c2272237850d70e16938087294f55353b66f.tar.gz
rails-5f28c2272237850d70e16938087294f55353b66f.tar.bz2
rails-5f28c2272237850d70e16938087294f55353b66f.zip
Merge pull request #2964 from msgehard/silence_warnings
Silence Ruby warnings about uninitialized instance variable.
Diffstat (limited to 'actionpack/test')
-rw-r--r--actionpack/test/lib/controller/fake_models.rb11
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