Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix generated WHERE IN query for named scopes. [#583 state:resolved] | Philip Hallstrom | 2008-08-21 | 1 | -0/+2 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Test for eager loading of STI subclasses from htm associations | Tarmo Tänav | 2008-08-16 | 1 | -0/+3 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Fix file permissions | Tarmo Tänav | 2008-07-31 | 3 | -0/+0 |
| | | | | Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | Use klass.sti_name to make sure associations take store_full_sti_class into ↵ | Daniel Guettler | 2008-07-22 | 1 | -0/+7 |
| | | | | | | account. [#671 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Add :accessible option to Associations for allowing mass assignments using ↵ | David Dollar | 2008-07-14 | 2 | -1/+7 |
| | | | | | | | | | | | | | | | | | | | | | | | | | hash. [#474 state:resolved] Allows nested Hashes (i.e. from nested forms) to hydrate the appropriate ActiveRecord models. class Post < ActiveRecord::Base belongs_to :author, :accessible => true has_many :comments, :accessible => true end post = Post.create({ :title => 'Accessible Attributes', :author => { :name => 'David Dollar' }, :comments => [ { :body => 'First Post!' }, { :body => 'Nested Hashes are great!' } ] }) post.comments << { :body => 'Another Comment' } Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Ensure NamedScope#build/create/create!/new works as expected when named ↵ | Daniel Guettler | 2008-07-09 | 1 | -0/+2 |
| | | | | | | scope has hash conditions. [Daniel Guettler, Pratik Naik] [#419 state:resolved] Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Add support for :primary_key option to has_one as well as has_many so that a ↵ | Brad Greenlee | 2008-07-06 | 1 | -0/+1 |
| | | | | | | key other than the default primary key can be used for the association Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Add has_many :primary_key option to allow setting the primary key on a has ↵ | Andre Arko | 2008-07-06 | 1 | -0/+2 |
| | | | | | | many association Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Add extra hash conditions tests for named_scope | Pratik Naik | 2008-06-28 | 1 | -0/+1 |
| | |||||
* | Fix column collision with named_scope and :joins. [#46 state:resolved] | Mark Catley | 2008-06-22 | 1 | -1/+6 |
| | |||||
* | Fixed that scopes defined with a string name could not be composed | Tarmo Tänav | 2008-06-22 | 1 | -0/+1 |
| | |||||
* | fix merge | rick | 2008-06-19 | 2 | -2/+5 |
|\ | |||||
| * | Disable validations for associated belongs_to record by default | Pratik Naik | 2008-06-11 | 1 | -2/+2 |
| | | |||||
| * | Add :validate option to associations. [#301 state:resolved] | Jan De Poorter | 2008-06-11 | 2 | -1/+4 |
| | | | | | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | | fix eager loading with dynamic finders | Brandon Keepers | 2008-06-09 | 3 | -1/+3 |
|/ | |||||
* | Fix faulty tests introduced in 8d0b4fa39 | Michael Koziarski | 2008-05-24 | 1 | -1/+1 |
| | |||||
* | Added :select option to has_one and belongs_to, remove unused :order option ↵ | josevalim | 2008-05-24 | 1 | -0/+2 |
| | | | | | | | on belongs_to. Signed-off-by: Michael Koziarski <michael@koziarski.com> [#241 state:resolved] | ||||
* | Add ActiveRecord option to store the full class name on STI's type column, ↵ | Rodrigo Kochenburger | 2008-05-13 | 1 | -0/+4 |
| | | | | | | allowing one to have STI subclasses in different namespaces [#114] Signed-off-by: rick <technoweenie@gmail.com> | ||||
* | Dirty attributes aren't cleared if save fails. [#174 state:resolved] | Xavier Noria | 2008-05-12 | 1 | -0/+2 |
| | | | | Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Ensure hm:t preloading honours reflection options. [#137 state:resolved] | Frederick Cheung | 2008-05-11 | 1 | -0/+4 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Fix validates_uniqueness_of for SQL keywords [#23 state:resolved] | Alex MacCaw | 2008-05-11 | 1 | -0/+2 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Calling ActiveRecord#inspect on an unloaded association won't wipe the ↵ | Andreas Neuhaus | 2008-05-08 | 1 | -0/+4 |
| | | | | | | collection [#9 state:resolved] Signed-off-by: Joshua Peek <josh@joshpeek.com> | ||||
* | Ensure correct record is returned when preloading has_one where more than ↵ | Frederick Cheung | 2008-05-06 | 1 | -0/+2 |
| | | | | | | | one row exists Signed-off-by: Michael Koziarski <michael@koziarski.com> [#73 state:closed] | ||||
* | Added missing files | David Heinemeier Hansson | 2008-05-01 | 1 | -0/+4 |
| | |||||
* | Fixed AssociationsPreload such that it doesnt require foreign keys to be ↵ | David Heinemeier Hansson | 2008-04-30 | 1 | -0/+2 |
| | | | | integers (fcheung) [#33 state:resolved] | ||||
* | Change tests against all scope to base scope as all is now used as a finder ↵ | David Heinemeier Hansson | 2008-04-30 | 2 | -0/+3 |
| | | | | alias | ||||
* | Ensure table names are quoted by the association preloading code. | Frederick Cheung | 2008-04-26 | 3 | -0/+14 |
| | | | | | | [#45 state:resolved] Signed-off-by: Michael Koziarski <michael@koziarski.com> | ||||
* | Improve ActiveRecord::Base#table_name unit tests for nested classes. Closes ↵ | Josh Peek | 2008-04-07 | 1 | -0/+2 |
| | | | | | | #10289. [scott_willson] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9237 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Refactor HasManyThroughAssociation to inherit from HasManyAssociation. ↵ | Pratik Naik | 2008-04-06 | 1 | -0/+14 |
| | | | | | | 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 | ||||
* | Ruby 1.9 compat: work around YAML serialization error exposed by validations ↵ | Jeremy Kemper | 2008-04-01 | 1 | -3/+2 |
| | | | | | | tests git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9192 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Fixed that has_many :through would ignore the hash conditions (closes ↵ | David Heinemeier Hansson | 2008-03-28 | 1 | -0/+5 |
| | | | | | | #11447) [miloops] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9110 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Merge the has_finder gem, renamed as 'named_scope'. Closes #11404 [nkallen] | Rick Olson | 2008-03-24 | 4 | -0/+34 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | has_one :through supports :source_type. Fix up some tests. References #4756. | Jeremy Kemper | 2008-03-22 | 1 | -1/+2 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9075 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Allow association scoping for built/created records if :conditions is ↵ | Rick Olson | 2008-03-21 | 1 | -0/+3 |
| | | | | | | specified as a hash. Closes #11393 [miloops] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9068 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Add has_one :through support, finally. Closes #4756 [thechrisoshow] | Rick Olson | 2008-03-21 | 4 | -0/+28 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9067 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Add :readonly option to HasManyThrough associations. Closes #11156 [miloops] | Pratik Naik | 2008-03-07 | 1 | -1/+2 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8989 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Make dynamic finders respect the :include on HasManyThrough associations. ↵ | Michael Koziarski | 2008-02-18 | 2 | -1/+2 |
| | | | | | | Closes #10998. [cpytel] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8890 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Introduce the :readonly option to all associations. Records from the ↵ | Jeremy Kemper | 2008-02-13 | 2 | -0/+4 |
| | | | | | | association cannot be saved. Closes #11084. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8864 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Revert r8742: remove has_many with :group option since it has sketchy sql ↵ | Jeremy Kemper | 2008-02-03 | 1 | -1/+0 |
| | | | | | | support. Closes #10480. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8790 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Fix has_many :through a polymorphic has_many. Closes #10529 [Aleksey ↵ | Jeremy Kemper | 2008-02-02 | 3 | -1/+8 |
| | | | | | | Kondratenko] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8776 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Fixed preloading belongs_to associations which reference a custom foreign ↵ | Jeremy Kemper | 2008-01-31 | 2 | -0/+8 |
| | | | | | | key. References #9640. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8762 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Make sure count works on has_many :through associations using :group. ↵ | Michael Koziarski | 2008-01-27 | 1 | -0/+1 |
| | | | | | | Closes #10480 [remvee] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8742 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Make sure that belongs_to counter decrements when assigning nil Closes ↵ | Michael Koziarski | 2008-01-26 | 1 | -2/+2 |
| | | | | | | #10804 [jeanmartin] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8735 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | belongs_to supports :dependent => :destroy and :delete. Closes #10592. | Jeremy Kemper | 2008-01-19 | 1 | -1/+13 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8675 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Introduce preload query strategy for eager :includes. Closes #9640. | Jeremy Kemper | 2008-01-19 | 1 | -0/+3 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8672 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | Fix paths | Jeremy Kemper | 2008-01-18 | 1 | -1/+1 |
| | | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8661 5ecf4fe2-1ee6-0310-87b1-e25e094e27de | ||||
* | move assets and models | Jeremy Kemper | 2008-01-18 | 45 | -0/+786 |
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8657 5ecf4fe2-1ee6-0310-87b1-e25e094e27de |