Commit Graph

26393 Commits

Author SHA1 Message Date
Vijay Dev
69341d3686 copy edits in the migrations guide 2011-12-04 16:29:11 +05:30
Jason Noble
95213ac477 Be explicit about where to add/remove stuff to the migration 2011-12-03 19:31:45 -07:00
Jason Noble
b6d7ce9f23 Fix missing /ruby block 2011-12-03 19:31:45 -07:00
Jason Noble
718d0ea985 Be explicit of where the constraints are. 2011-12-03 19:31:45 -07:00
Jason Noble
914b85f124 Improve readability 2011-12-03 19:31:44 -07:00
Jason Noble
452b624e1e Be more friendly than "shut up" 2011-12-03 19:31:44 -07:00
Jason Noble
6589359ed1 A table format makes this section easier to read 2011-12-03 19:31:44 -07:00
Jason Noble
e9b3b9e5d8 This section is more about changing the output of running migrations 2011-12-03 19:31:44 -07:00
Jason Noble
d1ef1b2220 Improve readability 2011-12-03 19:31:44 -07:00
Jason Noble
90f18cc85e Readability improvements 2011-12-03 19:31:44 -07:00
Jason Noble
82ba3a79bf Move this into a section so that "Resetting the database" will show up in TOC 2011-12-03 19:31:44 -07:00
Jason Noble
d8c8bf5f05 Change wording to be more explicit on what migrating with a version does 2011-12-03 19:31:44 -07:00
Jason Noble
93d9845c30 Migrations can also run the "change" method 2011-12-03 19:31:44 -07:00
Jason Noble
4130fe3a5b Reword section to make it more readable. 2011-12-03 19:31:44 -07:00
Jason Noble
f41d099720 We're using methods, not writing them 2011-12-03 19:31:44 -07:00
Jason Noble
aca34b8e51 Change wording to be more understandable 2011-12-03 19:31:44 -07:00
Jason Noble
f7740f20f2 We're using the method, not writing it 2011-12-03 19:31:43 -07:00
Jason Noble
eedb863674 Change The other... to Another... 2011-12-03 19:31:43 -07:00
Jason Noble
74807383aa Reword confusing section 2011-12-03 19:31:43 -07:00
Jason Noble
a41295fdaa Correct grammatical errors 2011-12-03 19:31:43 -07:00
Jason Noble
bc6d1ebc66 It's more that Rails needs to know how to recreate the columns 2011-12-03 19:31:43 -07:00
Jason Noble
ec2727281c Added "also" to read better 2011-12-03 19:31:43 -07:00
Jason Noble
b3f8cbd9a8 Explain the t.timestamps method a little better 2011-12-03 19:31:43 -07:00
Jason Noble
1f765a2f72 Re-word confusing section 2011-12-03 19:31:43 -07:00
Jason Noble
c8f8ecfd38 Rollback is used elsewhere in the tutorial 2011-12-03 19:31:43 -07:00
Jason Noble
78f6672a43 Alphabetize fields to make reading easier 2011-12-03 19:31:43 -07:00
Jason Noble
f9cc3f0d8e Improve wording, fix some formatting issues 2011-12-03 19:31:43 -07:00
Jason Noble
9d87fb8f68 Constrained to 80 chars per line 2011-12-03 19:31:43 -07:00
Ryan Bigg
d7c2fcd856 Update layouts and rendering guide javascript_include_tag to bring it in line with Rails 3.1 2011-12-04 08:49:55 +11:00
Vijay Dev
baa93a1c2e Merge branch 'master' of github.com:lifo/docrails 2011-12-02 23:43:52 +05:30
Vijay Dev
f402ef5766 rephrase doc on explain threshold 2011-12-02 23:41:50 +05:30
Arun Agrawal
3d550e5174 Added doc about pluck for active_support core ext 2011-12-02 23:15:08 +05:30
Xavier Noria
31a3124f05 Merge pull request #3832 from arunagw/indentation
indentation fix warning
2011-12-02 09:29:26 -08:00
Arun Agrawal
9a59475d4a indentation fix warning 2011-12-02 22:55:15 +05:30
Xavier Noria
36cc1f78eb revises some details in the previous explain patch 2011-12-02 09:19:13 -08:00
Jon Leighton
9acb340e88 Revert "Roflscaling!" (for now)
This reverts commit f6b5046305d43c5f64bcb6fed0e44f7bca99a603.

Fear not, the roflscale will return when I have a bit more time and
figure out a better way to do it. (In particular, a way that doesn't
break the build.)
2011-12-02 13:23:31 +00:00
Xavier Noria
0306f82e0c implements automatic EXPLAIN logging for slow queries 2011-12-02 04:35:43 -08:00
David Heinemeier Hansson
4d20de8a50 Added Enumerable#pluck to wrap the common pattern of collect(&:method) *DHH* 2011-12-02 13:00:56 +01:00
José Valim
76a3ec7f6e Try to play nice with plugins doing monkey patches. 2011-12-02 09:57:43 +01:00
Arun Agrawal
9f623e2109 [Docs] Information about ActionDispatch::DebugExceptions in rake task 2011-12-02 08:45:11 +05:30
Arun Agrawal
330db28018 Adding information about ActionDispatch::DebugExceptions 2011-12-02 08:44:32 +05:30
Jon Leighton
6bff6439b1 Fewer string allocations in attribute method 2011-12-01 23:41:51 +00:00
Jon Leighton
f6b5046305 Roflscaling!
Don't prefix the name with attribute_. Avoids a string allocation on
read_attribute, which is a bit faster.
2011-12-01 23:41:51 +00:00
Jon Leighton
9ead4130de Create method with known identifier then alias into place.
This means we never have to rely on define_method (which is slower and
uses more memory), even when we have attributes containing characters
that are not allowed in standard method names.

(I am mainly changing this because the duplication annoys me, though.)
2011-12-01 23:41:51 +00:00
Jon Leighton
bd920eae82 Remove some unnecessary code etc 2011-12-01 23:41:51 +00:00
Jon Leighton
e9fb6d04bd Add test for read_attribute(:id) with non-standard PK.
Also make it actually work.

It slows down all read_attribute accesses to map 'id' to whatever the PK
actually is, inside read_attribute. So instead make sure the necessary
methods are defined and that they redirect wherever they need to go.
2011-12-01 23:41:51 +00:00
Jon Leighton
f1a534af98 Remove the need for type_cast_attribute.
This is good because it reduces duplication.
2011-12-01 23:41:51 +00:00
Jon Leighton
47b97a739d Fix up test altering global state that was causing me grief 2011-12-01 23:41:51 +00:00
Jon Leighton
3a40d38619 Get rid of the underscore versions of attribute methods!
This makes me happy!
2011-12-01 23:41:51 +00:00
Jon Leighton
3dcb127109 Don't rely on underscore-prefixed attribute methods.
Define singleton methods on the attributes module instead. This reduces
method pollution on the actual model classes. It also seems to make
something faster, I am unsure why! O_o
2011-12-01 23:41:51 +00:00