Aaron Patterson
b53ffb35e0
stop using deprecated methods in arel
2011-04-11 15:50:05 -07:00
David Heinemeier Hansson
d1575ae1b9
Change Object#either? to Object#among? -- thanks to @jamesarosen for the suggestion!
2011-04-12 00:23:07 +02:00
Aaron Patterson
5918b868b2
remove so many nested if statements
2011-04-11 15:19:10 -07:00
Aaron Patterson
622f23b604
wrap the pg_get_serial_sequence function and reuse it for the default sequence name
2011-04-11 14:38:42 -07:00
Aaron Patterson
75dc9fbac7
cache table exists queries in prepared statement cache
2011-04-11 14:12:31 -07:00
Aaron Patterson
f6c0c8ff61
only use the primary_key method, refactor schema and table name parsing
2011-04-11 14:08:27 -07:00
Aaron Patterson
a9e8554b46
use prepared statements for primary key queries
2011-04-11 13:57:00 -07:00
Aaron Patterson
5df072d64b
last insert id can never be called, so remove that code path
2011-04-11 13:10:20 -07:00
Aaron Patterson
9ba94c8fc4
we know the table and pk, so we can calculate a default sequence name
2011-04-11 10:54:08 -07:00
Aaron Patterson
cbb65de1a6
always look up pk and sequence unless both are provided
2011-04-11 10:37:23 -07:00
Aaron Patterson
302b6f3f73
pg does not know the insert_id in advance, so super will never return true
2011-04-11 10:31:13 -07:00
Aaron Patterson
4c30304e15
updating the docco for ActiveRecord::Result
2011-04-11 10:10:01 -07:00
Aaron Patterson
269cd1b3c5
implement exec_query on mysql2 adapter
2011-04-11 10:10:01 -07:00
Aaron Patterson
8a11799a47
make sqlite insert_sql more consistent with other adapters
2011-04-11 10:10:01 -07:00
Aaron Patterson
58259bbf29
adding exec_insert for postgresql
2011-04-11 10:10:01 -07:00
Aaron Patterson
b1ba04b32b
fixing variable name in mysql test
2011-04-11 10:10:01 -07:00
Aaron Patterson
90a371496a
properly name schema queries for the logger
2011-04-11 10:10:01 -07:00
Aaron Patterson
3d96e6217b
adding mysql adapter test case
2011-04-11 10:10:00 -07:00
Aaron Patterson
0845b5062d
adding client_encoding method for discovering the encoding set for this client, testing exec_insert on a string
2011-04-11 10:10:00 -07:00
Aaron Patterson
f9d3f01866
properly name schema queries for logging
2011-04-11 10:10:00 -07:00
Aaron Patterson
32dbf00d99
adding exec_insert to sqlite3
2011-04-11 10:10:00 -07:00
Aaron Patterson
c4fc396300
adding a case_sensitive_modifier for forcing comparisons to be case sensitive
2011-04-11 10:02:39 -07:00
Aaron Patterson
35b2715456
only support pg >= 8.2, so no need to check
2011-04-11 09:08:45 -07:00
Aaron Patterson
1f3d3eb49d
pg should define insert_sql so that query cache actually works for inserts
2011-04-10 22:45:14 -07:00
Aaron Patterson
743b6631df
adding pg support notes to the changelog
2011-04-10 22:34:27 -07:00
Aaron Patterson
35dba50be9
community support for pg < 8.2 has ended, so we can drop support for those versions
2011-04-10 22:30:27 -07:00
Brian Cardarella
a30b440deb
Refactored uniqueness validator to use Arel instead of hardcoded SQL
2011-04-10 21:28:12 -07:00
Prem Sichanugrist
a9f3c9da01
Using Object#in? and Object#either? in various places
...
There're a lot of places in Rails source code which make a lot of sense to switching to Object#in? or Object#either? instead of using [].include?.
2011-04-11 03:17:09 +08:00
José Valim
62b2755f7a
Remove dead branch code that appeared back in a merge.
2011-04-10 13:03:49 +02:00
Aaron Patterson
508c679f11
moving sqlite_adapter_tests to sqlite3_adapter_test so that the tests are actually run. 💣
2011-04-08 11:22:21 -07:00
Emilio Tagua
18dde7bf4f
Disable IdentityMap in log tests, it's not important and when running tests rake task it logs more messages in the tested buffer.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-04-05 22:08:00 +02:00
Durran Jordan
a9b4b5da7c
Destroying records via nested attributes works independent of reject_if:
...
- When a :_destroy truthiness is provided in the attributes hash, the
record should get destroyed regardless of the result of the proc or
method supplied to :reject_if. (If :allow_destroy is true)
[#6006 state:committed]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
2011-04-05 10:38:54 -03:00
Emilio Tagua
454ec93ff7
Add log message when loading records from Identity Map.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-04-04 10:48:17 +02:00
Emilio Tagua
b35617235d
Use IM when trying to load records using ID.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2011-04-04 10:48:12 +02:00
Xavier Noria
3e24e9ebc2
Merge branch 'master' of git://github.com/lifo/docrails
2011-04-03 22:22:03 +02:00
Akira Matsuda
bd3cdeea35
s/ERb/ERB/g
...
The author of ERB sais, his eRuby implementation was originally named "ERb/ERbLight" and then renamed to "ERB" when started bundled as a Ruby standard lib.
http://www2a.biglobe.ne.jp/~seki/ruby/erb.html
2011-04-03 12:47:51 +09:00
Santiago Pastorino
99da42c299
Gem::Specification#has_rdoc= is deprecated since rubygems 1.7.0
2011-04-02 00:35:33 -03:00
Ryan Bigg
cf07da0929
Symbol to proc is preferred over longer form of map
2011-03-31 06:59:48 +11:00
Ryan Bigg
04d5decfd3
Cleanup of named_scope documentation
2011-03-31 06:48:05 +11:00
Ryan Bigg
7a34ab7d60
Fix typo in named_scope documentation
2011-03-31 06:48:05 +11:00
Eadz
6a1715111e
add space to conform with style
2011-03-31 06:48:05 +11:00
Eadz
45d5d6b268
Documented undocumented feature: Class methods on your model are automatically available on scopes
2011-03-31 06:48:05 +11:00
Aaron Patterson
cfb6f77ac0
TableAlias leg ordering has changed, so change accordingly
2011-03-30 09:54:46 -07:00
Aaron Patterson
2be383b946
test against AR class rather than the relation (thanks Andrew White!)
2011-03-29 17:50:39 -07:00
Aaron Patterson
0471fc9f1c
Merge branch 'master' into zomg
...
* master: (51 commits)
order is not guaranteed by this select, so add an order and call first!
oracle stores this with microseconds, so convert to seconds before comparing
make sure that active connections are not cleared during test when an exception happens
clearing active connections in the ConnectionManagement middleware if an exception happens
proxy body responses so we close database connections after body is flushed
Pass the proper method_name instead of hardcoding to action_name.
Quote find_in_batches ORDER BY clause [#6620 state:resolved]
Delegate first!, last!, any? and many? to scoped
Dont call authenticate_or_request_with_http_basic twice
Remove 'warning: ambiguous first argument' when running ActionPack tests
Change exists? so that it doesn't instantiate records [#6127 state:resolved]
Move mapper_test to the appropriate location
Update the wildcard route to be non-greedy by default, therefore be able to match the (.:format) segment [#6605 state:resolved]
Fix examples
Added Base.http_basic_authenticate_with to do simple http basic authentication with a single class method call [DHH]
make sure we have an active database connection before running each connection management test
adding active_connections? to the connection pool for finding open connections
adding active_connection? to the connection pool
testing app delegation from the ConnectionManagement middleware
namespacing connection management tests. ❤️
...
2011-03-29 17:38:43 -07:00
Aaron Patterson
58becf1165
order is not guaranteed by this select, so add an order and call first!
2011-03-29 17:27:32 -07:00
Aaron Patterson
6067d29a1f
oracle stores this with microseconds, so convert to seconds before comparing
2011-03-29 17:09:22 -07:00
Aaron Patterson
c7b7c6ad1c
make sure that active connections are not cleared during test when an exception happens
2011-03-29 15:47:16 -07:00
Aaron Patterson
3b2a032677
clearing active connections in the ConnectionManagement middleware if an exception happens
2011-03-29 15:42:32 -07:00
Aaron Patterson
e5246092d1
proxy body responses so we close database connections after body is flushed
2011-03-29 15:37:07 -07:00