aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
...
* Fixed that Base.table_name would expect a parameter when used in ↵David Heinemeier Hansson2004-12-223-8/+5
| | | | | | has_and_belongs_to_many joins [Anna Lissa Cruz] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@244 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that nested transactions now work by letting the outer most ↵David Heinemeier Hansson2004-12-224-18/+20
| | | | | | transaction have the responsibilty of starting and rolling back the transaction. If any of the inner transactions swallow the exception raised, though, the transaction will not be rolled back. So always let the transaction bubble up even when you've dealt with local issues. Closes #231 and #340. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@242 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed validates_{confirmation,acceptance}_of to only happen when the virtual ↵David Heinemeier Hansson2004-12-213-8/+26
| | | | | | attributes are not nil #348 [dpiddy@gmail.com] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@241 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added acts instead of mixinsDavid Heinemeier Hansson2004-12-211-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@240 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Deal with associated classes that doesnt reside in their own filesDavid Heinemeier Hansson2004-12-201-1/+7
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@237 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Checked in the proper version of const_missingDavid Heinemeier Hansson2004-12-201-17/+17
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@236 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Forgot a "or" in InflectorDavid Heinemeier Hansson2004-12-201-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@235 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Switched strategy on the id_before_type_cast problem and just did an ↵David Heinemeier Hansson2004-12-201-1/+5
| | | | | | explicit method so postgresql wouldnt choke on id is null git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@234 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added a require_association hook on const_missing that makes it possible to ↵David Heinemeier Hansson2004-12-202-2/+40
| | | | | | use any model class without requiring it first. Added that Active Record associations are now reloaded instead of cleared to work with the new const_missing hook in Active Record. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@233 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Pulling attributes_from_column_definition should set the primary id to nil ↵David Heinemeier Hansson2004-12-191-1/+1
| | | | | | instead of not at all git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@232 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Scrap thatDavid Heinemeier Hansson2004-12-191-1/+0
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@231 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Dont define respond_to? lookups for primary keyDavid Heinemeier Hansson2004-12-191-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@230 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* FormHelper should only use *_before_type_cast if they available on the modelDavid Heinemeier Hansson2004-12-191-0/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@229 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changed the interface on AbstractAdapter to require that adapters return the ↵David Heinemeier Hansson2004-12-198-14/+39
| | | | | | number of affected rows on delete and update operations. Added that Base.update_all and Base.delete_all return an integer of the number of affected rows #341 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@228 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added that query benchmarking will only happen if its going to be logged ↵David Heinemeier Hansson2004-12-192-1/+3
| | | | | | anyway #344 git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@227 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Reworded a few doc things for better comprehension [dblack]David Heinemeier Hansson2004-12-191-3/+3
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@226 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed small doc bug [dblack]David Heinemeier Hansson2004-12-191-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@225 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added higher_item and lower_item as public methods for acts_as_list #342 ↵David Heinemeier Hansson2004-12-199-81/+200
| | | | | | [Tobias Luetke] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@221 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added breakpoints to stand-alone Active Record, so we can use them in tests ↵David Heinemeier Hansson2004-12-192-0/+606
| | | | | | for AR git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@218 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Set a high default salary within the validation rangeDavid Heinemeier Hansson2004-12-195-5/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@217 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Developer#salary for the type testsDavid Heinemeier Hansson2004-12-195-2/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@216 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added respondence to *_before_type_cast for all attributes to return their ↵David Heinemeier Hansson2004-12-196-14/+32
| | | | | | string-state before they were type casted by the column type. Added use of *_before_type_cast for all input and text fields. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@215 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed the automated timestamping feature when running under Rails' ↵David Heinemeier Hansson2004-12-183-6/+20
| | | | | | development environment that resets the inheritable attributes on each request. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@212 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Base#update_attribute isnt subject to validationDavid Heinemeier Hansson2004-12-182-4/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@210 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made Base#update_attributes actually workDavid Heinemeier Hansson2004-12-181-1/+1
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@209 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base#update_attributes that'll accept a hash of attributes and save ↵David Heinemeier Hansson2004-12-172-1/+18
| | | | | | the record (returning true if it passed validation, false otherwise). Added a return value for Base#update_attribute, so that you get to know whether the save was successful or if it failed validation. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@207 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base.destroy and Base.delete to remove records without holding a ↵David Heinemeier Hansson2004-12-173-7/+38
| | | | | | reference to them first. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@206 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Rails 0.9 is a realityDavid Heinemeier Hansson2004-12-162-2/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@198 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Made the last tweaks before 0.9David Heinemeier Hansson2004-12-162-60/+60
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@197 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Updated and added more documentationDavid Heinemeier Hansson2004-12-165-69/+74
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@193 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base.validates_inclusion_ofDavid Heinemeier Hansson2004-12-163-30/+201
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@192 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Improving documentation...David Heinemeier Hansson2004-12-166-202/+163
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@191 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Renamed Mixins to Acts to resemble the change from include ↵David Heinemeier Hansson2004-12-169-30/+106
| | | | | | ActiveRecord::Mixins::List to acts_as_list and renamed @@default_error_messagess to @@default_error_messages git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@190 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added option for turning off the automated timestampsDavid Heinemeier Hansson2004-12-163-11/+26
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@184 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added assumption that a Symbol-based scope should end in _id unless it does ↵David Heinemeier Hansson2004-12-163-9/+20
| | | | | | so already and that you can pass vanilla string-based scopes as a parameter git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@183 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added assumption that a Symbol-based scope should end in _id unless it does ↵David Heinemeier Hansson2004-12-162-2/+1
| | | | | | so already and that you can pass vanilla string-based scopes as a parameter git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@182 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Make it possible to use a regular scope string in addition to the symbol ↵David Heinemeier Hansson2004-12-161-1/+5
| | | | | | shortcut git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@181 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base.validates_inclusion_of that validates whether the value of the ↵David Heinemeier Hansson2004-12-162-0/+31
| | | | | | specified attribute is available in a particular enumerable object. [what-a-day] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@179 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base.validates_inclusion_of that validates whether the value of the ↵David Heinemeier Hansson2004-12-161-0/+23
| | | | | | specified attribute is available in a particular enumerable object. [what-a-day] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@178 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@177 ↵David Heinemeier Hansson2004-12-162-2/+24
| | | | 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added that Active Records will automatically record creation and/or update ↵David Heinemeier Hansson2004-12-167-229/+220
| | | | | | timestamps of database objects if fields of the names created_at/created_on or updated_at/updated_on are present. [Tobias Luetke] Added acts_as_tree that can decorates an existing class with a many to many relationship with itself. Added acts_as_list that can decorates an existing class with methods like move_higher/lower, move_to_top/bottom. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@176 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base.validates_format_of that Validates whether the value of the ↵David Heinemeier Hansson2004-12-166-13/+59
| | | | | | specified attribute is of the correct form by matching it against the regular expression provided. [Marcel] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@174 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base.default_error_messages as a hash of all the error messages used ↵David Heinemeier Hansson2004-12-152-9/+24
| | | | | | in the validates_*_of so they can be changed in one place [Tobias Luetke] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@173 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added automatic transaction block around AssociationCollection.<<, ↵David Heinemeier Hansson2004-12-152-8/+19
| | | | | | AssociationCollection.delete, and AssociationCollection.destroy_all git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@171 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base.validates_boundries_of that delegates to add_on_boundary_breaking ↵David Heinemeier Hansson2004-12-153-32/+64
| | | | | | #312 [Tobias Luetke] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@166 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that Base#find will return an array if given an array -- regardless of ↵David Heinemeier Hansson2004-12-153-2/+11
| | | | | | the number of elements #270 [Marten] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@164 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Insignificante...David Heinemeier Hansson2004-12-152-1/+2
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@162 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Changed validate_* to validates_*_of, so validate_acceptance becomes ↵David Heinemeier Hansson2004-12-153-71/+41
| | | | | | validates_acceptance_of, and added :on as a configuration option instead of using _on_create/update git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@157 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added tree mixin and unit tests for all the mixinsDavid Heinemeier Hansson2004-12-1515-16/+271
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@156 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Wrapped multi-step operations in transactionsDavid Heinemeier Hansson2004-12-141-16/+22
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@155 5ecf4fe2-1ee6-0310-87b1-e25e094e27de