Commit Graph

9134 Commits

Author SHA1 Message Date
kennyj
6ebfe8b996 Fix build. Bump Journey requirements to 2.0.0. 2012-07-24 02:25:38 +09:00
Andrew White
4d7a102790 Bump Journey requirements to 1.0.4
There are some Action Pack tests for regressions from 3.1 that require
a later version of Journey to pass so bump to the current version.
2012-07-23 07:08:38 +01:00
Rafael Mendonça França
580fa0c7be Add one more test case to make sure that data attributes are being
escaped
2012-07-22 13:57:42 -03:00
Rafael Mendonça França
440a5ebd7a Merge pull request #7123 from nashby/data-in-options
don't escape options in option_html_attributes method
2012-07-22 08:10:31 -07:00
Vasiliy Ermolovich
dacbcbe557 don't escape options in option_html_attributes method
we don't need to escape values in this method as we pass
these html attributes to `tag_options` method that handle escaping as
well.

it fixes the case when we want to pass html5 data options
2012-07-22 11:37:54 +03:00
Carlos Galdino + Rafael Mendonça França
5b9d0a6272 Remove deprecation warnings 2012-07-21 16:47:58 -03:00
Carlos Galdino + Rafael Mendonça França
0106e5fe44 Add back :disable_with and change deprecation horizon to 4.1 2012-07-21 16:25:34 -03:00
Carlos Galdino + Rafael Mendonça França
9345a116af Add back :confirm and change deprecation horizon to 4.1 2012-07-21 15:20:26 -03:00
Xavier Noria
3561e85bb1 copy-edits 9674d2c 2012-07-21 07:30:53 +02:00
Xavier Noria
d7211488bd Merge pull request #7100 from shigeya/fix_mime_responds_to_doc
Clarification to doc of ActionController::MimeResponse.respond_to
2012-07-20 22:19:23 -07:00
Rafael Mendonça França
f3e4d2097d Merge pull request #7099 from f1sherman/sweeper-clean-up-if-exception-raised
Clean up Sweeper controller accessor when an Error is raised
2012-07-20 06:30:19 -07:00
Brian John
35fe3107a3 Clean up Sweeper controller accessor when an Error is raised 2012-07-20 05:49:45 -05:00
Andrew White
cabb4471af Don't assume resource param is :id when using shallow routes
Since #5581 added support for resources with custom params we should
not assume that it is :id when using shallow resource routing.
2012-07-20 10:50:38 +01:00
Andrew White
27619e34d4 Support constraints on resource custom params when nesting
The Mapper looks for a :id constraint in the scope to see whether it
should apply a constraint for nested resources. Since #5581 added support
for resource params other than :id, we need to check for a constraint on
the parent resource's param name and not assume it's :id.
2012-07-20 10:50:11 +01:00
Shigeya Suzuki
9674d2c70f Clarification to doc of ActionController::MimeResponse.respond_to
- #respond_to's documentation refer to .respond_to, but it was
  written as just <respond_to>. Added class name for clarification.
2012-07-19 09:57:34 +09:00
Carlos Galdino
fb8a830a32 Remove :confirm in favor of :data => { :confirm => 'Text' } option
This applies to the following helpers:
`button_to`
`button_tag`
`image_submit_tag`
`link_to`
`submit_tag`
2012-07-18 10:32:17 -03:00
Sergey Pchelincev
1b5298e805 add lazy look up in abstract controller's translate method 2012-07-18 10:33:14 +03:00
Dmitry Vorotilin
eb19ca3457 Common behavior with adding formats to lookup_context for TemplateRenderer and PartialRenderer 2012-07-18 10:48:24 +04:00
Andrew White
d8745decaf Add support for optional root segments containing slashes
Optional segments with a root scope need to have the leading slash
outside of the parentheses, otherwise the generated url will be empty.
However if the route has non-optional elements then the leading slash
needs to remain inside the parentheses otherwise the generated url
will have two leading slashes, e.g:

Blog::Application.routes.draw do
  get '/(:category)', :to => 'posts#index', :as => :root
  get '/(:category)/author/:name', :to => 'posts#author', :as => :author
end

$ rake routes
  root GET /(:category)(.:format)              posts#index
author GET (/:category)/author/:name(.:format) posts#author

This change adds support for optional segments that contain a slash,
allowing support for urls like /page/2 for the root path, e.g:

Blog::Application.routes.draw do
  get '/(page/:page)', :to => 'posts#index', :as => :root
end

$ rake routes
root GET /(page/:page)(.:format) posts#index

Fixes #7073
2012-07-17 19:49:44 +01:00
kennyj
414008f98e Fix class_eval without __FILE__ and __LINE__. 2012-07-18 01:16:55 +09:00
Vijay Dev
a80e1e437e Merge branch 'master' of github.com:lifo/docrails 2012-07-15 19:36:19 +05:30
Wojciech Wnętrzak
5fcf885d58 Updated with_routing example to 3.x syntax [ci skip] 2012-07-13 08:15:21 +02:00
Evan Travers
201156b6a9 add second t to overwritten
fixing a misspelling in the documentation
2012-07-12 11:21:09 -05:00
Selem Delul
783fc29389 Fix code comment to reflect its intent. 2012-07-11 06:19:38 +03:00
Piotr Sarnacki
542637e679 Fix indentation. 2012-07-11 02:07:25 +02:00
Piotr Sarnacki
df40d79fdc Don't raise an error if http auth token isn't well formatted
When someone sends malformed authorization header, like:

    Authorization: Token foobar

given token should be just ignored and resource should not be authorized,
instead of raising error. Before this patch controller would return 401 header
only for well formed tokens, like:

    Authorization: Token token=foobar

and would return 500 in former case.
2012-07-11 01:56:38 +02:00
Carl Lerche
afa68eb176 Raise a helpful error message on #mount misuse 2012-07-10 16:17:02 -07:00
Rusty Geldmacher
1a935ad7c6 Fixed bug creating invalid HTML in select options
When a select tag is created for a field with errors, then the inserted
options will errantly have a <div class="field_with_errors"> wrapping
them.
2012-07-10 15:03:37 -04:00
Aaron Patterson
d481170251 deprecate describe without a block.
minitest/spec provides `describe`, so deprecate the rails version and
have people use the superclass version
2012-07-09 13:13:59 -07:00
Carlos Antonio da Silva
d1c4acc669 Remove AS declarative extension from erb tag test
The extension was removed in 22bc12ec374b8bdeb3818ca0a3eb787dd3ce39d8,
making "test" an alias for minitest's "it".
2012-07-08 20:10:49 -03:00
Carlos Antonio da Silva
3bbc2fb994 Improve and fix AP changelog, sync release notes [ci skip] 2012-07-08 13:51:07 -03:00
Carlos Antonio da Silva
9c4afcf4cd Rename RouteInspector to RoutesInspector
Follow the consistency defined in dbc43bc.
2012-07-08 13:49:15 -03:00
schneems
bbfd29a655 show routes while debugging added to changelog 2012-07-07 15:59:27 -05:00
@schneems and @mattt
ef91cddb48 move route_inspector to actionpack
this is so we can show route output in the development when we get a routing error. Railties can use features of ActionDispatch, but ActionDispatch should not depend on Railties.
2012-07-07 15:39:49 -05:00
schneems
fa714ec7df show routes while debugging RoutingError
If someone receives a routing error, they likely need to view the routes. Rather than making them visit '/rails/info/routes' or run `rake routes` we can give them that information on the page.
2012-07-07 15:38:29 -05:00
Vijay Dev
ee20be7c33 Merge branch 'master' of github.com:lifo/docrails 2012-07-07 20:44:49 +05:30
Carlos Antonio da Silva
ea7b48b074 Use "instance_accessor" for flash types class attribute 2012-07-07 09:16:48 -03:00
kennyj
238a4253bf Added support add_flash_types 2012-07-07 17:07:57 +09:00
kennyj
1498071b92 Remove unused code. 2012-07-07 14:59:49 +09:00
Mircea Pricop
021f3d24f3 Prevent conflict between mime types and Object methods
Assuming the type ":touch", Collector.new was calling
send(:touch), which instead of triggering method_missing
and generating a new collector method, actually
invoked the private method `touch` inherited from
Object.

By generating the method for each mime type as it
is registered, the private methods on Object can
never be reached by `send`, because the `Collector`
will have them before `send` is called on it.

To do this, a callback mechanism was added to Mime::Type

This allows someone to add a callback for whenever
a new mime type is registered. The callback then
gets called with the new mime as a parameter.

This is then used in AbstractController::Collector
to generate new collector methods after each mime
is registered.
2012-07-06 20:38:23 +02:00
Aaron Patterson
a5efd5800c Revert "push parameter instantiation to one method"
This reverts commit 9669f6f7883787aa209207cab68b1069636aed9e.

This breaks Sam Ruby's tests for some reason.  Revert until we figure it
out.
2012-07-05 15:46:14 -07:00
Aaron Patterson
a7826bd8b7 Merge branch 'master' into testclean
* master:
  Add documentation for inheritance_column method
  Use ArgumentError vs. RuntimeError, which is more precise.
  CSV fixtures aren't supported by default anymore, update generated test_helper.rb to reflect that
  fix quoting for ActiveSupport::Duration instances
  Add few information on the field types
  Add the options method to action_controller testcase.
2012-07-05 14:03:57 -07:00
François de Metz
0303c2325f Add the options method to action_controller testcase.
Signed-off-by: François de Metz <francois@stormz.me>
2012-07-04 15:00:00 +02:00
Aaron Patterson
9669f6f788 push parameter instantiation to one method 2012-07-03 18:01:11 -07:00
Aaron Patterson
7ef6a27f89 add Mime.fetch so we can have default mime types 2012-07-03 17:51:27 -07:00
Aaron Patterson
142d50e52e make the default environment have actual defaults
instead of deleting keys on every instantiation, create defaults we
actually use.  eventually we can pass an environment in to the request,
and create a new req / res object on each call.
2012-07-03 17:37:47 -07:00
Aaron Patterson
5ee27630f7 assing the request on the response only once 2012-07-03 17:29:46 -07:00
Aaron Patterson
4f2cd3e9fe group things that are alike 2012-07-03 17:18:31 -07:00
Aaron Patterson
9f4dafb8ef push functional test specific methods to it's own module 2012-07-03 17:13:04 -07:00
Aaron Patterson
b5442b5a3a test should be testing to_param not to_s, remove Array subclass 2012-07-03 16:35:07 -07:00