James MacAulay
16cef77d37
Fix AS::MB::Chars#+ to not alter self [ #4646 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-30 13:22:28 +02:00
José Valim
13a3690271
Add missing CHANGELOG items.
2010-06-30 12:38:25 +02:00
José Valim
06681af518
A couple enhancements to the router:
...
* Allow to use the get :symbol shortcut outside resources scopes as well;
* Fix a bug where :action was not being picked from given options;
* Giving :as option inside a resource now changes just the relative name instead of the full name;
2010-06-30 12:34:15 +02:00
José Valim
ccbb3bb3d8
Clean up the logic to specify the name and path for action a bit.
2010-06-30 11:33:15 +02:00
Santiago Pastorino
7bd00fcb7f
We are trying to test that & escapes here not that & is being escaped, also added a cosmetic change to test_link_tag_with_query_and_no_name
...
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net >
2010-06-29 18:01:32 -07:00
Gonçalo Silva
68bd46ffb9
performance tests now working accurately on 1.9, using Ruby with the GCdata patch
2010-06-29 17:12:37 -07: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
Tekin
d7c2e52c6c
migrations.rb requires active_support/core_ext/module/aliasing [ #5008 state:committed]
...
Signed-off-by: Xavier Noria <fxn@hashref.com >
2010-06-30 00:53:23 +02:00
Xavier Noria
ec3bfa2ead
s/escape_once/html_escape/, since html safety is the contract that now says whether something has to be escaped
2010-06-30 00:32:26 +02:00
Xavier Noria
cba1460a2f
url_for no longer escapes HTML, the :escape option is also gone
...
Rationale: url_for is just a path/URL generator, it is the responsability of the caller to escape conveniently HTML needs it, JavaScript needs different escaping, a text mail needs no escaping at all, etc.
2010-06-30 00:23:13 +02:00
José Valim
0253bf425e
Change :notification to :notify (ht: m4n)
2010-06-29 14:07:54 -07:00
wycats
c1beeb4068
Add CHANGELOG for new deprecation style
2010-06-29 12:25:13 -07:00
wycats
b1cc63c10d
_snowman CHANGELOG (dobry pies)
2010-06-29 12:23:11 -07:00
wycats
d4c7d3fd94
Create a deprecation behavior that triggers a notification for deprecation notices, and make the behaviors independent of the environment names.
...
* In Rails 2.3 apps being upgraded, you will need to add the deprecation
configuration to each of your environments. Failing to do so will
result in the same behavior as Rails 2.3, but with an outputted warning
to provide information on how to set up the setting.
* New Rails 3 applications generate the setting
* The notification style will send deprecation notices using
ActiveSupport::Notifications. Third-party tools can listen in to
these notifications to provide a streamlined view of the
deprecation notices occurring in your app.
* The payload in the notification is the deprecation warning itself
as well as the callstack from the point that triggered the
notification.
2010-06-29 12:20:15 -07:00
J. Pablo Fernández
21957b72ea
Test that adding an index also doesn't raise an exception.
...
[#4809 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-29 21:17:12 +02:00
Paul Barry
0baf83fa18
Replaced statement in comment with an assertion
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-29 21:17:08 +02:00
J. Pablo Fernández
ff22b9d451
Fixed error when removing an index from a table name values, which is a reserved word, with test.
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-29 21:17:07 +02:00
José Valim
af6ec607fa
No need to check if the attribute exists (this is the same behavior as in 2.3) [ #4994 state:resolved] and [ #5003 state:resolved]
2010-06-29 20:15:32 +02:00
José Valim
67582f08bf
Push a failing test for issues [ #4994 ] and [ #5003 ].
2010-06-29 19:50:09 +02:00
Jeremy Kemper
7ea85ff516
Revert "Revert "Name compiled render methods". This caused several failures on AP test suite for 1.9.2."
...
This reverts commit 9013227e00 .
minitest was 'running' compiled templates beginning with test!
2010-06-29 09:22:53 -07:00
José Valim
caab176116
Rename _snowman_ to _snowman to be in sync with _method and _csrf_token.
2010-06-29 18:02:39 +02:00
Neeraj Singh
dabf74b495
array subtraction should be faster than iterating over all the elements
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-29 17:57:06 +02:00
Neeraj Singh
e8f88a3298
splitting a really long line into multiple lines which is easy on eyes
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-29 17:57:01 +02:00
David Trasbo
735a4db685
Remove ActiveRecord::Base#class_name [ #379 state:committed]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-29 17:54:51 +02:00
José Valim
417125e795
Tidy up deprecation message for with_exclusive_scope.
2010-06-29 17:42:20 +02:00
José Valim
bd1666ad1d
Add scoping and unscoped as the syntax to replace the old with_scope and with_exclusive_scope. A few examples:
...
* with_scope now should be scoping:
Before:
Comment.with_scope(:find => { :conditions => { :post_id => 1 } }) do
Comment.first #=> SELECT * FROM comments WHERE post_id = 1
end
After:
Comment.where(:post_id => 1).scoping do
Comment.first #=> SELECT * FROM comments WHERE post_id = 1
end
* with_exclusive_scope now should be unscoped:
class Post < ActiveRecord::Base
default_scope :published => true
end
Post.all #=> SELECT * FROM posts WHERE published = true
Before:
Post.with_exclusive_scope do
Post.all #=> SELECT * FROM posts
end
After:
Post.unscoped do
Post.all #=> SELECT * FROM posts
end
Notice you can also use unscoped without a block and it will return an anonymous scope with default_scope values:
Post.unscoped.all #=> SELECT * FROM posts
2010-06-29 17:18:55 +02:00
José Valim
9013227e00
Revert "Name compiled render methods". This caused several failures on AP test suite for 1.9.2.
...
This reverts commit 2c4f8aae5c .
2010-06-29 10:54:07 +02:00
Santiago Pastorino
093c4eedd0
Remove unneeded reject
2010-06-28 19:14:40 -07:00
Neeraj Singh
40e87ac669
with_exclusive_scope does not work properly if ARel is passed. It does work nicely if hash is passed. Blow up if user is attempting it pass ARel to with_exclusive_scope.
...
[#3838 state:resolved]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-29 01:18:20 +02:00
Jeremy Kemper
f8011e67b0
Use caller for helpers_dir deprecation warnings
2010-06-28 14:48:44 -07:00
Jeremy Kemper
b3318bd937
Slice new buffer from beginning of old buffer to skip encoding special case
2010-06-28 14:46:23 -07:00
Jeremy Kemper
2c4f8aae5c
Name compiled render methods
2010-06-28 14:46:23 -07:00
Jeremy Kemper
198ec03f52
returning -> tap
2010-06-28 14:46:23 -07:00
Jeremy Kemper
ec18719b81
ETag: use body instead of @body since the method will always return a string
2010-06-28 14:46:22 -07:00
Santiago Pastorino
b2633f9f93
Don't store incorrect values in zones_map
...
[#4942 state:committed]
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-28 19:35:33 +02:00
Leigh Caplan
97a92a4cfd
test that unknown zones don't store mapping keys
...
[#4942 ]
Signed-off-by: Santiago Pastorino <santiago@wyeworks.com >
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-28 19:35:27 +02:00
José Valim
b5b42af33f
Make the sentinel flag for route a bit more robust.
2010-06-28 17:09:09 +02:00
José Valim
6dfa8d8e95
Tidy up valid conditions in router a bit.
2010-06-28 16:57:14 +02:00
Andrew White
02a1a4edc8
Add :controller and :action to the list of valid conditions
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-28 16:51:39 +02:00
José Valim
e4f9132f6a
Do not trigger the old mapper to avoid deprecation messages.
2010-06-28 15:36:52 +02:00
Andrew White
0b6ce34223
Restores the escaping of urls generated from hashes. [ #4765 state:resolved]
...
HTML specifications recommend the escaping of urls in web pages,
which url_for does by default for string urls and consquently
urls generated by path helpers as these return strings.
Hashes passed to url_for are not escaped by default and this
commit reverses this default so that they are escaped.
Undoes the changes of this commit:
1b3195b63c
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-28 15:35:38 +02:00
Andrew White
e717631a84
Merge :constraints from scope into resource options [ #2694 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-28 14:22:35 +02:00
rohit
ccb21f20d8
Convert instance_variables to symbols before excluding internal vars [ #4965 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-28 13:27:06 +02:00
Andrew White
19ccd4628c
Remove invalid conditions from route [ #4989 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-28 12:25:19 +02:00
José Valim
6d04fa6dc4
Deprecate the old router DSL. Since it is still used intensively across ActionPack test suite, patches that translates Rails internal tests to the new router DSL are welcome (note though that a few tests shouldn't be translated since they are testing exactly the old mapper API, like the ones in actionpack/test/controller/resource_test.rb and actionpack/test/controller/routing_test.rb)
2010-06-28 12:23:41 +02:00
Bruno Michel
2002e5877e
Strip_tags never ending attribute should not raise a TypeError [ #4870 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-28 11:40:27 +02:00
José Valim
dd8b7417a9
Update CHANGELOGs.
2010-06-28 11:37:14 +02:00
Łukasz Strzałkowski
be994e2c50
Information about new rake task in CHANGELOG
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-28 11:27:15 +02:00
wycats
6fe424aeca
Small typo
2010-06-27 21:50:33 -07:00
Santiago Pastorino
ab96c71a52
Add this rule to run common tests and specifics ones from adapters dir
2010-06-27 21:20:53 -07:00