Aaron Patterson
2aed63eb52
our method is modifying the original array, so refactor to use destructive methods
2010-07-12 17:58:48 -07:00
Aaron Patterson
2c3aab32dd
PostgreSQLAdapter#select_raw removing dead code
2010-07-12 17:52:53 -07:00
Aaron Patterson
79e9f4a318
PostgreSQLAdapter#select_raw use each_with_index to avoid multiple array lookups
2010-07-12 17:49:12 -07:00
Aaron Patterson
8521cdf03d
PostgreSQLAdapter#select_raw fields and results are empty even if ntuples is 0
2010-07-12 17:44:15 -07:00
Aaron Patterson
c9710a43ff
refactor PostgreSQLAdapter#result_as_array to create fewer Range objects
2010-07-12 17:00:29 -07:00
Aaron Patterson
7c4e0401d2
cleaning up PostgreSQLAdapter#select
2010-07-12 16:54:00 -07:00
Aaron Patterson
cee2ff2768
these strings do not need to be frozen
2010-07-12 16:43:20 -07:00
Aaron Patterson
8fb838ed16
use Hash#each to avoid a second hash lookup
2010-07-12 16:32:45 -07:00
José Valim
6b29dc876f
Just add connection management middleware if running in a concurrent environment.
2010-07-12 20:18:54 +02:00
José Valim
da84c9d0d2
Remove old rubygems require.
2010-07-12 20:18:04 +02:00
Aaron Patterson
f33ee69d59
reducing funcalls, cleaning up primary key methods for sqlite adapter
2010-07-10 13:30:49 -07:00
Aaron Patterson
0bac4c7e02
primary key behavioral tests
2010-07-10 13:29:12 -07:00
Aaron Patterson
51783c0298
behavioral tests for sqlite adapter
2010-07-10 13:21:56 -07:00
Aaron Patterson
1e1af8f612
adding more behavioral tests for the sqlite adapter
2010-07-09 17:12:29 -07:00
Xavier Noria
2f04c87855
Merge remote branch 'docrails/master'
2010-07-09 22:08:24 +02:00
José Valim
d9ebc76d70
Refactor previous commits a bit.
2010-07-08 23:45:10 +02:00
David Trasbo
786342e17f
Return from ActiveRecord::Base#attributes= unless value is a hash [ #4070 state:committed]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-08 23:24:20 +02:00
Neeraj Singh
1e53404fe9
reset_counter should work with non-traditional belongs_to and polymorphic belongs_to
...
[#4984 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-08 23:24:12 +02:00
José Valim
87f64ef05e
Improve a bit the code in latest commits.
2010-07-08 22:59:41 +02:00
Neeraj Singh
01629d1804
This patch changes update_attribute implementatino so:
...
- it will only save the attribute it has been asked to save and not all dirty attributes
- it does not invoke callbacks
- it does change updated_at/on
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-08 22:43:18 +02:00
Neeraj Singh
690352dce4
consolidating updated_at and updated_on
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-08 22:41:58 +02:00
Grant Ammons
17650e394f
Eager loading :through associations will join the :source model if there are :conditions. [ #2362 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-08 22:36:26 +02:00
Ken Collins
0e9bc23c0e
Fix the #using_limitable_reflections? helper to work correctly by not examining the length of an array which contains false/true, hence always passing. [ #4869 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-08 22:34:34 +02:00
Thiago Pradi
8b2330ebc3
Tests to specify the behaviour of ActiveRecord::Migrator.get_all_versions() [ #5066 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-08 22:29:08 +02:00
Josh Kalderimis
b09fd9ccbb
removed an old unused method in AR which removed readonly attributes
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-08 22:29:08 +02:00
Neeraj Singh
a4f5f0547f
removing unused method
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-08 22:29:08 +02:00
Aaron Patterson
7b0f8534c7
moving parse_sqlite_config to the sqlite3_connection method (where it belongs) [ #5071 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-07-08 11:52:38 -07:00
Aaron Patterson
9ac9c35117
removing useless code. [ #5070 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-07-08 11:45:42 -07:00
Mislav Marohnić
00f1cd71a9
fix ActiveRecord destroy_all so it returns destroyed records
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-07-08 11:35:17 -07:00
Josh Kalderimis
4b66aab00f
mass_assignment_security moved from AR to AMo, and minor test cleanup
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-08 18:28:45 +02:00
Josh Kalderimis
7c86e8e21b
minor changes to mass assignment security patch to bring it in line with rails standards
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-08 18:28:38 +02:00
Eric Chapweske
606088df3f
Mass assignment security refactoring
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-08 18:28:32 +02:00
Neeraj Singh
723a0bbe3a
This test never runs and it has never run. Since the day this file
...
was created this test has name not beginning with test_. Also this
test is trying to use has_many on another has_many which is not
supported.
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-08 18:02:07 +02:00
Xavier Noria
a9587935de
copy-edits some docs
2010-07-08 16:53:37 +02:00
Neeraj Singh
4a1207d540
Merge branch 'master' of github.com:lifo/docrails
2010-07-08 10:09:39 -04:00
Neeraj Singh
f6fa6cf611
clarifying how to create non standard primary key
2010-07-08 10:09:20 -04:00
Ben Somers
de51cbccf8
Fixed gruoped_by_title spelling [ #5063 state:committed]
...
Signed-off-by: Xavier Noria <fxn@hashref.com >
2010-07-08 00:26:25 +02:00
Aaron Patterson
c58e7a71b5
adding some behavioral tests for the sqlite adapter. [ #5065 state:resolved]
...
Signed-off-by: wycats <wycats@gmail.com >
2010-07-07 14:25:22 -07:00
Xavier Noria
64c75d6618
Merge remote branch 'docrails/master'
2010-07-07 12:58:46 +02:00
Xavier Noria
92ff71bb14
documents automatic management of join models in hmt associations, in particular the gotcha that deletion is direct
2010-07-06 17:29:34 +02:00
Neeraj Singh
c1fc59c7ac
added more info about << operation in associations
2010-07-06 10:09:54 -04:00
José Valim
a5dda97602
Define a convention for descendants and subclasses.
...
The former should be symmetric with ancestors and include all children. However, it should not include self since ancestors + descendants should not have duplicated. The latter is symmetric to superclass in the sense it only includes direct children.
By adopting a convention, we expect to have less conflict with other frameworks, as Datamapper. For this moment, to ensure ActiveModel::Validations can be used with Datamapper, we should always call ActiveSupport::DescendantsTracker.descendants(self) internally instead of self.descendants avoiding conflicts.
2010-07-05 13:01:27 +02:00
Neeraj Singh
d10aaefcfd
clarifying the comments regarding base_class declaration
2010-07-01 23:06:58 -04:00
José Valim
53b34e8476
Avoid calls to Rails::Application since this is not the official API.
...
Your application should *always* reference your application const (as Blog::Application) and Rails.application should be used just internally.
2010-07-01 18:43:44 +02:00
James Le Cuirot
f3fedd7f84
Don't remove scheduled destroys when loading an association. [ #4642 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-07-01 01:06:58 +02:00
José Valim
57d750edf7
Make relation a private method.
2010-07-01 00:09:55 +02:00
Xavier Noria
c63cf7bf0d
Merge remote branch 'rails/master'
2010-06-30 20:47:26 +02:00
Jeremy Kemper
b07e6fdaa0
Support any mysql-like adapter
2010-06-30 10:38:49 -07:00
José Valim
13a3690271
Add missing CHANGELOG items.
2010-06-30 12:38:25 +02:00
Aaron Patterson
3f563f1696
AssociationCollection#create_by_*, find_or_create_by_* work properly now. [ #1108 state:resolved]
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-06-29 16:13:40 -07:00