Commit Graph

8578 Commits

Author SHA1 Message Date
Andrew White
8227bf7ee9 Use request.fullpath to build redirect url in force_ssl
The `force_ssl` command now builds the redirect url from `request.fullpath`.
This ensures that the format is maintained and it doesn't redirect to a route
that has the same parameters but is defined earlier in `routes.rb`. Also any
optional segments are maintained.

Fixes #7528.
Fixes #9061.
Fixes #10305.
2013-04-25 08:33:21 +01:00
Ilya Vorontsov
742783cc16 fixed missing comma in example 2013-04-24 16:21:42 +04:00
Xavier Noria
3e5d3e438e applies documentation guidelines 2013-04-22 23:37:27 +02:00
Andrew White
4e21b7b359 Merge pull request #10301 from vipulnsward/extract_in_mapper
extract arrays to constants in Mapper
2013-04-22 11:49:27 -07:00
Vipul A M
8d93b5811a extract arrays to constants in Mapper 2013-04-22 22:24:31 +05:30
Andrew White
0fea87c49f Merge pull request #10299 from econsultancy/use-method-not-allowed-exception
Use MethodNotAllowed exception rather than UnknownHttpMethod
2013-04-22 07:03:34 -07:00
Lewis Marshall
ec462b4de7 Return a 405 response for unknown HTTP methods 2013-04-22 14:31:10 +01:00
Vipul A M
5fe68292c2 extract no content response codes to a constant 2013-04-22 15:51:25 +05:30
buddhamagnet
2948668bf1 Increase readability of ternary statement in build method 2013-04-20 15:24:23 +01:00
Rafael Mendonça França
08c6df8532 Merge pull request #10267 from vipulnsward/use_destructive_method
symbolize_keys => symbolize_keys! on new hash; change sentence
2013-04-19 10:32:33 -07:00
Vipul A M
c52c2682bf symbolize_keys => symbolize_keys! on new hash;
"There're" => There are for better readability
2013-04-19 19:56:29 +05:30
wangjohn
e8aceae5db Adding documentation to actionview so that the big picture of the
renderer is clearer.
2013-04-18 17:34:53 -04:00
Andrew White
0883f9f508 Refactor ActionDispatch::Http::URL.build_host_url
Add support for extracting the port from the :host option and for
removing the subdomain by using nil, false or ''.
2013-04-18 17:12:40 +01:00
Andrew White
3ba6ae95f0 Duplicate options before mutating them 2013-04-18 17:12:40 +01:00
Derek Watson
6183e1a460 Passing subdomain: '' to url_for removes the subdomain (instead of adding a leading .)
Adding a boolean route constraint checks for presence/absence of request property
2013-04-18 17:12:40 +01:00
printercu
14c196e5a3 Avoid leak into controller's action_methods 2013-04-18 20:03:31 +04:00
Rafael Mendonça França
1692732271 Merge pull request #10173 from nashby/element-attributes
options_from_collection_for_select helper takes html attributes
2013-04-16 14:02:14 -07:00
Gaurish Sharma
bb74b3952e replace match with get verb in ActionController::Metal 2013-04-16 09:45:45 +05:30
buddhamagnet
b3d7c41a99 make [] method in router more readable 2013-04-15 20:10:18 +01:00
Viktar Basharymau
9cb12265d8 Fix a typo 2013-04-12 17:35:02 +03:00
Vijay Dev
b15ce4a006 Merge branch 'master' of github.com:lifo/docrails
Conflicts:
	guides/source/action_mailer_basics.md
2013-04-11 22:58:14 +05:30
Vasiliy Ermolovich
0778290b57 options_from_collection_for_select helper takes html attributes
as the last element of the array
2013-04-11 14:15:33 +03:00
Andrew White
24b1d4fc63 Return nil for Mime::NullType#ref 2013-04-10 08:18:06 +01:00
Grzegorz Świrski
d50df2f116 Reverts rendering behavior when format is unknown
If a request has unknown format (eg. /foo.bar), the renderer
fallbacks to default format.

This patch reverts Rails 3.2 behavior after c2267db commit.

Fixes issue #9654.
2013-04-10 08:13:16 +01:00
Nikolay Shebanov
908ee27b8e Use camelize instead of capitalize on error screen 2013-04-10 02:26:02 +04:00
RSL
21b55e4462 improve accuracy of simple_format documentation. span doesn't get sanitized. 2013-04-09 17:21:26 -04:00
Rafael Mendonça França
5654b0a27e Fix typo 2013-04-09 13:00:45 -03:00
Carlos Antonio da Silva
d20c3204bf Merge pull request #10148 from vipulnsward/traces_change
change array of array to hash
2013-04-09 05:24:53 -07:00
Vipul A M
a7e77c553d change array of array to hash 2013-04-09 11:17:08 +05:30
Vipul A M
f6fd38f1ea fix AP warning; remove unused variable 2013-04-09 10:43:24 +05:30
Agis Anastasopoulos
a779ea9d57 Mark unused variables and make some style fixes
It'd be a nice convention to mark the unused variables like this, now that Ruby 2 will issue no warnings for such vars being unused.
2013-04-08 22:52:32 +03:00
Rafael Mendonça França
63f7356b3a Merge pull request #9604 from sgrif/live_streaming_exceptions
Exceptions raised when using ActionController::Live cause server crash
2013-04-08 09:53:20 -07:00
Rafael Mendonça França
436d91869b Merge pull request #10122 from wangjohn/adding_documentation_to_form_builder
Added documentation to the FormBuilder class

Closes #10115
2013-04-08 07:49:04 -07:00
Carlos Antonio da Silva
0d8a76d8d4 Merge pull request #10130 from Agis-/patch-2
Mark unused block parameters.
2013-04-08 05:24:56 -07:00
Agis Anastasopoulos
1e784cb386 Remove unused block parameters 2013-04-07 22:35:25 +03:00
Agis Anastasopoulos
6d10688bbe Remove unecessary variable call, #sort! always returns an array 2013-04-07 21:55:35 +03:00
wangjohn
fb24f41905 Added documentation to the FormBuilder class, should help
clarify issue #10115. Also made the field_helpers an explicit list of
methods.
2013-04-06 20:56:03 -04:00
Andrew White
4d8e23463f Merge pull request #10101 from wangjohn/refactoring_routing_mapper
Refactoring some reused code into a method (inside of the routes mapper)
2013-04-06 11:38:33 -07:00
Vipul A M
defea35a39 change some more merge to merge! on new hashes 2013-04-06 23:37:39 +05:30
Carson McDonald
b75c0bb378 Typo fix 2013-04-05 23:15:04 -04:00
Agis Anastasopoulos
3adb01ed76 Remove extra whitespace 2013-04-06 00:54:44 +03:00
Rafael Mendonça França
08926bd06c Merge pull request #9555 from tmm1/optimize-erb
Optimize generated ERB to reduce method calls
2013-04-05 13:56:29 -07:00
Ryan McGeary
48dc5192ef Fix explicit names on multiple file fields
If a file field tag is passed the multiple option, it is turned into an
array field (appending "[]"), but if the file field is passed an
explicit name as an option, leave the name alone (do not append "[]").

Fixes #9830
2013-04-05 15:32:56 -04:00
wangjohn
8e295b04f1 Refactoring some reused code into a method (inside of the routes
mapper) and adding a constant for all the possible scopes.
2013-04-05 11:15:18 -04:00
Carlos Antonio da Silva
797fcdf738 Refactor mail_to to not generate intermediate hashes when adding href
There's no need to use Hash#merge with a new hash just for setting the
href option to pass it through. Since we're always dealing with a new
html_options hash, we're free to just set the value instead.
2013-04-04 21:51:45 -03:00
Carlos Antonio da Silva
e936cf9c47 Ensure mail_to helper does not modify the given html options hash 2013-04-04 21:25:47 -03:00
Carlos Antonio da Silva
aa3b6837b2 Merge pull request #10065 from spohlenz/mail_to_block
Add block support for the mail_to helper
2013-04-04 17:20:37 -07:00
Francesco Rodriguez
4997831a6d fix broken format in ActionView::Helpers::AssetTagHelper [ci skip] 2013-04-04 16:52:39 -05:00
Francesco Rodriguez
2a16e159ab mark ActionView::Helpers::Tags as :nodoc: [ci skip] 2013-04-04 16:46:06 -05:00
Francesco Rodriguez
64d8cdee31 fix broken format in ActionView::Helpers::NumberHelper [ci skip] 2013-04-03 16:32:33 -05:00