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
Josh Peek
4b68982f64
Improve ActiveRecord::Base#table_name unit tests for nested classes. Closes #10289 . [scott_willson]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9237 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-07 19:44:37 +00:00
Pratik Naik
4f39382a2f
Ensure that respond_to? considers dynamic finder methods. Closes #11538 . [floehopper]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9235 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-06 22:26:15 +00:00
Pratik Naik
5b822aca4b
Split associations_test.rb into multiple files based on association type. [Pratik]
...
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9233 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-06 03:01:09 +00:00