José Valim
e596a8e14c
Add the possibility to have several behaviors in AS::Deprecation.
2010-07-01 10:26:45 +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
Wincent Colaiuta
52c56f9f7e
docs: note that mail() accepts arbitrary headers
...
The documentation makes it sound like mail() only accepts a limited
set of headers in the headers hash, but it in fact accepts any
arbitrary headers, and there is a test ("can pass random headers in
as a hash to mail") for it in the test suite.
Signed-off-by: Wincent Colaiuta <win@wincent.com >
2010-06-30 17:07:19 +02:00
bodhi
2eaae1f50b
add note of which configuration option to set in deprecation warning message [ #5012 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-30 16:58:05 +02:00
José Valim
9ab8cfc21a
Improve the idiom used in multibyte chars a bit.
2010-06-30 15:01:23 +02:00
Alex Muntean
265b7c5edf
Fix ActiveSupport::Multibyte::Chars#slice for empty strings when starting offset is negative [ #4717 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-30 15:00:55 +02:00
Norman Clarke
4dbb6e3ff0
Update Unicode database to 5.2.0. [ #5011 state:resolved]
...
Signed-off-by: José Valim <jose.valim@gmail.com >
2010-06-30 13:22:35 +02:00
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
Adam Meehan
8fbb5177a7
accepts_nested_attributes_for typo
2010-06-29 13:32:53 +10: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
Thiago Pradi
0175c470c0
Documentation for Array#sample
2010-06-28 13:31:57 -03: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