David Heinemeier Hansson
8f0f078637
Make #destroy write 1 line into log (instead of 3) (Dmitry Sokurenko) [ #689 status:committed]
2008-10-29 10:53:33 +01:00
David Heinemeier Hansson
c94ba8150a
Fixed that serialized strings should never be type-casted (i.e. turning "Yes" to a boolean)(Andreas Korth) [ #857 state:committed]
2008-10-27 17:16:45 +01:00
Ken Miller
8a77c4abfa
Fixed issue where block is not called on the very first invocation of a find_or_create_by_ automatic finder.
...
[#1224 state:committed]
2008-10-24 21:35:05 +02:00
Pratik Naik
9cb5400871
Merge docrails
2008-10-16 22:13:06 +02:00
Pratik Naik
a2932784bb
Merge docrails
2008-10-05 22:16:26 +01:00
Eloy Duran
8d337e9ec2
Dynamic finders should use the ActiveRecord::Base::find method instead of ::find_initial, :find_last, and ::find_all.
...
This is so when people override ActiveRecord::Base::find, the new ::find method will also be invoked by the dynamic finders.
Associations for instance do go through ::find, so this makes it more consistent.
Also removed the unnecessary deprecation silence blocks.
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1162 state:committed]
2008-10-03 21:28:11 +02:00
Pivotal Labs
487758b3b8
Allowed passing arrays-of-strings to :join everywhere. Merge duplicate join strings to avoid table aliasing problems.
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1077 state:committed]
2008-09-24 13:26:06 +02:00
Hongli Lai (Phusion
46939a9b5a
Add Model#delete instance method, similar to Model.delete class method. [ #1086 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-09-21 22:53:44 +01:00
gbuesing
d95943b276
Multiparameter attributes skip time zone conversion for time-only columns [ #1030 state:resolved]
2008-09-14 18:16:50 -05:00
Manfred Stienstra
babbc1580d
Fix ActiveRecord::Base.quote_bound_value for ActiveSupper::Multibyte::Chars values.
...
- Adds String#acts_like_string?
- Adds Chars#acts_like_string?
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#1029 state:committed]
2008-09-11 22:51:26 +02:00
Tarmo Tänav
7c9851dbb6
Support :limit on update_all so that has_many with :limit can be safely updated
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-09-10 13:41:49 +02:00
David Heinemeier Hansson
6dc9173a63
Missing doc updates
2008-09-09 23:59:54 -05:00
miloops
567392bff3
Added find_last_by dynamic finder [status:committed #762 ]
...
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com >
2008-09-09 23:44:52 -05:00
Jeremy Kemper
4f6875296f
Revert "Revert "Raise UnknownAttributeError when unknown attributes are supplied via mass assignment""
...
This reverts commit 41efd73887 .
2008-09-08 09:45:26 -07:00
Jeremy Kemper
41efd73887
Revert "Raise UnknownAttributeError when unknown attributes are supplied via mass assignment"
...
This reverts commit 108db00aa9 .
2008-09-06 21:01:45 -07:00
David Heinemeier Hansson
227ee2ecb4
Use a more sensible resolution on the new millisecond benchmarks
2008-09-05 14:58:34 +02:00
David Heinemeier Hansson
de0e7507de
Changed all benchmarking reports to be in milliseconds
2008-09-05 14:22:57 +02:00
Pratik Naik
6ef35461dc
Merge docrails
2008-09-03 17:58:47 +01:00
Clemens Kofler
288e947ae1
Some performance goodness for inheritable attributes.
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-09-03 00:55:23 +02:00
Nick Sieger
ca6d71753f
Deprecate allow_concurrency and make it have no effect
2008-08-29 14:12:12 -05:00
Andrew White
db22c89543
Merge scoped :joins together instead of overwriting them. May expose scoping bugs in your code!
...
[#501 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-28 12:07:15 -07:00
Josh Susser
1092c181b5
add dynamic finder bang version to raise RecordNotFound
...
[#905 state:resolved]
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-25 23:33:16 -07:00
Josh Susser
143f5fbb21
refactor dynamic finder name matching into its own class
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2008-08-25 23:32:20 -07:00
Josh Susser
e48e77e022
coerce blank strings to nil values for boolean and integer fields
...
[#860 state:resolved]
2008-08-22 16:26:40 -07:00
Jeremy Kemper
a6e05b18d6
Merge commit 'sven/i18n' into i18n
2008-08-22 12:44:14 -07:00
Jeremy Kemper
6e3d2a7996
Revert "Performance: freeze cached rows instead of duping"
...
This reverts commit cd8e653d5b .
2008-08-21 21:40:49 -07:00
Jeremy Kemper
a5eb297424
Revert "coerce blank strings to nil values for boolean and integer fields"
...
This reverts commit aee14630d4 .
[#860 state:incomplete]
2008-08-21 21:34:37 -07:00
Josh Susser
aee14630d4
coerce blank strings to nil values for boolean and integer fields
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
2008-08-21 19:33:25 +02:00
Sven Fuchs
aad429a46e
Merge branch 'master' into i18n
2008-08-21 19:04:39 +02:00
Philip Hallstrom
49c0e1e594
Fix generated WHERE IN query for named scopes. [ #583 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-21 16:11:28 +01:00
Iain Hecker
81e14fada1
Added Base.human_name method
2008-08-20 17:53:04 +02:00
Jeremy Kemper
cd8e653d5b
Performance: freeze cached rows instead of duping
2008-08-18 17:34:38 -07:00
Tarmo Tänav
2b69a636c4
Fixed STI type condition for eager loading of associations
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-08-16 20:41:19 +01:00
Iain Hecker
ffeab4e0c1
Cleaned up ActiveRecord i18n scoping
2008-08-14 10:48:33 +02:00
Tarmo Tänav
a5aad2e81f
Fixed Time/Date object serialization
...
Time/Date objects used to be converted to_s instead of to_uaml
which made them unserializable.
2008-08-12 20:29:07 -07:00
Trevor Turk
81c12d1f63
move logging of protected attribute removal into log_protected_attribute_removal method
...
Signed-off-by: Michael Koziarski <michael@koziarski.com >
[#804 status:committed]
2008-08-12 09:52:06 +02:00
Tarmo Tänav
656f0e7c6c
Fix file permissions
...
Signed-off-by: Joshua Peek <josh@joshpeek.com >
2008-07-31 16:36:23 -05:00
Pratik Naik
108db00aa9
Raise UnknownAttributeError when unknown attributes are supplied via mass assignment
2008-07-31 15:56:46 +01:00
Pratik Naik
6e75455125
Merge docrails changes
2008-07-28 12:33:24 +01:00
Nik Wakelin
bbab639136
Set config.active_record.timestamped_migrations = false to have migrations with numeric prefix instead of UTC timestamp. [ #446 state:resolved]
...
Signed-off-by: Pratik Naik <pratiknaik@gmail.com >
2008-07-17 02:54:45 +01:00
Pratik Naik
0432d15164
Merge with docrails.
2008-07-16 13:01:23 +01:00
miloops
459e5817a5
update_counters should update nil values.
...
This allows counter columns with default null instead of requiring default 0.
[#493 state:resolved]
2008-07-15 16:21:11 -07:00
Pratik Naik
cd994eff9a
Allow conditions on multiple tables to be specified using hash.
...
Examples:
User.all :joins => :items, :conditions => { :age => 10, :items => { :color => 'black' } }
Item.first :conditions => { :items => { :color => 'red' } }
Note : Hash key in :conditions is referring to the actual table name or the alias defined in query.
2008-06-28 01:27:51 +01:00
Jeremy Kemper
071fe79279
Include cache key in ModelName
2008-06-24 22:07:09 -07:00
Mark Catley
0fd3e4cd2b
Fix column collision with named_scope and :joins. [ #46 state:resolved]
2008-06-22 19:21:15 -07:00
Tarmo Tänav
509374ebe2
Named bind variables can now be used with postgresql-style typecasts
...
For example :conditions => ['stringcol::integer = :var', { :var => 10 }]
will no longer raise an exception about ':integer' having a missing value.
2008-06-22 16:16:06 -07:00
Jeremy Kemper
e328bdaab6
Make Base.merge_conditions public
2008-06-17 16:01:48 -07:00
Jeremy Kemper
e6c1f46eb0
Silence scope resolution warnings
2008-06-11 13:17:23 -07:00
Pratik Naik
89ea7bee36
Simplify ActiveRecord::Base#update_attribute
2008-06-07 01:25:27 +01:00
Jeremy Kemper
fd40fbc198
Generate less garbage when expanding range bind variables in conditions
2008-06-06 03:54:16 -07:00