diff options
author | Steven Spiel <stevenspiel@gmail.com> | 2015-12-26 16:05:45 -0500 |
---|---|---|
committer | Steven Spiel <stevenspiel@gmail.com> | 2016-01-01 19:59:11 -0500 |
commit | c74f9cc0e8b68697e0d1917b876ffdf404ade3fc (patch) | |
tree | 35b99b16e0ba5a42dbe7f24a3cf5dff8f26949a9 /actionview/test/lib | |
parent | c259f54e27ac0fa3735563ccf6b9f3d9b20ad833 (diff) | |
download | rails-c74f9cc0e8b68697e0d1917b876ffdf404ade3fc.tar.gz rails-c74f9cc0e8b68697e0d1917b876ffdf404ade3fc.tar.bz2 rails-c74f9cc0e8b68697e0d1917b876ffdf404ade3fc.zip |
downcase default submit button value's model name
Diffstat (limited to 'actionview/test/lib')
-rw-r--r-- | actionview/test/lib/controller/fake_models.rb | 20 |
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 |