Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | Refactor && simplify count_records. | Emilio Tagua | 2010-11-23 | 1 | -5/+1 | |
| | ||||||
* | Remove explicit return and avoid creating local var. | Emilio Tagua | 2010-11-24 | 1 | -2/+1 | |
| | ||||||
* | Remove explicit return. | Emilio Tagua | 2010-11-24 | 1 | -1/+1 | |
| | ||||||
* | Refactoring: replace the mix of variables like @finder_sql, @counter_sql, ↵ | Jon Leighton | 2010-10-30 | 1 | -32/+24 | |
| | | | | etc with just a single scope hash (created on initialization of the proxy). This is now used consistently across all associations. Therefore, all you have to do to ensure finding/counting etc is done correctly is implement the scope correctly. | |||||
* | Deletes trailing whitespaces (over text files only find * -type f -exec sed ↵ | Santiago Pastorino | 2010-08-14 | 1 | -4/+4 | |
| | | | | 's/[ \t]*$//' -i {} \;) | |||||
* | removing references to arel constants | Aaron Patterson | 2010-08-13 | 1 | -1/+1 | |
| | ||||||
* | avoiding symbol to proc again | Aaron Patterson | 2010-08-13 | 1 | -1/+1 | |
| | ||||||
* | standarizes the use of the article "an" for "SQL" and "SQLite" | Xavier Noria | 2010-08-05 | 1 | -1/+1 | |
| | ||||||
* | splitting a really long line into multiple lines which is easy on eyes | Neeraj Singh | 2010-06-29 | 1 | -1/+5 | |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | |||||
* | Adds title to activerecord/lib/active_record/associations/* | Rizwan Reza | 2010-06-16 | 1 | -0/+1 | |
| | ||||||
* | clean up more warnings, remove unnecessary methods, fix eval line numbers. ↵ | Aaron Patterson | 2010-03-16 | 1 | -0/+4 | |
| | | | | | | [#4193 state:resolved] Signed-off-by: wycats <wycats@gmail.com> | |||||
* | save(false) is gone, use save(:validate => false) instead. | José Valim | 2010-01-17 | 1 | -1/+1 | |
| | ||||||
* | Use Arel::Table instead of ActiveRecord::Relation from HABTM and ↵ | Pratik Naik | 2010-01-01 | 1 | -1/+1 | |
| | | | | has_many#delete_records | |||||
* | Rename Model.conditions and relation.conditions to .where | Pratik Naik | 2009-12-26 | 1 | -1/+1 | |
| | ||||||
* | Revert "Split arel_table into method to get a relation and another to ↵ | Jeremy Kemper | 2009-11-13 | 1 | -1/+1 | |
| | | | | | | memoize the default relation." This reverts commit bd51790895fc75a3b4e19e8dd7aa6dc389d77068. | |||||
* | Split arel_table into method to get a relation and another to memoize the ↵ | Jeremy Kemper | 2009-11-13 | 1 | -1/+1 | |
| | | | | default relation. | |||||
* | Arel::In -> Arel::Predicates::In | Jeremy Kemper | 2009-11-02 | 1 | -1/+1 | |
| | ||||||
* | has_many nullify associations keys using ARel. | Emilio Tagua | 2009-08-18 | 1 | -9/+9 | |
| | ||||||
* | Fix that counter_cache breaks with has_many :dependent => :nullify. | Gabe da Silveira | 2009-08-09 | 1 | -0/+1 | |
| | | | | | | [#1196 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | |||||
* | Revert "Revert "Generate proper :counter_sql from :finder_sql when there is ↵ | Pratik Naik | 2009-07-01 | 1 | -9/+1 | |
| | | | | | | | | | a newline character immediately following 'SELECT' [#2118 state:resolved]"" This reverts commit 80f1f863cd0f9cba89079511282de5710a2e1832. The feature doesn't work on Postgres, so don't test it on Postgres. Also, Postgres compatibility is irrelevant to the ticket/patch in question. | |||||
* | Revert "Generate proper :counter_sql from :finder_sql when there is a ↵ | Yehuda Katz + Carl Lerche | 2009-06-22 | 1 | -1/+9 | |
| | | | | | | | | newline character immediately following 'SELECT' [#2118 state:resolved]" This reverts commit 4851ca9e13a4317342df02ae25b1929340523f7a. The tests do not pass for postgresql. | |||||
* | Generate proper :counter_sql from :finder_sql when there is a newline ↵ | Patrick Joyce | 2009-06-21 | 1 | -9/+1 | |
| | | | | | | character immediately following 'SELECT' [#2118 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | |||||
* | Providing support for :inverse_of as an option to associations. | Murray Steele | 2009-05-04 | 1 | -0/+5 | |
| | | | | | | | | | | | | | | | | | | | | | | You can now add an :inverse_of option to has_one, has_many and belongs_to associations. This is best described with an example: class Man < ActiveRecord::Base has_one :face, :inverse_of => :man end class Face < ActiveRecord::Base belongs_to :man, :inverse_of => :face end m = Man.first f = m.face Without :inverse_of m and f.man would be different instances of the same object (f.man being pulled from the database again). With these new :inverse_of options m and f.man are the same in memory instance. Currently :inverse_of supports has_one and has_many (but not the :through variants) associations. It also supplies inverse support for belongs_to associations where the inverse is a has_one and it's not a polymorphic. Signed-off-by: Murray Steele <muz@h-lame.com> Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | |||||
* | Fixed that autosave should validate associations even if master is invalid ↵ | David Heinemeier Hansson | 2009-02-27 | 1 | -2/+2 | |
| | | | | [#1930 status:committed] | |||||
* | Merge with docrails. Also add a rake task to generate guides in your rails ↵ | Pratik Naik | 2008-10-21 | 1 | -0/+1 | |
| | | | | | | | | application : rake doc:guides The rake task will generate guides inside doc/guides directory of your application. Open index.html to browse. | |||||
* | Update the documentation to reflect the change handling :group earlier | Michael Koziarski | 2008-09-16 | 1 | -1/+4 | |
| | ||||||
* | Merge docrails | Pratik Naik | 2008-09-03 | 1 | -0/+14 | |
| | ||||||
* | Refactored AssociationCollection#count for uniformity and Ruby 1.8.7 support. | Ernie Miller | 2008-08-28 | 1 | -26/+0 | |
| | | | | | | [#831 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | |||||
* | Implement count limit/offset support for has_many associations | Tarmo Tänav | 2008-08-27 | 1 | -1/+10 | |
| | | | | | | [#348 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | |||||
* | Fix has_many#count_records. [#865 state:resolved] | Xavier Noria | 2008-08-21 | 1 | -2/+5 | |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | |||||
* | Remove some Symbol#to_proc usage in runtime code. [#484 state:resolved] | Cheah Chu Yeow | 2008-07-09 | 1 | -2/+2 | |
| | ||||||
* | Add has_many :primary_key option to allow setting the primary key on a has ↵ | Andre Arko | 2008-07-06 | 1 | -0/+8 | |
| | | | | | | many association Signed-off-by: Michael Koziarski <michael@koziarski.com> | |||||
* | Extract owner_quoted_id so it can be overridden. [#292 state:committed] | Andre Arko | 2008-06-25 | 1 | -3/+3 | |
| | ||||||
* | fix eager loading with dynamic finders | Brandon Keepers | 2008-06-09 | 1 | -1/+1 | |
| | ||||||
* | Ensure AssociationCollection#count works with empty condition. [#271 ↵ | Pratik Naik | 2008-05-29 | 1 | -1/+1 | |
| | | | | state:resolved] [Jan De Poorter] | |||||
* | Remove duplicate code from associations. [Pratik] | Pratik Naik | 2008-04-06 | 1 | -41/+0 | |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9231 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | |||||
* | Refactor HasManyThroughAssociation to inherit from HasManyAssociation. ↵ | Pratik Naik | 2008-04-06 | 1 | -8/+0 | |
| | | | | | | Association callbacks and <association>_ids= now work with hm:t. Closes #11516 [rubyruy] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9230 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | |||||
* | Ensure HABTM#create and HABTM#build do not load entire association. [Pratik] | Pratik Naik | 2008-04-05 | 1 | -19/+0 | |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9229 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | |||||
* | Merge the has_finder gem, renamed as 'named_scope'. Closes #11404 [nkallen] | Rick Olson | 2008-03-24 | 1 | -1/+4 | |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | |||||
* | More thoroughly quote table names. Exposes some issues with sqlite2 adapter. ↵ | Jeremy Kemper | 2008-01-05 | 1 | -3/+3 | |
| | | | | | | Closes #10698. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8571 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | |||||
* | Ruby 1.9 compat: fix warnings, shadowed block vars, and unitialized instance ↵ | Jeremy Kemper | 2007-12-22 | 1 | -2/+2 | |
| | | | | | | vars git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8481 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | |||||
* | Dynamic finders on association collections respect association :limit. ↵ | Jeremy Kemper | 2007-11-21 | 1 | -1/+1 | |
| | | | | | | Closes #10227 [Jack Danger Canty] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8178 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | |||||
* | Make Dynamic Finders on Association Collections Respect Association :order ↵ | Michael Koziarski | 2007-11-21 | 1 | -1/+1 | |
| | | | | | | [patrick.t.joyce, technoweenie]. Closes #10211 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8174 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | |||||
* | Allow find on a has_many association defined with :finder_sql to accept id ↵ | Marcel Molina | 2007-10-26 | 1 | -1/+1 | |
| | | | | | | arguments as strings like regular find does. Closes #9916 [krishna] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8030 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | |||||
* | Refactor association create and build so before & after callbacks behave ↵ | Jeremy Kemper | 2007-10-16 | 1 | -7/+1 | |
| | | | | | | consistently. Closes #8854. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7935 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | |||||
* | Removed unused @join_sql reference (closes #9174) [danger] | David Heinemeier Hansson | 2007-09-22 | 1 | -1/+1 | |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7554 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | |||||
* | Fix association writer with :dependent => :nullify. Closes #7314. | Jeremy Kemper | 2007-09-14 | 1 | -8/+11 | |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7477 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | |||||
* | Don't clobber :includes passed to count on has_many association. Closes ↵ | Michael Koziarski | 2007-08-16 | 1 | -1/+1 | |
| | | | | | | #9175 [danger] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7326 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | |||||
* | Make sure has_many associations honour :include when counting. Closes #9167 ↵ | Michael Koziarski | 2007-08-16 | 1 | -1/+1 | |
| | | | | | | [danger] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7325 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | |||||
* | Refactored in use of extract_options! (closes #9079) [josh] | David Heinemeier Hansson | 2007-07-24 | 1 | -1/+1 | |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7220 5ecf4fe2-1ee6-0310-87b1-e25e094e27de |