aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/test/lib/controller/fake_models.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionview/test/lib/controller/fake_models.rb')
-rw-r--r--actionview/test/lib/controller/fake_models.rb20
1 files changed, 20 insertions, 0 deletions
diff --git a/actionview/test/lib/controller/fake_models.rb b/actionview/test/lib/controller/fake_models.rb
index 65c68fc34a..a3e7e4d980 100644
--- a/actionview/test/lib/controller/fake_models.rb
+++ b/actionview/test/lib/controller/fake_models.rb
@@ -31,6 +31,26 @@ end
class GoodCustomer < Customer
end
+class TicketType < Struct.new(:name)
+ extend ActiveModel::Naming
+ include ActiveModel::Conversion
+ extend ActiveModel::Translation
+
+ def initialize(*args)
+ super
+ end
+
+ def persisted=(boolean)
+ @persisted = boolean
+ end
+
+ def persisted?
+ @persisted
+ end
+
+ attr_accessor :name
+end
+
class Post < Struct.new(:title, :author_name, :body, :secret, :persisted, :written_on, :cost)
extend ActiveModel::Naming
include ActiveModel::Conversion