25 May '12, 3am

こんなメソッドあったのか…… / “stub_chain (Spec::Mocks::Methods) - APIdock”

Supports stubbing a chain of methods. Each argument represents a method name to stub, and each one returns a proxy object that can accept more stubs, until the last, which returns whatever is passed to +and_return_.

Full article: http://apidock.com/rspec/Spec/Mocks/Methods/stub_chain

Tweets

to_json (ActiveRecord::Serialization) - APIdock...

apidock.com 25 May '12, 10am

ActiveRecord::Base.include_root_in_json controls the top-level behavior of to_json . In a new Rails application, it is set...