Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Move newly added multiparameter tests to base_test file | Carlos Antonio da Silva | 2012-06-28 | 1 | -35/+1 |
| | | | | | All other multiparameter assignment tests are in the same file, so it makes sense to have all of them here. | ||||
* | Skip test_setting_time_attribute because Oracle database | Yasuo Honda | 2012-06-28 | 1 | -0/+2 |
| | | | | does not have TIME data type. | ||||
* | Fixes #6825, adds tests covering cases and error possibilities, also changes ↵ | Mauricio Linhares | 2012-06-27 | 1 | -0/+33 |
| | | | | SQLite3 driver to correctly generate a time column instead of datetime | ||||
* | Remove unused assignments from activerecord tests | Mark Rushakoff | 2012-04-29 | 1 | -2/+2 |
| | |||||
* | %s/find(:\(first\|last\|all\), \([^()]*\))/scoped(\2).\1/gcI amongst other ↵ | Jon Leighton | 2012-04-27 | 1 | -4/+4 |
| | | | | things | ||||
* | remove calls to find(:first), find(:last) and find(:all) | Jon Leighton | 2012-04-26 | 1 | -1/+1 |
| | |||||
* | attribute_present? should return false for empty strings | Jacob Green | 2012-03-06 | 1 | -0/+3 |
| | |||||
* | Fix warning: assigned but unused variable | kennyj | 2012-03-01 | 1 | -3/+0 |
| | |||||
* | force datetime attributes to be changed, fix GH #3965 | Sergey Nartimov | 2012-02-28 | 1 | -0/+13 |
| | |||||
* | move id_before_type_cast to PrimaryKey module | Sergey Nartimov | 2012-02-16 | 1 | -0/+8 |
| | |||||
* | Revert PR#5001 "removed unuseful require for reply as we are not using ↵ | Vishnu Atrai | 2012-02-12 | 1 | -0/+1 |
| | | | | | | require model" This reverts commit 7381596ea32aff47222af89e4bc66000f4597acb. | ||||
* | removed unuseful require for reply as we are not using require model | Karunakar (Ruby) | 2012-02-11 | 1 | -1/+0 |
| | |||||
* | fixing the list of cached columns | Aaron Patterson | 2012-02-09 | 1 | -1/+3 |
| | |||||
* | only exclude serialized columns from cacheable columns | Aaron Patterson | 2012-02-09 | 1 | -1/+1 |
| | |||||
* | Test that #[] and #[]= keep working when #read_attribute and ↵ | Tom Stuart | 2012-01-11 | 1 | -0/+33 |
| | | | | #write_attribute are overridden | ||||
* | Test ActiveRecord::Base#[]= as well as #write_attribute | Tom Stuart | 2012-01-11 | 1 | -1/+7 |
| | |||||
* | Fix #4046. | Jon Leighton | 2011-12-23 | 1 | -0/+20 |
| | |||||
* | remove deprecated underscore versions of attribute methods | Sergey Nartimov | 2011-12-21 | 1 | -8/+0 |
| | |||||
* | handle not only strings in date type cast | Sergey Nartimov | 2011-12-19 | 1 | -0/+8 |
| | |||||
* | Stop the build asploding on 1.8.7 | Jon Leighton | 2011-12-14 | 1 | -0/+4 |
| | |||||
* | Fix #3837. | Jon Leighton | 2011-12-03 | 1 | -0/+12 |
| | | | | | We also need to time zone convert time zone aware attributes when accessed via read_attribute, not only when via direct access. | ||||
* | Get rid of the underscore versions of attribute methods! | Jon Leighton | 2011-12-01 | 1 | -0/+5 |
| | | | | This makes me happy! | ||||
* | don't alter global state in test | Jon Leighton | 2011-11-30 | 1 | -2/+3 |
| | |||||
* | If the table behind has no primary key, do not ask again and just return nil. | Julius de Bruijn | 2011-11-30 | 1 | -0/+5 |
| | |||||
* | omg computer science! | Jon Leighton | 2011-11-30 | 1 | -5/+1 |
| | | | | | | | Implement a mini state machine for serialized attributes. This means we do not have to deserialize the values upon initialization, which means that if we never actually access the attribute, we never have to deserialize it. | ||||
* | Use inheritance to avoid special-case code for the 'id' method | Jon Leighton | 2011-11-30 | 1 | -1/+1 |
| | |||||
* | Update ActiveRecord#attribute_present? to work as documented | Justin Mazzi | 2011-11-05 | 1 | -0/+18 |
| | | | | | | | "Returns true if the specified attribute has been set by the user or by a database load and is neither nil nor empty?" Fixes #1613 | ||||
* | Stop trying to be clever about when to define attribute methods. | Jon Leighton | 2011-09-14 | 1 | -24/+0 |
| | | | | | | | | | There is no meaningful performance penalty in defining attribute methods, since it only happens once. There is also no reason *not* to define them, since they get thrown in an included module, so they will not 'overwrite' anything. In fact, this is desirable, since it allows us to call super. | ||||
* | Deprecate using method_missing for attributes that are columns. | Jon Leighton | 2011-09-13 | 1 | -0/+15 |
| | | | | | | This shouldn't ever happen unless people are doing something particularly weird, but adding a deprecation in case there are bugs not caught by our tests. | ||||
* | Let Ruby deal with method visibility. | Jon Leighton | 2011-09-13 | 1 | -3/+3 |
| | | | | | | Check respond_to_without_attributes? in method_missing. If there is any method that responds (even private), let super handle it and raise NoMethodError if necessary. | ||||
* | Always generate attribute methods on the base class. | Jon Leighton | 2011-09-13 | 1 | -0/+16 |
| | | | | | | | | | | | | | | This fixes a situation I encountered where a subclass would cache the name of a generated attribute method in @_defined_class_methods. Then, when the superclass has it's attribute methods undefined, the subclass would always have to dispatch through method_missing, because the presence of the attribute in @_defined_class_methods would mean that it is never generated again, even if undefine_attribute_methods is called on the subclass. There various other confusing edge cases like this. STI classes share columns, so let's just keep all the attribute method generation state isolated to the base class. | ||||
* | Revert "Merge pull request #2543 from htanata/unused_require_in_ar_test" | Santiago Pastorino | 2011-08-16 | 1 | -0/+1 |
| | | | | | This reverts commit 87152f2604e73b218df90befda576f0acfed0bbf, reversing changes made to 0d3615f04c79f6e90d8ab33fdfc920b8faac9cb8. | ||||
* | Remove unused require. | Hendy Tanata | 2011-08-16 | 1 | -1/+0 |
| | |||||
* | Resolve warnings by instantizing @attrubtes as nil | Brian Cardarella | 2011-07-30 | 1 | -0/+1 |
| | |||||
* | please use ruby -I lib:test path/to/test.rb, or export RUBY_OPT | Aaron Patterson | 2011-06-06 | 1 | -1/+1 |
| | |||||
* | Refactor Active Record test connection setup. Please see the ↵ | Jon Leighton | 2011-06-04 | 1 | -1/+1 |
| | | | | RUNNING_UNIT_TESTS file for details, but essentially you can now configure things in test/config.yml. You can also run tests directly via the command line, e.g. ruby path/to/test.rb (no rake needed, uses default db connection from test/config.yml). This will help us fix the CI by enabling us to isolate the different Rails versions to different databases. | ||||
* | Fix broken test. You know, the merge button will be the end of us... | Jon Leighton | 2011-06-01 | 1 | -3/+3 |
| | |||||
* | Adding comment | Arun Agrawal | 2011-06-01 | 1 | -0/+1 |
| | |||||
* | AttributeMethodTest test fix #jruby | Vishnu Atrai | 2011-06-01 | 1 | -1/+5 |
| | |||||
* | Test AR::Base#inspect on an allocated object not yet initialized | Franck Verrot | 2011-05-25 | 1 | -0/+8 |
| | |||||
* | Undo performances regressions I introduced in ↵ | Jon Leighton | 2011-04-15 | 1 | -0/+11 |
| | | | | bbe0a507f287c20ab4ae8a244fbfc810665deda5 and add test for an edge case. Add comments to explain the intent of the code. | ||||
* | Remove unnecessary code from define_read_method and add assertion to make ↵ | Jon Leighton | 2011-04-15 | 1 | -0/+1 |
| | | | | sure the underscored version is actually generated | ||||
* | Remove `#among?` from Active Support | Prem Sichanugrist | 2011-04-13 | 1 | -1/+1 |
| | | | | | | After a long list of discussion about the performance problem from using varargs and the reason that we can't find a great pair for it, it would be best to remove support for it for now. It will come back if we can find a good pair for it. For now, Bon Voyage, `#among?`. | ||||
* | Change Object#either? to Object#among? -- thanks to @jamesarosen for the ↵ | David Heinemeier Hansson | 2011-04-12 | 1 | -1/+1 |
| | | | | suggestion! | ||||
* | Using Object#in? and Object#either? in various places | Prem Sichanugrist | 2011-04-11 | 1 | -1/+2 |
| | | | | There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?. | ||||
* | cleaning up typecast test a little | Aaron Patterson | 2011-03-26 | 1 | -6/+8 |
| | |||||
* | refactoring tz to a variable rather than repeating it | Aaron Patterson | 2011-03-26 | 1 | -2/+4 |
| | |||||
* | adding a test for attributes after type cast. thanks nragaz. :heart: | Aaron Patterson | 2011-03-26 | 1 | -0/+17 |
| | |||||
* | fixing whitespace errors. :bomb: | Aaron Patterson | 2011-03-25 | 1 | -2/+2 |
| | |||||
* | Fix before_type_cast for timezone aware attributes by caching converted ↵ | Adam Meehan | 2011-03-23 | 1 | -15/+11 |
| | | | | value on write. Also remove read method reload arg on timezone attributes. |