Mattias Pfeiffer
6185c4947e
Add :conditions option to uniqueness validator
2012-03-07 13:49:45 +01:00
Vijay Dev
7c90d91c3c
Clean up module docs [ci skip]
...
Removed some useless docstrings and no-doc'ed some.
2012-03-07 01:04:14 +05:30
kennyj
f2b048529b
Revert table_name= needs connection now, so just stub table_name
2012-03-07 02:37:40 +09: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
Christopher Dell
4da6e1cce2
Allow translations of activerecord.errors.messages.record_invalid to be looked up in errors.messages.record_invalid
2012-03-05 00:17:47 +01:00
Michael Koziarski
641a4f6240
Whitelist all attribute assignment by default.
...
Change the default for newly generated applications to whitelist all attribute assignment. Also update the generated model classes so users are reminded of the importance of attr_accessible.
2012-03-05 11:25:25 +13: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
851fd8f572
tidy up formatting
2012-03-04 18:11:15 +00: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
Jon Leighton
7ba0fe2172
Remove unusused variables
2012-03-04 11:23:39 +00:00
Piotr Sarnacki
4443b3647d
Merge pull request #5255 from carlosantoniodasilva/active-record-review
...
Refactor and cleanup in some ActiveRecord modules
2012-03-03 11:10:17 -08: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
Vijay Dev
f9e26940b3
Merge branch 'master' of github.com:lifo/docrails
2012-03-03 22:08:24 +05:30
Carlos Antonio da Silva
50725cec39
Refactor and cleanup in some ActiveRecord modules
...
* Avoid double hash lookups in AR::Reflection when reflecting associations/aggregations
* Minor cleanups: use elsif, do..end, if..else instead of unless..else
* Simplify DynamicMatchers#respond_to?
* Use "where" instead of scoped with conditions hash
* Extract `scoped_by` method pattern regexp to constant
* Extract noisy class_eval from method_missing in dynamic matchers
* Extract readonly check, avoid calling column#to_s twice in persistence
* Refactor predicate builder, remove some variables
2012-03-03 04:09:50 -03:00
Aaron Patterson
b5c939dcb3
only log an error if there is a logger. fixes #5226
2012-03-02 10:25:09 -08:00
Xavier Noria
fcef72890b
revert setting NOT NULL constraints in add_timestamps
...
Commit 3dbedd2 added NOT NULL constraints both to table
creation and modification. For creation the new default
makes sense, but the generic situation for changing a
table is that there exist records. Those records have
no creation or modification timestamps, and in the
general case you don't even know them, so when updating
a table these constraints are not going to work. See
a bug report for this use case in #3334 .
2012-03-01 16:15:00 -08:00
Waseem Ahmad
92887ca315
Add documentation for IndexDefinition.
2012-03-02 01:28:30 +05:30
claudiob
05c6caf48c
Add release dates to documentation
...
Set "March 1, 2012" as the release date for 3.2.2, 3.1.4, 3.0.12
2012-03-01 11:20:03 -08:00
kennyj
adf3cb5adb
Fix warning: assigned but unused variable
2012-03-01 03:09:33 +09:00
Xavier Noria
7d29d7afd5
Merge pull request #5212 from MarkMT/master
...
update_only documentation for accepts_nested_attributes_for
2012-02-28 14:33:19 -08:00
Mark
27da612eec
Modified comments explaining what the update_only option does.
2012-02-28 14:28:44 -06:00
José Valim
5bbd2d3aa8
Merge pull request #5196 from lest/patch-3
...
force datetime attributes to be changed, fix GH #3965
2012-02-28 10:09:40 -08:00
José Valim
d17e44edde
Merge pull request #5197 from lest/patch-4
...
remove unnecessary code
2012-02-27 22:50:24 -08:00
Aaron Patterson
acf7e86024
Revert "only mutate the scope object in the bind
method"
...
This reverts commit 1b9e19cd22f2b5d5e7b82e042f92340822c0f966.
2012-02-27 16:48:34 -08:00
Sergey Nartimov
cb400b0c65
remove unnecessary code
...
it was added in 36129f21b86db4bd69e932e586129e246c2a5ca8
but isn't useful anymore as corresponding tests pass without it
2012-02-28 01:26:39 +03:00
Sergey Nartimov
ddb5d2f756
force datetime attributes to be changed, fix GH #3965
2012-02-28 00:33:50 +03:00
Aaron Patterson
1b9e19cd22
only mutate the scope object in the bind
method
2012-02-27 11:34:41 -08:00
Aaron Patterson
4f82553e54
bind value creation refactoring
2012-02-27 11:29:16 -08:00
Aaron Patterson
2adf78d335
removing dead code
2012-02-27 11:13:56 -08:00
Aaron Patterson
4bc2ae0da1
use bind values for join columns
2012-02-27 11:13:56 -08: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
Aaron Patterson
a19dd29e55
Merge pull request #5173 from kennyj/fix_3931-2
...
Fix type_to_sql with text and limit on mysql/mysql2. Fix GH #3931 (Try again).
2012-02-27 10:21:18 -08:00
Vijay Dev
1e25d6217c
Merge branch 'master' of github.com:lifo/docrails
...
Conflicts:
actionmailer/CHANGELOG.md
2012-02-25 21:52:59 +05:30
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
Paco Guzman
152a393d4f
Update changelogs with rails 3.0-stable branch info
2012-02-25 13:50:08 +01:00
Aaron Patterson
9ef701d659
use regular ruby for fewer method calls. we do not need 🎁 s!
2012-02-24 16:55:22 -08:00
Noah Hendrix
0519567e3d
Fixed typo in composed_of example with Money#<=>, was comparing amount itself instead of other_money.amount
2012-02-24 13:55:24 -06:00
Xavier Noria
9d1f1b1ea9
removes verify_active_connections!
...
The method verify_active_connections! was used in
the old days (up to 2.1 I think) by the dispatcher
to verify the connections, but nowadays we do that
in a different way and this method is obsolete.
2012-02-24 09:11:59 -08:00