diff options
author | Akira Matsuda <ronnie@dio.jp> | 2017-01-13 15:09:56 +0900 |
---|---|---|
committer | Akira Matsuda <ronnie@dio.jp> | 2017-01-13 15:13:47 +0900 |
commit | 9360b6be63b7a452535699bcf6ae853df7f5eea7 (patch) | |
tree | d1ad1280439883cf0fb328efe45e09dfa581182f /actionpack/lib/action_controller | |
parent | be5ddc250874e6c7f4d22e34791f5187448ebb0e (diff) | |
download | rails-9360b6be63b7a452535699bcf6ae853df7f5eea7.tar.gz rails-9360b6be63b7a452535699bcf6ae853df7f5eea7.tar.bz2 rails-9360b6be63b7a452535699bcf6ae853df7f5eea7.zip |
class Foo < Struct.new(:x) creates an extra unneeded anonymous class
because Struct.new returns a Class, we just can give it a name and use it directly without inheriting from it
Diffstat (limited to 'actionpack/lib/action_controller')
-rw-r--r-- | actionpack/lib/action_controller/metal/params_wrapper.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/actionpack/lib/action_controller/metal/params_wrapper.rb b/actionpack/lib/action_controller/metal/params_wrapper.rb index 7fc898f034..a08f50143f 100644 --- a/actionpack/lib/action_controller/metal/params_wrapper.rb +++ b/actionpack/lib/action_controller/metal/params_wrapper.rb @@ -73,7 +73,7 @@ module ActionController require "mutex_m" - class Options < Struct.new(:name, :format, :include, :exclude, :klass, :model) # :nodoc: + Options = Struct.new(:name, :format, :include, :exclude, :klass, :model) do # :nodoc: include Mutex_m def self.from_hash(hash) |