Commit Graph

21557 Commits

Author SHA1 Message Date
José Valim
5bf3d46bec Revert "Add :use_include option to allow user to explicitly use Range#include? method in Ruby 1.9"
Use :with => range.to_a instead.

This reverts commit f6540211b5b9133c9f93c11655a04d613c237e67.
2011-04-11 17:41:33 +02:00
David Heinemeier Hansson
b93199b547 Keep the same API semantics for update/delete as we had for XML (just return 200 OK, no body) 2011-04-11 15:50:05 +02:00
David Heinemeier Hansson
1d8bf4f4f9 Cant use inclusion in commands/application.rb as the frameworks havent all been required yet 2011-04-11 15:25:39 +02: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
Prem Sichanugrist
d6edaeeaf8 Fix failing test case on master
It turned out that I overlook at some replacements ..
2011-04-10 22:40:21 -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
Prem Sichanugrist, Brian Morearty, John Reitano
635d991683 Add support for Object#in? and Object#either? in Active Support [#6321 state:committed]
This will allow you to check if an object is included in another object
or the list of objects or not.

This patch is derived from patch by Brian Morearty and John Reitano on
Lighthouse ticket. I've rewrite it and make sure that we support both
'another object' and 'list of objects' version, as it surely be useful
to support both.
2011-04-11 03:17:08 +08:00
José Valim
62b2755f7a Remove dead branch code that appeared back in a merge. 2011-04-10 13:03:49 +02:00
Prem Sichanugrist
f6540211b5 Add :use_include option to allow user to explicitly use Range#include? method in Ruby 1.9
In Ruby 1.9 we're currently use `Range#cover?` to fix the performance problem. However, there might be the case that you want to use `Range#include?` instead. This patch will give you that option.
2011-04-10 18:49:28 +08:00
Prem Sichanugrist
58594be680 Add support for proc or lambda as an option for InclusionValidator, ExclusionValidator, and FormatValidator
You can now use a proc or lambda in :in option for InclusionValidator and ExclusionValidator, and :with, :without option for FormatValidator
2011-04-10 18:49:28 +08:00
Prem Sichanugrist
22a3416298 Add --old-style-hash option to force creating old style hash on Ruby 1.9
That means if you don't like the new syntax, you can pass --old-style-hash to force Rails to generate code with hash rockets.
2011-04-10 16:47:52 +08:00
Prem Sichanugrist
74960c3976 Rails will now generate Ruby 1.9 style hash when running app generator on Ruby 1.9.x
The new hash syntax of Ruby 1.9 looks more superior, so we decide to switch to it in the places that appropriate.
2011-04-10 16:47:51 +08:00
Prem Sichanugrist
63cd92f9f3 Rails will now generate Ruby 1.9 style hash when running scaffold_controller generator on Ruby 1.9.x
The new hash syntax of Ruby 1.9 looks more superior, so we decide to switch to it in the places that appropriate.

This patch has been requested by DHH.
2011-04-10 16:47:50 +08:00
Prem Sichanugrist
c0efc4009a Make scaffold_controller generator generate code for JSON response instead of XML
It seems like a lot of people are using JSON in their API more than XML nowadays, so Rails should follow that convention by providing the JSON format block in scaffold_controller by default.

This patch has been requested by DHH
2011-04-10 16:47:49 +08: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
Aaron Patterson
bd79172e43 make turn a soft dependency. generate a Gemfile that contains turn and require turn if it is available 2011-04-08 09:40:33 -07:00
James Robinson
2cdc1f0cd5 Make csrf_meta_tags use the tag helper
Improved formatting of csrf_helper and improved test coverage
2011-04-08 02:21:08 +02:00
Aaron Patterson
a7c5d40d80 Merge branch 'master' of github.com:rails/rails
* 'master' of github.com:rails/rails:
  Cache flash now
  Revert "Use freeze instead of close!"
  Revert "Eagerly load Signed and Permanent cookies"
  cookies here
  Eagerly load Signed and Permanent cookies
  Use freeze instead of close!
2011-04-07 09:35:24 -07:00
Santiago Pastorino
0e624ce9eb Cache flash now 2011-04-07 09:27:00 -03:00
Santiago Pastorino
03d561ad77 Revert "Use freeze instead of close!"
This reverts commit 29592a7f09dda2e7e1e0a915d9230fe6a9b5c0af.
2011-04-07 09:26:04 -03:00
Santiago Pastorino
5b0149a17a Revert "Eagerly load Signed and Permanent cookies"
This reverts commit dffeda377021ba8691381195f5a2889f8e040b93.
2011-04-07 09:20:56 -03:00
Santiago Pastorino
17205435f8 cookies here 2011-04-07 09:20:35 -03:00
Santiago Pastorino
dffeda3770 Eagerly load Signed and Permanent cookies 2011-04-07 09:15:28 -03:00
Aaron Patterson
1e90229e04 many args does not make sense with the current implementation because of how use works 2011-04-06 18:13:16 -07:00
Aaron Patterson
32f876786a getting the flash hash under test 2011-04-06 18:01:03 -07:00
Aaron Patterson
76c2ea7882 favor composition over inheritance, have FlashHash delegate to a Hash 2011-04-06 17:26:55 -07:00
Santiago Pastorino
29592a7f09 Use freeze instead of close! 2011-04-06 20:53:48 -03:00
Aaron Patterson
0ca69ca65f CookieJar should prefer composition over inheritance 2011-04-06 16:27:05 -07:00
Santiago Pastorino
9f765f4e09 Delete useless arguments 2011-04-06 19:18:41 -03:00
Santiago Pastorino
ed04243629 Delete useless env variable 2011-04-06 19:15:33 -03:00
Santiago Pastorino
0d45567362 Add tests to verify that signed and permanent cookies raises if someone tries
to modify the cookies when it was already streamed back to the client
or converted to HTTP headers
2011-04-06 19:12:35 -03:00
Santiago Pastorino
0e4748cd41 Make process reuse the env var passed as argument 2011-04-06 16:37:55 -03:00
Santiago Pastorino
0c5aded092 raise if someone tries to modify the cookies when it was already streamed back to the client or converted to HTTP headers 2011-04-06 15:47:58 -03:00
Santiago Pastorino
90ecad0bc9 Add ClosedError message to the initializer 2011-04-06 15:45:23 -03:00
Aaron Patterson
2e757bc298 do not return html safe strings from auto_link 2011-04-05 16:22:53 -07:00
Josh Kalderimis
e9020b4b5d added find_zone and find_zone! to AS timezones and changed the AS Railtie to use find_zone! as well as adding Railtie tests
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-04-05 17:12:09 -03:00
Marc-Andre Lafortune
1c4db4d7c3 Raise on invalid timezone
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com>
2011-04-05 17:11:13 -03: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
Josh Kalderimis
cb9e501a28 AM register_interceptor and register_observer only constantize if the argument is a String 2011-04-06 02:45:37 +08:00
John Firebaugh
d907f3cb5c Rename test directory to match code directory
Hopefully "serializeration" is not an in joke that I missed.
2011-04-06 01:50:35 +08:00
Santiago Pastorino
d7a5638dfb raise if someone tries to modify the flash when it was already streamed back to the client or converted to HTTP headers 2011-04-05 10:41:34 -03: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
Josh Kalderimis
284ca810c1 remove AM delegating register_observer and register_interceptor to Mail and instead implement smarter versions allowing for string class names, also added proper Railtie support with tests.
Signed-off-by: José Valim <jose.valim@gmail.com>
2011-04-04 10:49:09 +02: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
Santiago Pastorino
16e5d158c2 Add railties to the LOAD_PATH if running from a Rails checkout 2011-04-03 19:18:57 -03:00
Xavier Noria
3e24e9ebc2 Merge branch 'master' of git://github.com/lifo/docrails 2011-04-03 22:22:03 +02:00