Permalink
Browse files

Silence Ruby warnings about uninitialized instance variable.

  • Loading branch information...
1 parent 06e400e commit 6c43532cb6b649417cf1a3661d9255d9212f162a @mikegehard mikegehard committed Sep 9, 2011
Showing with 2 additions and 9 deletions.
  1. +2 −9 actionpack/test/lib/controller/fake_models.rb
@@ -48,26 +48,19 @@ class Store < Question
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

0 comments on commit 6c43532

Please sign in to comment.