diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-02-24 15:04:20 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-02-24 15:04:20 -0300 |
commit | a0580e974b4a058a983de6c593e4573bd94b76f0 (patch) | |
tree | 105bfad4927ca04e4bbac93f1fb7cd98f4807135 /activemodel/lib/active_model/naming.rb | |
parent | efc6d49114f3cf140d2349876eb5a9ea8ff3383c (diff) | |
parent | c5d62cb86d958aaa68a4057b3c2578329044e674 (diff) | |
download | rails-a0580e974b4a058a983de6c593e4573bd94b76f0.tar.gz rails-a0580e974b4a058a983de6c593e4573bd94b76f0.tar.bz2 rails-a0580e974b4a058a983de6c593e4573bd94b76f0.zip |
Merge pull request #19055 from ianks/model_name.to_json
activemodel: make .model_name json encodable
Diffstat (limited to 'activemodel/lib/active_model/naming.rb')
-rw-r--r-- | activemodel/lib/active_model/naming.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activemodel/lib/active_model/naming.rb b/activemodel/lib/active_model/naming.rb index 2bc3eeaa19..22010b517c 100644 --- a/activemodel/lib/active_model/naming.rb +++ b/activemodel/lib/active_model/naming.rb @@ -130,7 +130,7 @@ module ActiveModel # # Equivalent to +to_s+. delegate :==, :===, :<=>, :=~, :"!~", :eql?, :to_s, - :to_str, to: :name + :to_str, :as_json, to: :name # Returns a new ActiveModel::Name instance. By default, the +namespace+ # and +name+ option will take the namespace and name of the given class |