This project is archived and is in readonly mode.
has_many :conditions and named_scope should alter creates from within it
-
Jeremy Kemper
- Milestone cleared.
- State changed from new to open
That'd be a nice addition for Hash :conditions. Please do investigate! Have create look at :conditions in the :find scope and check for a Hash.
-
Jeremy Kemper
Regarding "this has been a problem in rails for a very long time and I am shocked that it has not been fixed yet"
Typically :conditions could not be interpreted purely as an attributes hash. Only relatively recently were :conditions hashes introduced. This wasn't a problem even then, just a missing feature. What is shocking about this?
-
Daniel Guettler
This has already been added in commit c23c9bd1 in response to ticket http://dev.rubyonrails.org/ticke...
Or am I missing something?
-
ronin-23439 (at lighthouseapp)
Yes, this was my ticket as well I put this ticket in to include named_scope and because I wasn't sure if that original Trac site was being used anymore.
-
Daniel Guettler
Here a possible patch which adds build, create and create! methods to the named_scope similar to associations.
-
Daniel Guettler
- No changes were found…
-
Repository
- State changed from open to resolved
- Tag set to activerecord, associations, create, enhancement, has_many, patch, tested
(from [84af99e78dbf65b7faa92313acf8457cb0c2b510]) Ensure NamedScope#build/create/create!/new works as expected when named scope has hash conditions. [Daniel Guettler, Pratik Naik] [#419 state:resolved]
Signed-off-by: Pratik Naik
