Commit Graph

3553 Commits

Author SHA1 Message Date
José Valim
58a55595ca Merge pull request #5306 from kennyj/fix_69c7f02
Change the message string to use in  test case.
2012-03-08 04:00:02 -08:00
Jon Leighton
104eebb4cc Merge pull request #5289 from rafaelfranca/fix-through-associations
Fix has_many through associations when mass_assignment_sanitizer is strict
2012-03-08 00:13:08 -08:00
Aaron Patterson
447ecb08ca Merge pull request #5162 from kennyj/schema_cache_dump
[Proposal] Schema cache dump
2012-03-07 16:44:50 -08:00
Rafael Mendonça França
c9c7ee7710 Not need to pass join attributes to association build 2012-03-07 21:07:29 -03:00
kuahyeow
a149612c0b Add tests to test that through associations are not readonly, and we can update the records we retrive from the association 2012-03-08 09:48:59 +13:00
Aaron Patterson
89cef0757a Merge pull request #5315 from travisjeffery/enhance_postgresql_adapter_schema_support
Enhance PostgreSQL Adapter schema support
2012-03-07 10:58:55 -08:00
Travis Jeffery
8dc1a625c8 Adds #create/drop_schema on the PostgreSQL Adapter. 2012-03-07 17:55:33 +00:00
kennyj
37802dd51e Change the string to use in test case. 2012-03-07 23:33:52 +09:00
Jacob Green
04aca254cc attribute_present? should return false for empty strings 2012-03-06 22:32:29 -08:00
Travis Jeffery
577971f05a Add #schema_names to PostgreSQL Adapter. 2012-03-07 05:27:12 +00:00
Rafael Mendonça França
e9bf0e3157 Add test case to has_many through association when mass_assignment_sanitizer is
:strict
2012-03-05 16:58:19 -03:00
Jean Boussier
c97a166691 Fix #5069 - Protect foreign key from mass assignment throught association builder 2012-03-05 10:08:09 -08:00
José Valim
c5a47b3207 Merge pull request #5274 from tigrish/master
Update I18n defaults for activerecord.errors.messages.record_invalid
2012-03-05 09:45:09 -08:00
Christopher Dell
922c9e2d27 Tweak activerecord/test/cases/validations/i18n_generate_message_validation_test.rb 2012-03-05 18:29:03 +01:00
Christopher Dell
0eada113c3 Test that RecordInvalid exception's translation falls back to the :errors namespace 2012-03-05 18:06:37 +01:00
Carlos Antonio da Silva
357f1c6850 Fix message assertions for quoting database name in "show tables" for mysql 2012-03-04 16:35:36 -03:00
Jon Leighton
f8f66a3792 Merge pull request #5268 from carlosantoniodasilva/ar-new-record-warning
Fix ActiveRecord warning in tests with Marshal
2012-03-04 10:34:34 -08:00
Jon Leighton
2fdb5219fb Merge pull request #5267 from kennyj/fix_4674
Fix GH #4674. Reset column information and sequence name when setting table_name.
2012-03-04 10:03:34 -08:00
kennyj
69c7f02488 Fix GH #3163. Should quote database on mysql/mysql2. 2012-03-05 00:07:20 +09:00
Carlos Antonio da Silva
9b9357b26e Initialize @stale_state to nil in association
This apparently fix the warning related to @new_record variable not
being initialized in AR's test suit, when an association is built and
the object is marshalled/loaded.

See these tests in AR's base_test.rb:

test_marshalling_with_associations
test_marshalling_new_record_round_trip_with_associations

Closes #3720.
2012-03-04 11:46:30 -03:00
kennyj
9a2e164d73 Added test case for new_record round trip with associations problem 2012-03-04 11:42:20 -03:00
kennyj
200d994870 Don't clear sequence name when we explicitly assign it. 2012-03-04 22:24:02 +09:00
kennyj
640f6c201d Fix GH #4674. Reset column information and sequence name when setting table_name. 2012-03-04 22:22:27 +09:00
Jon Leighton
223549f420 Fix rake test_sqlite3_mem 2012-03-04 12:15:11 +00:00
Vishnu Atrai
d8996d3cab remove usages of AS::OrderedHash 2012-03-03 23:48:29 +05:30
Vijay Dev
2aec357b7e Merge pull request #4984 from raghunadhd/change_orderhash
Refactored code
2012-03-03 09:05:23 -08:00
Aaron Patterson
b5c939dcb3 only log an error if there is a logger. fixes #5226 2012-03-02 10:25:09 -08:00
kennyj
adf3cb5adb Fix warning: assigned but unused variable 2012-03-01 03:09:33 +09:00
kennyj
5ca4fc9581 Add support schema cache dump and load. 2012-03-01 00:52:04 +09:00
Sergey Nartimov
ddb5d2f756 force datetime attributes to be changed, fix GH #3965 2012-02-28 00:33:50 +03:00
Aaron Patterson
699e460be2 Merge pull request #5168 from kennyj/fix_5152
[PostgreSQL] Remove NULLS FIRST/LAST. Closes #5152
2012-02-27 10:27:08 -08:00
kennyj
fe7cacb510 Fix type_to_sql with text and limit on mysql/mysql2. Fix GH #3931. 2012-02-26 00:35:58 +09:00
kennyj
404b73bce1 Remove NULLS FIRST/LAST. closes #5152 2012-02-25 23:01:43 +09:00
William Lawson
977f4bdee6 Restored ability to identify ID and Sequence from tables relying on a nonmatching sequence default value for PK. 2012-02-20 07:10:46 -05:00
Aaron Patterson
aaff1a4101 database connections are automatically established after forking.
Connection pools are 1:1 with pids.
2012-02-16 14:33:38 -08:00
Sergey Nartimov
ec4759d205 move id_before_type_cast to PrimaryKey module 2012-02-16 19:49:38 +03:00
Akira Matsuda
bdb6c4ef86 A test case for GH #3544 to ensure that a field named field works fine 2012-02-14 17:14:22 +09:00
Aaron Patterson
04c0aea47a Merge pull request #5000 from flavorpill/master-with-multidb-association-fix
Fix associations with per-class/multiple database connections
2012-02-13 09:11:33 -08:00
Vishnu Atrai
33e37b89fb Revert PR#5001 "removed unuseful require for reply as we are not using require model"
This reverts commit 7381596ea32aff47222af89e4bc66000f4597acb.
2012-02-12 16:07:51 +05:30
Vishnu Atrai
ed8fc19c6a fix build 5001, model reply is required in cases/primary_keys_test too! 2012-02-12 14:02:24 +05:30
Vishnu Atrai
a62088a4da fix build #5001 reply model required in relations_test 2012-02-12 13:35:50 +05:30
Santiago Pastorino
347e0a6033 Merge pull request #5003 from kennyj/fix_warning_20120211
Fix warning: The method name is a duplicate and wrong.
2012-02-11 06:44:56 -08:00
kennyj
7f14508eef Fix warning: The method name is a duplicate and wrong. 2012-02-11 23:27:14 +09:00
Karunakar (Ruby)
7381596ea3 removed unuseful require for reply as we are not using require model 2012-02-11 18:54:20 +05:30
Aaron Patterson
c50cb4aa39 PG column consults oid types when typecasting 2012-02-10 16:06:39 -08:00
Rick Martinez
30b6d4f7f1 added test for #3732 2012-02-10 17:35:22 -05:00
Aaron Patterson
f7b915b507 Merge branch 'joelhoffman-postgres_schema_builder' into instance_reader
* joelhoffman-postgres_schema_builder:
  Also support writing the hstore back to the database
  Hstore values are all strings
  string_to_hstore / hstore_to_string, serializing
  don't test schema where hstore not installed
  schema dumper tests for hstore
  Additional hstore tests, supporting null values, better compliance with postgres docs
  add hstore to postgres native types and defaults

Conflicts:
	activerecord/lib/active_record/connection_adapters/postgresql_adapter.rb
2012-02-10 10:55:34 -08:00
Aaron Patterson
522b72fd28 Merge branch 'master' into instance_reader
* master:
  Fix GH #4720. Routing problem with nested namespace and already camelized controller option.
  make Range#overlaps? accept Range of Time
  improved test case for partial indices
  Made schema dumper recognize partial indices' where statements
  Added where option to add_index to support postgresql partial indices
2012-02-10 10:41:24 -08:00
Aaron Patterson
3092324ef4 Merge pull request #4956 from mhfs/pg_partial_indices
Add support for partial indices to PostgreSQL adapter
2012-02-10 10:23:42 -08:00
Raghunadh
fa46468112 Refactored code 2012-02-10 11:22:20 +05:30