aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
Commit message (Collapse)AuthorAgeFilesLines
...
* Rearranging dependenciesDavid Heinemeier Hansson2004-12-293-126/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@279 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Moved support into Active SupportDavid Heinemeier Hansson2004-12-299-885/+57
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@277 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base.default_timezone accessor that determines whether to use ↵David Heinemeier Hansson2004-12-284-11/+28
| | | | | | Time.local (using :local) or Time.utc (using :utc) when pulling dates and times from the database. This is set to :local by default. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@271 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that the const_missing autoload assumes the requested constant is set ↵David Heinemeier Hansson2004-12-282-2/+12
| | | | | | by require_association and calls const_get to retrieve it. If require_association did not set the constant then const_get will call const_missing, resulting in an infinite loop #380 [bitsweat] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@270 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added the possibility for adapters to overwrite add_limit! to implement a ↵David Heinemeier Hansson2004-12-283-88/+53
| | | | | | different limiting scheme than "LIMIT X" used by MySQL, PostgreSQL, and SQLite. git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@269 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Releasing Rails 0.9.2David Heinemeier Hansson2004-12-222-32/+33
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@260 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added scope option to validation_uniqueness #349 [Kent Sibilev]David Heinemeier Hansson2004-12-223-2/+28
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@259 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added allow_nil options to validates_inclusion_of so that validation is only ↵David Heinemeier Hansson2004-12-223-1/+17
| | | | | | triggered if the attribute is not nil [what-a-day] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@258 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added work-around for PostgreSQL and the problem of getting fixtures to be ↵David Heinemeier Hansson2004-12-222-0/+21
| | | | | | created from id 1 on each test case. This only works for auto-incrementing primary keys called "id" for now #359 [Scott Baron] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@257 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed mixin test and fixtures to work with postgresql #353 [Scott Baron]David Heinemeier Hansson2004-12-222-10/+14
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@253 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added Base#clear_association_cache to empty all the cached associations #347 ↵David Heinemeier Hansson2004-12-222-0/+9
| | | | | | [Tobias Luetke] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@252 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Added more informative exceptions in establish_connection #356 [bitsweat]David Heinemeier Hansson2004-12-222-4/+5
| | | | git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@249 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that options[:counter_sql] was overwritten with interpolated sql ↵David Heinemeier Hansson2004-12-222-1/+4
| | | | | | rather than original sql #355 [bitsweat] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@248 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* Fixed that overriding an attribute's accessor would be disregarded by ↵David Heinemeier Hansson2004-12-222-4/+12
| | | | | | add_on_empty and add_on_boundary_breaking because they simply used the attributes[] hash instead of checking for @base.respond_to?(attr.to_s). [Marten] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@247 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
* 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