Changed the title of the 3.5 chapter from "Using the change Method" to
"When to Use the change Method" since the chapter tells the migration
definitions supported by the change method. This fix the duplicate ID in the
document.
I've also changed some of the titles to respect the Guides guidelines.
In chapter 2.4 there was an underscore at the start of the attr_readonly method name,
this underscore was interpreted as the opening of the <em> tag but it wasn't closed.
Worst, the underscore in self.class.serialized_attributes (end of paragraph)
was interpreted as the closing of the <em> tag and not as the name of a method.
Method invalid_asset_host! was delegated to controller but sprockets
compile assets in their own scope without controller. And if we set asset_host
with second parameter it should raise error through invalid_asset_host!.
But since controller is nil it cannot be reached.
Option to run `bundle install` after generating new appplication was
added recently to rails. Since introduction, it contained a subtle bug
that caused it to use `Gemfile` from current directory (if it exists)
rather than from generated directory. This also accidentaly caused
railties tests to work without any problems - after generating test app
it just used `Gemfile` from the repository, rather than the one in
generated app. After fixing the bug mentioned above, this of course
broke. The easiest way to bypass that is to not generate a `Gemfile` for
test application - with such setup Bundler will just use first available
`Gemfile` in one of the parent directories.
The cause of the previous revert was bug in bundler that made it hard to
make railties test work. Fix for bundler was recently pushed to github,
so now we can safely get back to the original commit.
This reverts commit 0f5cc34ab58cda99d1401ecc82e1ebb873838dd7.
This is a performance/GC optimisation.
In theory, this could be optimised by the implementation (last time I
checked, this would have no effect on JRuby). But in practise, this make
attribute access faster.
This reverts commit 7256cb53e0c34e510a4d59a50d120c0358cf1d99, reversing
changes made to 6ebe22c3ae716d089af1e5090ddb0d12b31af8ac.
Reason: A test was failing.
The example is about a Person model, say that "params[:model] would usually be a
hash of all the attributes for the person to create" could be confusing.
I changed to params[:person] since the example is about a Person creation.