Vijay Dev
592f6004e1
fixed comment in w3c_validator
2010-12-25 01:19:33 +05:30
Vijay Dev
f17e1b2f7f
clean up plugin references
2010-12-25 01:04:10 +05:30
Vijay Dev
caca58e4da
fixed typos and cut down the spaces
2010-12-25 00:56:39 +05:30
Vijay Dev
517b37146a
minor edits
2010-12-25 00:38:03 +05:30
Moiz Raja
e38cacb8ee
correct links to rack articles
2010-12-23 22:51:12 -08:00
Xavier Noria
8cdb758081
Merge branch 'master' of github.com:rails/rails
2010-12-24 01:55:35 +01:00
Xavier Noria
3822673151
Merge branch 'master' of git://github.com/lifo/docrails
2010-12-24 01:55:12 +01:00
Ryan Bigg
d1e95e12b4
Revert "Query guide: arel_table, eq and eq_any" along with other commits that added documentation involving the arel_table method
...
This reverts commit 578f9711fd .
Conflicts:
railties/guides/source/active_record_querying.textile
2010-12-24 10:47:38 +10:00
oleg dashevskii
6974c595fd
Verify that there is no unwanted implicit readonly set on Model.has_many_through.find(id) [ #5442 state:resolved]
2010-12-23 15:19:18 -08:00
Jon Leighton
fb3a8c51b4
Raise an error for associations which try to go :through a polymorphic association [ #6212 state:resolved]
2010-12-23 15:19:18 -08:00
Jon Leighton
1c07b84df9
If a has_many goes :through a belongs_to, and the foreign key of the belongs_to changes, then the has_many should be considered stale.
2010-12-23 15:19:18 -08:00
Jon Leighton
2d9626fc74
Improved strategy for updating a belongs_to association when the foreign key changes. Rather than resetting each affected association when the foreign key changes, we should lazily check for 'staleness' (where fk does not match target id) when the association is accessed.
2010-12-23 15:19:18 -08:00
Jon Leighton
3f17ed407c
Test to verify that #2189 (count with has_many :through and a named_scope) is fixed
2010-12-23 15:19:18 -08:00
Jon Leighton
1619c2435b
Revert "Optimize <association>_ids for hm:t with belongs_to source". The optimisation has too many edge cases, such as when the reflection, source reflection, or through reflection has conditions, orders, etc. [ #6153 state:resolved]
...
This reverts commit 373b053dc8 .
Conflicts:
activerecord/lib/active_record/associations.rb
2010-12-23 15:19:18 -08:00
Jon Leighton
4e13625818
Test demonstrating problem with foo.association_ids where it's a has_many :through with :conditions, with a belongs_to as the source reflection
2010-12-23 15:19:18 -08:00
Jon Leighton
ff7bde62c8
When a has_many association is not :uniq, appending the same record multiple times should append it to the @target multiple times [ #5964 state:resolved]
2010-12-23 15:19:17 -08:00
Michał Łomnicki
030480ac1f
Fix behaviour of foo.has_many_through_association.select('custom select') [ #6089 state:resolved]
2010-12-23 15:19:17 -08:00
Szymon Nowak
85683f2a79
Fix creation of has_many through records with custom primary_key option on belongs_to [ #2990 state:resolved]
2010-12-23 15:19:17 -08:00
Will Bryant
b79823832e
Verify that has_one :through preload respects the :conditions [ #2976 state:resolved]
2010-12-23 15:19:17 -08:00
Jon Leighton
c6db37e69b
Don't allow a has_one association to go :through a collection association [ #2976 state:resolved]
2010-12-23 15:19:17 -08:00
Ryan Bigg
e4314e7d3f
Query guide: visists => visits
2010-12-24 07:23:12 +10:00
Vijay Dev
06e2f7cd17
minor convention edit
2010-12-24 00:34:07 +05:30
Vijay Dev
f1eb69c5b2
fixing typo that crept in 2c8938f
2010-12-24 00:24:26 +05:30
Vijay Dev
5683d6883b
It's JavaScript :)
2010-12-24 00:19:41 +05:30
Vijay Dev
2c8938fcba
fixed inject example and some minor edits
2010-12-24 00:03:51 +05:30
José Valim
d6efd3cfc2
Don't deprecate to_prepare.
2010-12-23 19:21:14 +01:00
José Valim
819b8cae40
Clean up callbacks should also be called on exceptions.
2010-12-23 19:17:02 +01:00
Vijay Dev
bb707cf737
indentation fix
2010-12-23 23:34:28 +05:30
Aaron Patterson
df3cfa6aae
avoid duping and new objects
2010-12-23 07:33:28 -08:00
Raimonds Simanovskis
2b795050de
fixed retrieval of primary key value in Ralation#insert method
...
previously primary key value was always assigned nil which caused Oracle enhanced adapter failing tests
2010-12-23 23:22:00 +08:00
Raimonds Simanovskis
d9c8c47e3d
Fix for default_scope tests to ensure comparing of equally sorted lists
...
This is additional fix for commit
ebc47465a5 Respect the default_scope on a join model when reading a through association
which otherwise was failing on Oracle (as it returned fixture comments in different order).
2010-12-23 23:19:59 +08:00
Rizwan Reza
9dfa06acb4
Edits to caching/fragments.
2010-12-23 16:29:40 +03:30
Rizwan Reza
0997d5a12d
More minor edits.
2010-12-23 16:13:36 +03:30
Rizwan Reza
5fb2f0c07f
Revised documentation for cache_helper.
2010-12-23 16:06:53 +03:30
Ryan Bigg
890105f4f1
Query guide: add or conditions
2010-12-23 22:15:08 +10:00
Ryan Bigg
8713bb6ab8
Query guide: cover further ARel methods
2010-12-23 18:36:39 +10:00
Ryan Bigg
6271f3f16b
Query guide: Document "in" methods
2010-12-23 16:39:10 +10:00
Ryan Bigg
578f9711fd
Query guide: arel_table, eq and eq_any
2010-12-23 16:06:29 +10:00
Ryan Bigg
cef17cd705
Query guide: specify what type of objects scopes return
2010-12-23 15:44:12 +10:00
Ryan Bigg
0795c3a15e
Query guide: Ordering, selecting and so on shouldn't be nested in conditions as they are modifiers, not conditions in the prime sense of the word.
2010-12-23 15:05:17 +10:00
Ryan Bigg
c3748190f4
Query Guide: update Changelog
2010-12-23 14:59:22 +10:00
Ryan Bigg
226a2a90ed
Query guide: class methods are still available on associations
2010-12-23 14:58:33 +10:00
Ryan Bigg
0644e38c42
Query guide: scopes with arguments should be instead defined as class methods.
2010-12-23 14:57:53 +10:00
Ryan Bigg
b4b2574a12
Query guide: fix indentation
2010-12-23 14:55:42 +10:00
Ryan Bigg
f411451ed5
Remove comma [samuelkadoph]
2010-12-23 14:53:26 +10:00
Ryan Bigg
28b1642561
Query guide: lambdas must be used when working with scopes
2010-12-23 14:50:40 +10:00
Ryan Bigg
5b19579ab3
Init guide: further revision, covering rails/plugin.rb and friends
2010-12-23 14:36:24 +10:00
Ryan Bigg
f183668ff9
Querying guide: Add mention of the scope method
2010-12-23 14:36:24 +10:00
Aaron Patterson
c7f81f14df
arel can escape the id, so avoid using the database connection
2010-12-22 19:20:08 -08:00
Aaron Patterson
83ffb82fb9
Arel::Table#[] always returns an attribute, so no need for ||
2010-12-22 19:17:44 -08:00