aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record.rb
diff options
context:
space:
mode:
authorIan Ker-Seymer <i.kerseymer@gmail.com>2015-02-23 18:45:46 -0700
committerIan Ker-Seymer <i.kerseymer@gmail.com>2015-02-24 11:00:32 -0700
commitc5d62cb86d958aaa68a4057b3c2578329044e674 (patch)
treebe03541b30100c8b38651decb1813fcd43d8f4b1 /activerecord/lib/active_record.rb
parentf6a31f532167eaffe0709af50c2d2190f2f76219 (diff)
downloadrails-c5d62cb86d958aaa68a4057b3c2578329044e674.tar.gz
rails-c5d62cb86d958aaa68a4057b3c2578329044e674.tar.bz2
rails-c5d62cb86d958aaa68a4057b3c2578329044e674.zip
activemodel: make .model_name json encodable
Previously, calling `User.model_name.to_json` would result in an infinite recursion as `.model_name` inherited its `.as_json` behavior from Object. This patch fixes that unexpected behavior by delegating `.as_json` to :name.
Diffstat (limited to 'activerecord/lib/active_record.rb')
0 files changed, 0 insertions, 0 deletions