25 May '12, 10am

to_json (ActiveRecord::Serialization) - APIdock #jquery

ActiveRecord::Base.include_root_in_json controls the top-level behavior of to_json . In a new Rails application, it is set to true in initializers/new_rails_defaults.rb. When it is true, to_json will emit a single root node named after the object’s type. For example:

Full article: http://apidock.com/rails/ActiveRecord/Serialization/to_json

Tweets

Wondering if there's something higher-level tha...

apidock.com 28 May '12, 5pm

Welcome Register Projects Help About Blog APIdock release: IRON STEVE (1.4) If you have any comments, ideas or feedback, f...

こんなメソッドあったのか…… / “stub_chain (Spec::Mocks::Meth...

apidock.com 25 May '12, 3am

Supports stubbing a chain of methods. Each argument represents a method name to stub, and each one returns a proxy object ...