aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
* Refactor db:charset taskSimon Jefford2012-06-199-20/+118
| | | | | In a similar vein to Pat's work on create, drop etc, the db:charset task is now a one liner in databases.rake
* Refactor the conditionalsRafael Mendonça França2012-06-191-7/+7
|
* Validates_numericality_of is skipped when changing 0 to to non-empty stringAngelo capilleri2012-06-192-5/+25
| | | | | | | | | | This happens when A has_many many B and A accepts_nested_attributes B that has a numeric colum with initial 0 value. So a.update_attributes({:b_attributes => { :id => b.id, :numeric => 'foo' }}) passes the validation test but, the value of :numeric doesn't change. his commit forces that the update fails with the above conditions. Fixes #6393 Fixes #2331
* Refactor and use class_attributeCarlos Antonio da Silva2012-06-182-7/+15
|
* Remember the stored attributes in a config attribute.Joost Baaij2012-06-183-1/+23
| | | | | | This allows you to retrieve the list of attributes you've defined. Usable for e.g. selects in the view, or interators based on the attributes you wish to store in the serialized column.
* Improve the CHANGELOG entry [ci skip]Rafael Mendonça França2012-06-181-2/+19
|
* Refactor Relation#update a bit to avoid an extra Enumerator instanceCarlos Antonio da Silva2012-06-181-1/+1
|
* Make DatabaseTasks a module with real private methodsCarlos Antonio da Silva2012-06-181-13/+14
|
* Add CHANGELOG entry to composed_of removalRafael Mendonça França2012-06-181-0/+6
|
* Merge pull request #6743 from steveklabnik/remove_composed_ofRafael Mendonça França2012-06-1818-768/+9
|\ | | | | | | Removing composed_of
| * Removing composed_of from ActiveRecord.Steve Klabnik2012-06-1818-768/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This feature adds a lot of complication to ActiveRecord for dubious value. Let's talk about what it does currently: class Customer < ActiveRecord::Base composed_of :balance, :class_name => "Money", :mapping => %w(balance amount) end Instead, you can do something like this: def balance @balance ||= Money.new(value, currency) end def balance=(balance) self[:value] = balance.value self[:currency] = balance.currency @balance = balance end Since that's fairly easy code to write, and doesn't need anything extra from the framework, if you use composed_of today, you'll have to add accessors/mutators like that. Closes #1436 Closes #2084 Closes #3807
* | Add ensure Joke.reset_sequence_nameYasuo Honda2012-06-191-0/+2
|/ | | | | to avoid ORA-02289: sequence does not exist for `SELECT "BLACK_JOKES_SEQ".NEXTVAL FROM dual`
* Change minimum (default) log level in PostgreSQL to warning.kennyj2012-06-183-1/+11
|
* Merge branch 'dp_docs'Carlos Antonio da Silva2012-06-181-0/+92
|\ | | | | | | Closes #6697
| * Documentation for where and where! methods on relations.David Paschich2012-06-181-0/+92
| | | | | | | | Based on examples seen in the Rails test suite. [ci skip]
* | fix invalid syntax and sqlite rake failing testsFrancesco Rodriguez2012-06-184-6/+9
| |
* | add :nodoc: to AR::Tasks and update to follow the coding conventionsFrancesco Rodriguez2012-06-184-208/+226
| |
* | check if sqlite3 file exists before removeFrancesco Rodriguez2012-06-181-3/+3
| |
* | Merge pull request #6761 from freelancing-god/db-rakeJon Leighton2012-06-1710-156/+983
|\ \ | | | | | | Get logic out of db rake tasks, and into classes and objects
| * | Rails is the default (but now override able) source for environment and path.Pat Allan2012-06-174-43/+57
| | |
| * | Cleaning up after some warnings, adding slightly higher-level tests.Pat Allan2012-06-176-9/+309
| | |
| * | One line db:create/db:drop tasks.Pat Allan2012-06-172-55/+50
| | | | | | | | | | | | | | | | | | Now isn't that better? And yes, I know that private has no impact on class methods - it's a visual distinction, not a technical one.
| * | db:drop and some of db:test:purge.Pat Allan2012-06-178-52/+243
| | |
| * | db:create for PostgreSQL pulled out into a class.Pat Allan2012-06-176-36/+99
| | |
| * | db:create for MySQL now much cleaner.Pat Allan2012-06-176-37/+230
| | |
| * | Confirm connection is not established if file exists.Pat Allan2012-06-171-1/+10
| | |
| * | A beginning of sorts.Pat Allan2012-06-174-12/+74
| | | | | | | | | | | | Minimal implementation that supports db:create SQLite replacement
* | | Merge pull request #6759 from dylanahsmith/only-catch-standard-errorSantiago Pastorino2012-06-173-6/+6
|\ \ \ | | | | | | | | Avoid unnecessary catching of Exception instead of StandardError.
| * | | Avoid unnecessary catching of Exception instead of StandardError.Dylan Smith2012-06-173-6/+6
| | | |
* | | | Adding `load_config` task as dependency.Cairo Noleto2012-06-161-14/+14
|/ / / | | | | | | | | | Without this, some tasks won't load configurations like custom engines.
* | | Don't read csv file during executing db:fixtures:load.kennyj2012-06-171-1/+1
| | |
* | | no need to define methods in included hookJon Leighton2012-06-151-13/+13
| | |
* | | Fix deprecation warnings when using ↵Jon Leighton2012-06-152-3/+40
| | | | | | | | | | | | config.active_record.mass_assignment_sanitizer=
* | | Fix observers with AR::ModelJon Leighton2012-06-153-3/+6
| | |
* | | Fix config.active_record.whitelist_attributes with AR::ModelJon Leighton2012-06-153-3/+40
| | |
* | | Simplify AR configuration code.Jon Leighton2012-06-1524-265/+348
| | | | | | | | | | | | | | | Get rid of ActiveModel::Configuration, make better use of ActiveSupport::Concern + class_attribute, etc.
* | | refactorJon Leighton2012-06-151-11/+5
| |/ |/|
* | Remove unneded tests.Rafael Mendonça França2012-06-141-11/+1
| | | | | | | | | | | | | | Before 7f4b0a1231bf3c65db2ad4066da78c3da5ffb01, this test are asserting that update_attribute does the dirty tracking. Since we remove this method and update_column write in the database directly this tests will always fail>
* | Add CHANGELOG entry to the uuid datatype support to PostgreSQL adpterRafael Mendonça França2012-06-141-0/+2
| |
* | Merge pull request #6713 from etehtsea/activerecord-uuidRafael Mendonça França2012-06-146-10/+39
|\ \ | | | | | | | | | Add uuid datatype support to PostgreSQL adapter
| * | Add uuid type support to PostgreSQL adapterKonstantin Shabanov2012-06-146-10/+39
| | |
* | | registers the removal of update_attribute in the CHANGELOGXavier Noria2012-06-141-0/+6
| | |
* | | Merge pull request #6738 from steveklabnik/masterXavier Noria2012-06-147-87/+11
|\ \ \ | | | | | | | | Remove update_attribute.
| * | | Remove update_attribute.Steve Klabnik2012-06-147-87/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Historically, update_attribute and update_attributes are similar, but with one big difference: update_attribute does not run validations. These two methods are really easy to confuse given their similar names. Therefore, update_attribute is being removed in favor of update_column. See the thread on rails-core here: https://groups.google.com/forum/?fromgroups#!topic/rubyonrails-core/BWPUTK7WvYA
* | | | Merge branch 'master' of github.com:lifo/docrailsVijay Dev2012-06-141-1/+1
|\ \ \ \ | |/ / / |/| | |
| * | | Fixed typo.chrismcc2012-06-111-1/+1
| | | |
* | | | removes item in the Active Record CHANGELOGXavier Noria2012-06-141-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | That change to update_attribute was considered to be too subtle and was reverted in 30ea923 just before Rails 3 shipped. Later we introduced update_column (Rails 3.1).
* | | | Need a assert here in testsArun Agrawal2012-06-121-2/+2
| | | |
* | | | Merge pull request #6676 from aurelian/masterRafael Mendonça França2012-06-122-1/+5
|\ \ \ \ | | | | | | | | | | Don't assign the attributes if the list is empty
| * | | | Don't assign the attributes if the list is empty.Aurelian Oancea2012-06-082-1/+5
| | | | |