Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | require things we need | Aaron Patterson | 2013-05-15 | 1 | -0/+1 |
| | |||||
* | Refactoring validate_missing_parameters to validate_required_parameters. | wangjohn | 2013-03-23 | 1 | -5/+5 |
| | |||||
* | Deprecate obsolete Time to DateTime fallback methods | Andrew White | 2012-12-11 | 1 | -1/+1 |
| | | | | | | | The Time.time_with_datetime_fallback, Time.utc_time and Time.local_time methods were added to handle the limitations of Ruby's native Time implementation. Those limitations no longer apply so we are deprecating them in 4.0 and they will be removed in 4.1. | ||||
* | Typecast to string and array are not supported in multiparameter | Rafael Mendonça França | 2012-10-18 | 1 | -3/+2 |
| | | | | attributes | ||||
* | update AR::AttributeAssignment documentation [ci skip] | Francesco Rodriguez | 2012-09-19 | 1 | -5/+5 |
| | |||||
* | AR::Base#attributes= is just an alias for AR::Base#assign_attributes | Guillermo Iguaran | 2012-09-19 | 1 | -10/+4 |
| | |||||
* | Remove mass_assignment_options from ActiveRecord | Guillermo Iguaran | 2012-09-16 | 1 | -17/+2 |
| | |||||
* | attr_accessible and attr_protected raise an exception pointing to use plugin ↵ | Guillermo Iguaran | 2012-09-16 | 1 | -0/+2 |
| | | | | or new protection model | ||||
* | Rename ForbiddenAttributes exception to ForbiddenAttributesError | Guillermo Iguaran | 2012-09-16 | 1 | -1/+1 |
| | |||||
* | Remove mass assignment security from ActiveRecord | Guillermo Iguaran | 2012-09-16 | 1 | -73/+8 |
| | |||||
* | Get rid of some arguments by using the accessors | Carlos Antonio da Silva | 2012-08-18 | 1 | -30/+31 |
| | | | | | Cleans up a lot of noise from arguments being passed from one method to another. | ||||
* | Move multiparameter attribute logic to a class | Carlos Antonio da Silva | 2012-08-18 | 1 | -72/+84 |
| | | | | | This should make it easier to refactor and improve this code, and remove complexity with params going around here and there. | ||||
* | Some more cleanup to use Hash#values_at, and some method docs | Carlos Antonio da Silva | 2012-08-18 | 1 | -3/+7 |
| | |||||
* | Use cached column information to instantiate time object | Carlos Antonio da Silva | 2012-08-18 | 1 | -6/+6 |
| | |||||
* | Refactor blank date parameter validation | Carlos Antonio da Silva | 2012-08-18 | 1 | -2/+6 |
| | |||||
* | Refactor missing parameter validation based on position | Carlos Antonio da Silva | 2012-08-18 | 1 | -7/+12 |
| | |||||
* | Reuse already fetched column to check for :time | Carlos Antonio da Silva | 2012-08-18 | 1 | -5/+6 |
| | | | | | Avoid doing a new column lookup for the attribute, since we already have the column to check for the klass. | ||||
* | Refactor some code in multiparameter assignment | Carlos Antonio da Silva | 2012-08-18 | 1 | -26/+25 |
| | | | | | Move some methods to the top to better organize them, since they're used right at the beginning of the multiparameter assignment method chain. | ||||
* | Extract nested parameter assignment to a separate method | Carlos Antonio da Silva | 2012-08-18 | 1 | -3/+6 |
| | |||||
* | don't call method unless we need to | Jon Leighton | 2012-08-17 | 1 | -1/+1 |
| | |||||
* | align them assignments | Jon Leighton | 2012-08-17 | 1 | -4/+4 |
| | |||||
* | Optimize for the happy path | Jon Leighton | 2012-08-17 | 1 | -11/+14 |
| | | | | | | Checking respond_to? incurs overhead, and most of the time when assigning attributes it will return true. So just handle the NoMethodError instead. | ||||
* | load active_support/concern in active_support/rails | Xavier Noria | 2012-08-02 | 1 | -1/+0 |
| | |||||
* | Revert "Removing composed_of from ActiveRecord." | Rafael Mendonça França | 2012-07-27 | 1 | -2/+2 |
| | | | | | | | | | | | This reverts commit 14fc8b34521f8354a17e50cd11fa3f809e423592. Reason: we need to discuss a better path from this removal. Conflicts: activerecord/lib/active_record/reflection.rb activerecord/test/cases/base_test.rb activerecord/test/models/developer.rb | ||||
* | Fixes #6825, adds tests covering cases and error possibilities, also changes ↵ | Mauricio Linhares | 2012-06-27 | 1 | -9/+22 |
| | | | | SQLite3 driver to correctly generate a time column instead of datetime | ||||
* | Removing composed_of from ActiveRecord. | Steve Klabnik | 2012-06-18 | 1 | -2/+2 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 | ||||
* | Fix deprecation warnings when using ↵ | Jon Leighton | 2012-06-15 | 1 | -3/+8 |
| | | | | config.active_record.mass_assignment_sanitizer= | ||||
* | Fix observers with AR::Model | Jon Leighton | 2012-06-15 | 1 | -0/+1 |
| | |||||
* | Fix config.active_record.whitelist_attributes with AR::Model | Jon Leighton | 2012-06-15 | 1 | -0/+13 |
| | |||||
* | Merge pull request #6676 from aurelian/master | Rafael Mendonça França | 2012-06-12 | 1 | -1/+1 |
|\ | | | | | Don't assign the attributes if the list is empty | ||||
| * | Don't assign the attributes if the list is empty. | Aurelian Oancea | 2012-06-08 | 1 | -1/+1 |
| | | |||||
* | | Ensure that mass assignment options are preserved | Andrew White | 2012-06-10 | 1 | -1/+3 |
|/ | | | | | | | | | | | | | | | | There are two possible scenarios where the @mass_assignment_options instance variable can become corrupted: 1. If the assign_attributes doesn't complete correctly, then subsequent calls to a nested attribute assignment method will use whatever options were passed to the previous assign_attributes call. 2. With nested assign_attributes calls, the inner call will overwrite the current options. This will only affect nested attributes as the attribute hash is sanitized before any methods are called. To fix this we save the current options in a local variable and then restore these options in an ensure block. | ||||
* | Split out most of the AR::Base code into separate modules :cake: | Jon Leighton | 2011-12-15 | 1 | -0/+221 |