Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | STI should not ignore type condition while applying scopes from parent class ↵ | Neeraj Singh | 2010-05-15 | 1 | -0/+5 |
| | | | | | | | | scopes [#4507 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Modified default_scope to merge with any pre-existing default_scope | David Chelimsky + Brian Tatnall | 2010-05-15 | 1 | -2/+29 |
| | | | | | | | | | | | | and added AR::Base::clear_default_scope - clear_default_scope provides users who rely on the old behaviour of each call to default_scope overwriting any previous default scopes an opportunity to maintain that behaviour. [#4583 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | type_cast_calculated_value refactor: value is never a Fixnum here. Fix test ↵ | Santiago Pastorino | 2010-05-11 | 1 | -2/+1 |
| | | | | | | | | since SQLite returns Float. [#4514 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Remove undocumented save_without_validation! | Pratik Naik | 2010-05-11 | 1 | -6/+0 |
| | |||||
* | Make sure valid? preceives the context as in ActiveModel API (ht: Carlos ↵ | José Valim | 2010-05-10 | 1 | -0/+17 |
| | | | | Antonio) | ||||
* | Revert "Revert "Add index length support for MySQL [#1852 state:open]"" | Pratik Naik | 2010-05-09 | 2 | -0/+25 |
| | | | | This reverts commit 6626833db13a69786f9f6cd56b9f53c4017c3e39. | ||||
* | corrected AR find_each and find_in_batches to raise when the user uses ↵ | Josh Kalderimis | 2010-05-09 | 1 | -0/+14 |
| | | | | | | select but does not specify the primary key Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | eliminate alias_method_chain from ActiveRecord | wycats | 2010-05-09 | 1 | -3/+6 |
| | |||||
* | updated AR to work with the AMo model validation changes | Josh Kalderimis | 2010-05-08 | 1 | -1/+1 |
| | |||||
* | Revert "Add index length support for MySQL [#1852 state:open]" | José Valim | 2010-05-08 | 2 | -25/+0 |
| | | | | | | | | | | | | | This commit breaks dumping a few tables, as the sessions table. To reproduce, just create a new application and: rake db:sessions:create rake db:migrate rake db:test:prepare And then look at the db/schema.rb file (ht: Sam Ruby). This reverts commit 5b95730edc33ee97f53da26a3868eb983305a771. | ||||
* | Add index length support for MySQL [#1852 state:resolved] | Emili Parreno | 2010-05-08 | 2 | -0/+25 |
| | | | | | | | | | | | | Example: add_index(:accounts, :name, :name => 'by_name', :length => 10) => CREATE INDEX by_name ON accounts(name(10)) add_index(:accounts, [:name, :surname], :name => 'by_name_surname', :length => {:name => 10, :surname => 15}) => CREATE INDEX by_name_surname ON accounts(name(10), surname(15)) Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Make find_or_create and find_or_initialize work mixing explicit parameters ↵ | Santiago Pastorino | 2010-05-07 | 1 | -1/+17 |
| | | | | | | and a hash [#4457 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Fix unintuitive behavior with multiple order and group clauses | Ernie Miller | 2010-05-06 | 1 | -0/+10 |
| | | | | | | [#4545 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Use primary key in conditions, not 'id' [#4395 state:resolved] | Mathieu Arnold | 2010-05-04 | 1 | -0/+25 |
| | | | | Signed-off-by: Pratik Naik <pratiknaik@gmail.com> | ||||
* | Favor %{} in all code instead of (deprecated) {{}} as interpolation syntax ↵ | Lawrence Pit | 2010-05-03 | 1 | -2/+2 |
| | | | | | | for I18n Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | to_xml with :include should skip_instruct on the included records [#4506 ↵ | Lawrence Pit | 2010-04-30 | 1 | -0/+7 |
| | | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | test cases for record.to_xml [#458 state:resolved] | Neeraj Singh | 2010-04-30 | 1 | -0/+8 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Update after_commit and after_rollback docs and tests to use new style API ↵ | Brian Durand | 2010-04-29 | 1 | -6/+6 |
| | | | | | | | | with an :on options instead of on_* suffix. [#2991] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Add after_commit and after_rollback callbacks to ActiveRecord that are ↵ | Brian Durand | 2010-04-29 | 2 | -14/+291 |
| | | | | | | | | called after transactions either commit or rollback on all records saved or destroyed in the transaction. [#2991 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | making rake:migrate VERSION=0 a noop called in succession. [#2137 ↵ | Neeraj Singh | 2010-04-29 | 1 | -0/+19 |
| | | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Move several configuration values from Hash to ActiveSupport::XmlMini, which ↵ | José Valim | 2010-04-29 | 2 | -6/+3 |
| | | | | | | both Hash and Array depends on. Also, refactored ActiveModel serializers to just use ActiveSupport::XmlMini.to_tag. As consequence, if a serialized attribute is an array or a hash, it's not encoded as yaml, but as a hash or array. | ||||
* | Fix eager loading of associations causing table name collisions | Ernie Miller | 2010-04-28 | 1 | -0/+9 |
| | | | | | | [#4463 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Destroy respects optimistic locking. | Curtis Hawthorne | 2010-04-27 | 1 | -3/+48 |
| | | | | | | | | | | Now works with :dependent => :destroy and includes unit tests for that case. Also includes better error messages when updating/deleting stale objects. [#1966 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Support fixtures for namespaced models [#2965 state:resolved] | Andrew White | 2010-04-25 | 1 | -1/+9 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Remove quoted_string_prefix entirely since PostgreSQL was the only database ↵ | Jeremy Kemper | 2010-04-24 | 1 | -2/+2 |
| | | | | adapter relying on it. | ||||
* | Missing require added | Santiago Pastorino | 2010-04-18 | 1 | -0/+1 |
| | |||||
* | working around syck defects by optionally matching a space [#4426 ↵ | Aaron Patterson | 2010-04-17 | 1 | -1/+1 |
| | | | | | | state:resolved] Signed-off-by: wycats <wycats@gmail.com> | ||||
* | making yaml tests less specific to emitter. [#4425 state:resolved] | Aaron Patterson | 2010-04-17 | 1 | -1/+2 |
| | | | | Signed-off-by: wycats <wycats@gmail.com> | ||||
* | ActiveModel::Observing: stop using Observable Ruby module, re-implement ↵ | Mislav Marohnić | 2010-04-16 | 1 | -0/+20 |
| | | | | | | | | | `notify_observers` `Observable#notify_observers` from Ruby always returns false (which halts ActiveRecord callback chains) and has extra features (like `changed`) that were never used. Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | merge callbacks_observers_test.rb into lifecycle_test.rb where other ↵ | Mislav Marohnić | 2010-04-16 | 2 | -37/+34 |
| | | | | | | | | observers test reside Benefits: test able to run independently, subclassing instead of changing the original Comment model Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | fix a failure and some warnings on 1.9.2 [#4417 state:resolved] | Aaron Patterson | 2010-04-16 | 2 | -2/+2 |
| | | | | Signed-off-by: Xavier Noria <fxn@hashref.com> | ||||
* | Ensure not to load the entire association when bulk updating existing ↵ | Pratik Naik | 2010-04-14 | 1 | -1/+11 |
| | | | | records using nested attributes | ||||
* | Refactor compute_type to handle situations where the correct class is ↵ | Andrew White | 2010-04-12 | 2 | -9/+32 |
| | | | | | | already loaded Signed-off-by: wycats <wycats@gmail.com> | ||||
* | make ActiveRecord::Base.subclasses a public method | Emmanuel Oga | 2010-04-12 | 1 | -0/+4 |
| | | | | Signed-off-by: wycats <wycats@gmail.com> | ||||
* | table_name_prefix and table_name_suffix are class_attributes instead of ↵ | Phil Smith | 2010-04-12 | 1 | -7/+51 |
| | | | | | | cattr_accessors. [#4230] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | mode postgresql adapters table_exists? method take the schema in to account. ↵ | Aaron Patterson | 2010-04-11 | 1 | -0/+15 |
| | | | | | | [#4341 state:resolved] Signed-off-by: wycats <wycats@gmail.com> | ||||
* | clearing up many warnings, removing unnecessary regular expresion ↵ | Aaron Patterson | 2010-04-10 | 1 | -1/+1 |
| | | | | | | comparisons [#4365 state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Made arrays of ActiveRecords, and any classes, with namespaces convert to ↵ | mfoster | 2010-04-10 | 1 | -1/+11 |
| | | | | | | valid xml. [#3824 state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | clear the rest of the warnings, run with warnings turned on [#4332 ↵ | Aaron Patterson | 2010-04-10 | 1 | -25/+39 |
| | | | | | | state:resolved] Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | kill warnings on 1.8.7 [#4331 state:resolved] | Aaron Patterson | 2010-04-10 | 1 | -4/+4 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Revert "When creating database with rake, create schemas in ↵ | Michael Koziarski | 2010-04-09 | 2 | -13/+0 |
| | | | | | | | | | | | | | schema_search_path if it doesn't exist." This reverts commit 6c2a0675f11a9b5b8e88ed7dbccd65cb51be8029. Reverting because it breaks the ability to run tests using a non-superuser. Conflicts: activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb activerecord/lib/active_record/railties/databases.rake | ||||
* | Dirty datetime attributes should be aware of time zone info [#3658 ↵ | Kristopher Murata | 2010-04-08 | 1 | -0/+95 |
| | | | | | | state:resolved] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Reset named scope cache whenever the @target is reset | Pratik Naik | 2010-04-07 | 1 | -0/+10 |
| | |||||
* | Memoize association.named_scope calls | Pratik Naik | 2010-04-05 | 1 | -0/+9 |
| | |||||
* | Add tests to prevent regression of lazy evaluation of has_many ..., ↵ | Andrew White | 2010-04-04 | 1 | -0/+18 |
| | | | | | | | | :dependent => :___ [#2627 state:committed] Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net> | ||||
* | Add Relation extensions | Pratik Naik | 2010-04-02 | 1 | -0/+16 |
| | |||||
* | Add tests for postgresql column type mapping updates [#4270 state:resolved] | Ernie Miller | 2010-03-31 | 1 | -0/+17 |
| | | | | Signed-off-by: Emilio Tagua <miloops@gmail.com> | ||||
* | Dont try to load the record from the db if preloading didn't find anything | Pratik Naik | 2010-03-31 | 1 | -0/+6 |
| | |||||
* | Fix failing test in MySQL. | Emilio Tagua | 2010-03-30 | 1 | -3/+8 |
| | | | | Signed-off-by: José Valim <jose.valim@gmail.com> | ||||
* | Named scopes shouldn't test equality using to_a if it's not an Array, this ↵ | Emilio Tagua | 2010-03-30 | 1 | -3/+9 |
| | | | | | | was causing records to be loaded before they were needed. Signed-off-by: José Valim <jose.valim@gmail.com> |