Commit Graph

2108 Commits

Author SHA1 Message Date
Aslak Hellesøy
10fdf44236 Added protection against duplicate migration names (Aslak Hellesøy) [#112 state:resolved] 2008-05-11 13:37:29 -05:00
Alex MacCaw
4cc594bd70 Fix validates_uniqueness_of for SQL keywords [#23 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-11 19:30:03 +01:00
Pratik Naik
dc4eec1129 Merge docrails:
commit e6afd8b273
Author: Xavier Noria <fxn@hashref.com>
Date:   Thu May 8 23:49:36 2008 +0200

    Overall documentation improvement and markup corrections. Zillion changes.

commit 2fead68b31
Author: Austin Putman <austin@emmanuel.local>
Date:   Wed May 7 19:35:46 2008 -0700

    Documented class methods on ActionController::Routing.  These are dangerous, and mostly used for testing.

commit f5b84182db
Author: Teflon Ted <github@rudiment.net>
Date:   Wed May 7 16:08:49 2008 -0400

    Added explanation about errant inflections not being patched in the future in order to avoid breaking legacy applications.

commit 370f4f5172
Author: Sunny Ripert <negatif@gmail.com>
Date:   Wed May 7 14:00:59 2008 +0200

    Applied list conventions in AR::Base

commit 5bd18429f0
Author: Sunny Ripert <negatif@gmail.com>
Date:   Wed May 7 13:53:35 2008 +0200

    Renamed Options list to Attributes list whenever they weren't option hashes in AR::Base

commit d912bd5672
Author: Yaroslav Markin <yaroslav@markin.net>
Date:   Wed May 7 13:50:28 2008 +0400

    Add a filter_parameter_logging usage hint to generated ApplicationController.
    This may help to remind the developer to filter sensitive information from application logs.
    Closes #11578

commit b243de0db3
Author: Jack Danger Canty <git@6brand.com>
Date:   Tue May 6 23:39:47 2008 -0700

    doc: disambiguating an example ActiveRecord class

commit f81d771f06
Author: Jack Danger Canty <git@6brand.com>
Date:   Tue May 6 23:35:05 2008 -0700

    doc: ActiveRecord::Reflection::AssociationReflection#through_reflection

    Added documentation demonstrating the use of #through_reflection for
    finding intervening reflection objects for HasManyThrough
    and HasOneThrough.

commit ae6b46f00b
Author: Cheah Chu Yeow <chuyeow@gmail.com>
Date:   Wed May 7 13:47:41 2008 +0800

    Document AttributeAssignmentError and MultiparameterAssignmentErrors.

commit 8f463550b5
Author: John Barnette <jbarnette@gmail.com>
Date:   Tue May 6 22:46:44 2008 -0700

    Killing/fixing a bunch of outdated language in the AR README.

commit aca44bcd92
Author: Cheah Chu Yeow <chuyeow@gmail.com>
Date:   Wed May 7 13:34:52 2008 +0800

    Make a note about ActiveResource::Timeouterror being raised when ARes calls timeout.

commit 284a930a93
Author: Jonathan Dance <jd@wuputah.com>
Date:   Tue May 6 14:58:26 2008 -0400

    improvements to the page caching docs

commit 9482da6213
Author: Sunny Ripert <negatif@gmail.com>
Date:   Mon May 5 18:13:40 2008 +0200

    validates_numericality_of() "integer" option really is "only_integer"

commit e9afd6790a
Author: Sunny Ripert <negatif@gmail.com>
Date:   Mon May 5 12:11:59 2008 +0200

    Harmonized hash notation in AR::Base

commit 67ebf14a91
Author: Sunny Ripert <negatif@gmail.com>
Date:   Mon May 5 12:06:19 2008 +0200

    Turned options into rdoc-lists in AR::Base

commit 0ec7c0a41d
Author: Marshall Huss <mwhuss@Macbook.local>
Date:   Sun May 4 23:21:33 2008 -0400

    Added information of how to set element_name in the case the user has a name confliction with an existing model

Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-09 10:40:50 +01:00
gbuesing
79e44a5ee4 Base#instantiate_time_object: eliminate check for Time.zone, since we can assume this is set if time_zone_aware_attributes is set to true 2008-05-08 22:21:51 -05:00
gbuesing
618d695f11 Updating changelogs 2008-05-08 21:58:37 -05:00
gbuesing
06a7c2948a Time.zone.parse: return nil for strings with no date information 2008-05-08 21:30:17 -05:00
gbuesing
328fada610 ActiveRecord time zone aware attributes: blank string is treated as nil when assigned to writer 2008-05-08 20:31:54 -05:00
Scott Fleckenstein
eb5b93be74 Fix Time.zone.parse from stripping time zone information and make Time aware attribute methods use Time.zone.parse instead of to_time 2008-05-08 19:25:31 -05:00
Andreas Neuhaus
bcb090c56b Calling ActiveRecord#inspect on an unloaded association won't wipe the collection [#9 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-05-08 00:04:53 -05:00
Tarmo Tänav
0a21193dc6 create_table :force => true no longer tries to drop a non-existing table
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-05-07 13:01:46 +12:00
Tarmo Tänav
8877ab5852 Added AbstractAdapter#table_exists? and made AbstractAdapter#table implementation non-optional
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-05-07 13:01:46 +12:00
John Devine
8ded457b1b Added logic to associations.rb to make sure select_for_limited_ids
includes joins that are needed to reach tables listed in the :order
or :conditions options if they are not joined directly to the main
active_record table.

Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#109 state:resolved]
2008-05-06 21:47:10 +12:00
Frederick Cheung
fbebdb0c09 Ensure correct record is returned when preloading has_one where more than one row exists
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#73 state:closed]
2008-05-06 21:08:52 +12:00
Kyle Hargraves
04d8554860 Restore dump_schema_information connection adapter method 2008-05-05 23:25:22 -07:00
David Heinemeier Hansson
96980bd561 Added change_table for migrations (Jeff Dean) [#71 state:resolved] 2008-05-03 11:29:47 -05:00
Xavier Noria
64092de257 Improve documentation coverage and markup
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-02 14:45:23 +01:00
Jeremy Kemper
e931394d09 Fix failing associate_with_create tests inserting null first_name 2008-05-01 13:53:10 -07:00
David Heinemeier Hansson
ab4d455d6d Added missing files 2008-05-01 15:03:16 -05:00
David Heinemeier Hansson
e2af713d1c Merge branch 'master' of git@github.com:rails/rails 2008-05-01 14:32:50 -05:00
Steven Soroka
9c20391bbe best solution?
Signed-off-by: Steven Soroka <ssoroka78@gmail.com>
2008-05-01 14:22:55 -05:00
David Heinemeier Hansson
6f20efdaf7 Fixed AssociationsPreload such that it doesnt require foreign keys to be integers (fcheung) [#33 state:resolved] 2008-04-30 23:30:50 -05:00
David Heinemeier Hansson
dd120ede53 Added block-setting of attributes for Base.create like Base.new already has (Adam Meehan) [#39 state:resolved] 2008-04-30 23:14:32 -05:00
Rhett Sutphin
b4c33711c5 Fixed fixture caching with prefixed or suffixed tables.
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-04-30 16:59:22 -05:00
David Heinemeier Hansson
c353794dff Fixed that pessimistic locking you reference the quoted table name (Josh Susser) [#67 state:resolved] 2008-04-30 15:04:08 -05:00
Frederick Cheung
a6cca5d1fc Ensure postgresql tests work when starting from scratch. 2008-04-30 21:54:54 +12:00
David Heinemeier Hansson
874603ce8d Change tests against all scope to base scope as all is now used as a finder alias 2008-04-30 00:25:52 -05:00
David Heinemeier Hansson
10ef65a3b0 Fixed that change_column should be able to use :null => true on a field that formerly had false [Nate Wiger] [#26 state:resolved] 2008-04-29 16:52:52 -05:00
David Heinemeier Hansson
5514baf63d Merge branch 'master' of git@github.com:rails/rails 2008-04-29 16:43:47 -05:00
David Heinemeier Hansson
0780563ae7 Default integer need not specify a limit [#20371 state:resolved] (matthuhiggins) 2008-04-29 16:43:23 -05:00
Jeremy Kemper
1c66ece244 Note that allow_concurrency = true means you need to verify_active_connections! to clear out connections assigned to stale threads. 2008-04-28 22:05:06 -07:00
David Heinemeier Hansson
0a6980f2dc Let Base.all use conditions etc like first/last 2008-04-28 13:27:52 -05:00
Aliaksey Kandratsenka
361aaa04ef Remove old :limit removal code from find_initial, logic is now handled in the preloading and eager loading code.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-04-27 20:01:05 +12:00
Frederick Cheung
44d2142352 Ensure table names are quoted by the association preloading code.
[#45 state:resolved]

Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-04-26 12:14:50 +12:00
David Heinemeier Hansson
a37546517d Added that the MySQL adapter should map integer to either smallint, int, or bigint depending on the :limit just like PostgreSQL [DHH] 2008-04-25 16:33:00 -05:00
David Dollar
6c1c16bfd9 Fixes a subtle bug when using symbols for key definitions in habtm associations 2008-04-23 21:02:00 +12:00
Joshua Bates
b6aa0e13b4 Fix include? on has_many collections with finder_sql to fall back to Array include? rather than try to use SQL.
[#18 state:resolved]
2008-04-23 20:18:09 +12:00
Frederick Cheung
ae51013c3f Provide data for the key column otherwise adding a unique index will fail. [#30 state:closed] 2008-04-23 14:24:20 +12:00
Frederick Cheung
a4fc93c3a9 Use schema.rb for all databases
Move adapter specific schema into their own files

Signed-off-by: Michael Koziarski <michael@koziarski.com>
2008-04-22 13:55:13 +12:00
Steven Soroka
f386676661 Use the rails user when creating and dropping the database rather than falling back to the currently logged in user who may or may not have CREATE / DROP privileges and no password.
Closes #11564 (trac)
2008-04-21 16:42:15 +12:00
Frederick Cheung
55622e0bde Avoid adding two DISTINCT statements to queries in sqlite 2. 2008-04-21 11:47:15 +12:00
Frederick Cheung
a2028a7d7b Fix sqlite adapter to work with the quoted table names returned by later versions of sqlite3. 2008-04-21 11:45:48 +12:00
Joshua Peek
46ab7422d9 Use define_callbacks helper for ActiveRecord validations. 2008-04-20 11:45:44 -05:00
Joshua Peek
cf04e62127 Tidy up ActiveSupport::Callbacks::CallbackChain instance API. 2008-04-17 23:30:01 -05:00
Ian White
82b4faf812 Fix migrations when migrating to a specified version number with a fresh database [#1 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-04-17 13:43:47 -05:00
Joshua Peek
9e53b63601 Ignore debug logs and ensure ActiveResource's log is cleaned up. 2008-04-16 13:17:03 -05:00
Michael Koziarski
2e74177d0b Revert "Ensure that save on child object fails for invalid belongs_to association. Closes #11555. [rubyruy]"
This reverts commit c67e985994.
2008-04-11 16:04:11 +12:00
Rick Olson
ed99dda174 Change validates_uniqueness_of :case_sensitive option default back to true (from [9160]). Love your database columns, don't LOWER them. [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9248 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-10 18:06:05 +00:00
Pratik Naik
c67e985994 Ensure that save on child object fails for invalid belongs_to association. Closes #11555. [rubyruy]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9247 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-10 13:48:43 +00:00
Rick Olson
8a5a9dcbf6 Add support for interleaving migrations by storing which migrations have run in the new schema_migrations table. Closes #11493 [jordi]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9244 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-09 16:20:15 +00:00
Rick Olson
78c2d9fc22 ActiveRecord::Base#sum defaults to 0 if no rows are returned. Closes #11550 [kamal]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9243 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-08 05:20:33 +00:00