| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
| |
If you want an ability to parse XML parameters, please install
`actionpack-xml_parser` gem.
|
|
|
|
|
|
|
|
|
|
| |
Previous implementation of time_zone_options_for_select did not dup the
ActiveSupport::TimeZone.all array. When :priority_zones were provided
the method would reject! the zones from the memoized TimeZones array
thus affecting future requests to the server. Essentially whatever
zones were specified as :priority_zones would show up for the first
request but then disappear from the time zone options on future
requests.
|
| |
|
|
|
|
|
|
| |
Print a message in both `rake routes` and at GET "/rails/info/routes"
that lets you know you have no routes defined, as well as linking to the
Rails Guide on the topic.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, the img_alt method in ActionView keeps underscores
in the alt attribute. Because underscores are pronounced in
Apple's VoiceOver Utility, this has serious implications for
accessibility. This patch makes underscored or hyphenated file
names (both common in projects) read more naturally in screen
readers by replacing them with spaces. See method documentation
for details.
Added documentation to image_alt method
|
|
|
| |
[ci skip]
|
|
|
|
|
|
|
|
|
|
| |
The current implementation only works correctly if you supply the `:controller`
with directory notation (eg. `:controller => 'admin/posts'`).
The ruby constant notation (eg. `:controller => 'Admin::Posts`) leads to unexpected problems with `url_for`.
This patch prints a warning for every non supported `:controller` option. I also added documentation how
to work with namespaced controllers. The warning links to that documentation in the rails guide.
|
|
|
|
|
|
|
|
|
|
| |
previously when a partial was placed inside a directory
(eg. '/dir/_partial'), `assert_template` did not replace
the '_' prefix when looking through rendered tempaltes,
which resulted in an error.
I modified it to replace both, the leading '_' and the last '_'
after a '/'.
|
|
|
|
| |
Starting a line with an octothorpe makes an <h1>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
It would embed array as string instead of joining it like `content_tag` does:
content_tag(:td, class: ["foo", "bar"]){}
#=> '<td class="foo bar"></td>'
Before:
content_tag_for(:td, item, class: ["foo", "bar"]){}
#=> '<td class="item ["foo", "bar"]" id="item_1"></td>'
After:
content_tag_for(:td, item, class: ["foo", "bar"]){}
#=> '<td class="item foo bar" id="item_1"></td>'
|
| |
|
| |
|
|
|
|
| |
[ci skip]
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
When debugging routes ,it can sometimes be difficult to understand exactly how the paths are matched. This PR adds a JS based path matching widget to the `/rails/info/routes` output. You can enter in a path, and it will tell you which of the routes that path matches, while preserving order (top match wins).
The matching widget in action:
![](http://f.cl.ly/items/3A2F0v2m3m1Z1p3P3O3k/path-match.gif)
Prior to this PR the only way to check matching paths is via mental math, or typing in a path in the url bar and seeing where it goes. This feature will be an invaluable debugging tool by dramatically decreasing the time needed to check a path match.
ATP actionpack
|
| |
|
| |
|
|
|
|
| |
Also add some generic tests to ensure they're properly deprecated.
|
|
|
|
| |
The same headers were being duplicated on every request.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This commit changes route defaults so that explicit defaults are no
longer required where the key is not part of the path. For example:
resources :posts, bucket_type: 'posts'
will be required whenever constructing the url from a hash such as a
functional test or using url_for directly. However using the explicit
form alters the behavior so it's not required:
resources :projects, defaults: { bucket_type: 'projects' }
This changes existing behavior slightly in that any routes which
only differ in their defaults will match the first route rather
than the closest match.
Closes #8814
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This now allows the use of arrays like this:
get '/foo/:action', to: 'foo', constraints: { subdomain: %w[www admin] }
or constraints where the request method returns an Fixnum like this:
get '/foo', to: 'foo#index', constraints: { port: 8080 }
Note that this only applies to constraints on the request - path
constraints still need to be specified as Regexps as the various
constraints are compiled into a single Regexp.
|
| |
|
|
|
|
|
| |
Add tests for time & datetime.
Add documentation.
|
| |
|
|
|
|
| |
Fixes #8845.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
A declarative API for specifying dependencies that affect template
cache digest computation. In your controller, specify any of said
dependencies:
view_cache_dependency { "phone" if using_phone? }
When the block is evaluated, the resulting value is included in the
cache digest calculation, allowing you to generate different digests
for effectively the same template. (Mostly useful if you're mucking
with template load paths.)
|
| |
|
|
|
|
|
|
|
|
|
| |
Previously rendering a partial without giving :object or :collection
would generate a local variable with the partial name by default.
This was noticed due to warnings in Ruby 2.0 of not used variables,
which turned out to be the generation of not used variables inside
partials that do not contain objects related to them.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Proxy servers add X-Forwarded-For headers, resulting in a list of IPs. We
remove trusted IP values, and then take the last given value, assuming that
it is the most likely to be the correct, unfaked value. See [1] for a very
thorough discussion of why that is the best option we have at the moment.
[1]: http://blog.gingerlime.com/2012/rails-ip-spoofing-vulnerabilities-and-protection/
Fixes #7979
|
| |
|
| |
|
| |
|
|
|
|
| |
This is version of #8640 for master
|
| |
|
|
|
|
|
|
|
| |
1) Failure:
test_head_created_with_image_png_content_type(RenderTest) [test/controller/render_test.rb:1238]:
Expected: "image/png"
Actual: "image/png; charset=utf-8"
|
| |
|
|
|
|
|
|
|
|
|
|
| |
If a request has an unknown format, the methods html?, xml?, json? ...etc
not raise an Exception.
This patch add a class Mime::NullType, that is returned when request.format is unknown
and it responds false to the methods that ends with '?' and true to 'nil?'.
It refers to #7837, this issue is considered a improvement not a bug.
|
|
|
| |
I missed attribution on this :flushed:
|
|
|
|
|
|
|
|
| |
Move the Journey code underneath the ActionDispatch namespace so
that we don't pollute the global namespace with names that may
be used for models.
Fixes rails/journey#49.
|
| |
|
|
|
|
|
|
| |
Removes support for :encode, :replace_at, and :replace_dot
options from the mail_to helper. Support for these options
has been extracted to the 'actionview-encoded_mail_to' gem.
|
|
|
|
| |
closes #8388
|
| |
|
|\
| |
| |
| | |
Removed :if / :unless conditions to fragment cache in favour of *cache_i...
|