aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/base.rb
Commit message (Collapse)AuthorAgeFilesLines
* Make Model.find_or_create_by_* and find_or_initialize_by_* use relations and ↵Pratik Naik2009-12-271-54/+1
| | | | remove method caching
* Make Model.find_by_* and Model.find_all_by_* use relations and remove ↵Pratik Naik2009-12-271-54/+22
| | | | dynamic method caching
* Ensure all the finder methods respect scopingPratik Naik2009-12-261-1/+1
|
* Rename Model.conditions and relation.conditions to .wherePratik Naik2009-12-261-6/+6
|
* Add Model.select/group/order/limit/joins/conditions/preload/eager_load class ↵Pratik Naik2009-12-261-6/+4
| | | | | | | | | methods returning a lazy relation. Examples : posts = Post.select('id).order('name') # Returns a lazy relation posts.each {|p| puts p.id } # Fires "select id from posts order by name"
* Replace reset_counter_cache with reset_counters that has API inline with ↵Gabe da Silveira2009-12-031-8/+13
| | | | | | | | existing update_counters method [#1211 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Implement ActiveRecord#reset_counter_cacheMike Breen2009-12-021-0/+18
| | | | | | [#1211 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
* Revert "Split arel_table into method to get a relation and another to ↵Jeremy Kemper2009-11-131-6/+6
| | | | | | memoize the default relation." This reverts commit bd51790895fc75a3b4e19e8dd7aa6dc389d77068.
* Split arel_table into method to get a relation and another to memoize the ↵Jeremy Kemper2009-11-131-6/+6
| | | | default relation.
* Symbol#to_proc is not needed for Ruby >= 1.8.7Xavier Noria2009-11-091-1/+0
|
* Move validator, human_name and human_attribute_name to ActiveModel, remove ↵José Valim2009-10-201-27/+5
| | | | | | deprecated error messages and add i18n_scope and lookup_ancestors. Signed-off-by: Carl Lerche <carllerche@mac.com>
* Refactoring attributes/types [#3348 state:resolved]Eric Chapweske2009-10-171-31/+7
| | | | Signed-off-by: Joshua Peek <josh@joshpeek.com>
* Unify benchmark APIs.José Valim2009-10-151-33/+3
|
* Update Orchestra instrumentations and move part of logging to Orchestra.José Valim2009-10-151-0/+2
|
* Merge commit 'rails/master'Emilio Tagua2009-10-071-27/+38
|\
| * Call initialize_copy when cloning [#3164 state:resolved]Paul Gillard2009-10-061-27/+38
| | | | | | | | | | | | | | | | Cloned AR objects are now instantiated through initialize_copy rather than new/initialize. This allows AR classes to override initialize_copy in order to implement deep cloning. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* | Don't send table_name when updating attributes, use the class arel_table.Emilio Tagua2009-10-071-1/+1
| |
* | Don't send table_name when there's no need to.Emilio Tagua2009-10-071-1/+1
| |
* | Initial documentation to Base#all.Emilio Tagua2009-10-051-2/+2
| |
* | Merge branch 'associations_2'Emilio Tagua2009-10-051-4/+15
|\ \
| * | Added eager loading support to Relation and ActiveRecord#all.Emilio Tagua2009-10-051-11/+6
| | |
| * | Moved relation's test to relation_test.Emilio Tagua2009-10-051-2/+1
| | |
| * | Added association preload to relation.Emilio Tagua2009-09-011-3/+20
| | |
* | | Merge commit 'rails/master'Emilio Tagua2009-09-211-29/+19
|\ \ \ | | |/ | |/|
| * | Extract class-finder method from instantiateJeremy Kemper2009-09-171-27/+19
| | |
| * | Collapse nested conditionalJeremy Kemper2009-09-171-15/+13
| | |
* | | Merge commit 'rails/master'Emilio Tagua2009-09-081-8/+3
|\| |
| * | Changed ActiveRecord to use new callbacks and speed up observers by only ↵José Valim2009-09-081-8/+3
| | | | | | | | | | | | | | | | | | notifying events that are actually being consumed. Signed-off-by: Joshua Peek <josh@joshpeek.com>
* | | Merge commit 'rails/master'Emilio Tagua2009-09-081-1/+3
|\| | | |/ |/| | | | | Conflicts: activerecord/lib/active_record/associations.rb
| * Don't try to log protected attribute removal if there's no logger defined ↵Jeffrey Hardy2009-09-021-1/+3
| | | | | | | | | | | | [#3135 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com>
* | Revert "Revert "Add readonly support for relations.""Emilio Tagua2009-08-271-1/+6
| | | | | | | | This reverts commit f2c0725d79e29b02e30e7a4827851acc4a766730.
* | Revert "Add readonly support for relations."Emilio Tagua2009-08-271-6/+1
| | | | | | | | This reverts commit 7cce95b25ace33e04526d4490e487a080c1f9b96.
* | Add readonly support for relations.Emilio Tagua2009-08-271-1/+6
| |
* | No need to reload the relation table with a method param, just nil it.Emilio Tagua2009-08-271-5/+3
| |
* | Performance: Don't reload ARel relation on update.Emilio Tagua2009-08-271-1/+1
| |
* | Performance: Don't reload the ARel relation on create, do it onEmilio Tagua2009-08-271-2/+2
| | | | | | | | reset_column_information.
* | Performance: Don't reload the arel_table when destroying.Emilio Tagua2009-08-271-1/+1
| |
* | Remove useless var local definition.Emilio Tagua2009-08-261-1/+1
| |
* | Make sure join association methods are called once.Emilio Tagua2009-08-191-4/+4
| |
* | Remove useless InnerJoinDependency, inner joins are performed throughEmilio Tagua2009-08-191-1/+1
| | | | | | | | Arel::InnerJoin.
* | Remove now unused quote_table_name, ARel does that quoting now.Emilio Tagua2009-08-181-7/+0
| |
* | Call to_sql method on ActiveRecord::Relation instance not it's relationEmilio Tagua2009-08-181-1/+1
| | | | | | | | attribute.'
* | Cache arel_table when possible, use class method arel_table insteadEmilio Tagua2009-08-181-10/+7
| | | | | | | | instance method.
* | Cache #arel_able when possible.Emilio Tagua2009-08-181-2/+5
| |
* | Use immutable relation objects to generate queries.Emilio Tagua2009-08-181-17/+17
| |
* | Use finder options as relation method names to provide more familiarEmilio Tagua2009-08-181-16/+15
| | | | | | | | | | naming. Use bang methods convention in methods that alter the relation.
* | Use ARel's joins when building a query for finding records with includedEmilio Tagua2009-08-141-6/+15
| | | | | | | | associations.
* | Merge commit 'rails/master'Emilio Tagua2009-08-101-10/+18
|\| | | | | | | | | | | | | Conflicts: activerecord/lib/active_record/calculations.rb activerecord/lib/active_record/connection_adapters/mysql_adapter.rb activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
| * Prevent overwriting of table name in merging SQL conditions [#2949 ↵Tristan Dunn2009-08-101-1/+3
| | | | | | | | state:resolved]
| * Model#human_attribute_name now accept symbols [#3025 status:resolved]Arthur Zapparoli2009-08-091-1/+1
| | | | | | | | Signed-off-by: José Valim <jose.valim@gmail.com>