Commit Graph

8664 Commits

Author SHA1 Message Date
Julian Vargas
c43ca06ca0 Code cleanup for ActionDispatch::Flash#call
The nested `if` was replaced by using `presence` which takes account for
the given hash when it is `nil` or when it is empty. The `else` was
removed because what it was doing was to assign to `env[KEY]` the
value it already had.
2013-05-12 16:33:45 -05:00
Carlos Antonio da Silva
04d27153fc Merge pull request #10543 from vipulnsward/to_sort
Can you improve the commit message a little bit? It's good to describe why the change is happening.
2013-05-10 05:58:52 -07:00
Xavier Noria
0593c00dfb Merge pull request #10510 from think602/master
[ci skip] document protect_against_forgery? method
2013-05-09 23:16:56 -07:00
Weston Platter
cd35c1909d [ci skip] document protect_against_forgery? method 2013-05-10 01:00:57 -05:00
Vipul A M
690fd221c5 sort => sort! on new array 2013-05-10 11:21:58 +05:30
Carlos Antonio da Silva
c761f061bf Merge pull request #10536 from vipulnsward/fix_exp_warning
remove variable and fix warning
2013-05-09 08:42:24 -07:00
Vipul A M
7133b0090e remove variable and fix warning 2013-05-09 20:31:31 +05:30
Prathamesh Sonpatki
39b8b8fdbf rails -> Rails [ci skip] 2013-05-09 17:27:58 +05:30
Jeremy Kemper
5e03239d59 Fix that JSON and XML exception responses should give the HTTP error message for their status, by default, not the message from the underlying exception 2013-05-08 21:28:50 -07:00
Rafael Mendonça França
925728c283 Merge pull request #10377 from bricker/template_digest_ending_with_number
Allow numbers in partial name for digesting
2013-05-06 18:36:37 -07:00
Rafael Mendonça França
b8577bb673 Merge pull request #10446 from dasch/instrument-template-compilation
Instrument template compilation
2013-05-06 18:31:01 -07:00
Bryan Ricker
3c516c4b52 Allow numbers in partial name for digesting
Add failing test for template with number at the end

Use \w for RENDER_DEPENDENCY regex

Spacing

Add CHANGELOG entry
2013-05-06 18:30:29 -07:00
Rafael Mendonça França
8d85baa0e3 Merge pull request #10478 from cainlevy/patch-1
use canonical #controller_path logic in controller test cases
2013-05-06 18:12:13 -07:00
Ryan Davis
3073c53198 Updates to make rails 4 happy with minitest 5:
+ Namespace changes, overhaul of runners.
+ Internal ivar name changes
- Removed a logger globally applied to tests that spew everywhere?!?
+ Override Minitest#__run to sort tests by name.
+ Reworked testing isolation to work with the new cleaner architecture.
- Removed a bunch of tests that just test minitest straight up. I think these changes were all merged to minitest 4 a long time ago.
- Minor report output differences.
2013-05-06 17:38:45 -07:00
Vipul A M
584ebed482 remove unused variable 2013-05-06 23:25:05 +05:30
Daniel Schierbeck
d6b9e8e931 Instrument template compilation 2013-05-06 12:00:11 +02:00
Junya Ogura
47bf072330 Fix typo in documentation comment 2013-05-06 06:15:08 +09:00
Lance Ivy
a145955fb7 use canonical #controller_path logic in controller test cases 2013-05-05 14:18:03 -04:00
Vladimir Strakhov
473a60be3d Added missing require to ActionView::LookupContext 2013-05-05 14:24:06 +04:00
Piotr Sarnacki
9a4268db99 Fix generating route from engine to other engine
A regression was introduced in 5b3bb6, generating route from within an
engine to an another engine resulted in prefixing a path with the
SCRIPT_NAME value.

The regression was caused by the fact that SCRIPT_NAME should be
appended only if it's the SCRIPT_NAME for the application, not if it's
SCRIPT_NAME from the current engine.

closes #10409
2013-05-03 18:15:40 +02:00
Carlos Antonio da Silva
a6a84152b4 Merge pull request #10426 from tkrajcar/rescue-h1-fix
Add styling to h1 for default rescue layout
2013-05-02 12:09:15 -07:00
Tim Krajcar
3bd887da9f Add styling to h1 2013-05-02 09:43:23 -07:00
Nihad Abbasov
b0f1cd8719 use constant for encoding 2013-05-02 04:45:47 +05:00
Vijay Dev
7ead1d8143 Merge branch 'master' of github.com:lifo/docrails 2013-05-01 16:24:13 +05:30
Aaron Patterson
fd890f6aea Merge pull request #9857 from yyyc514/bad_params_should_400
failure to parse params should trigger a 400 Bad Request
2013-04-30 17:38:56 -07:00
Ben Holley
78701a82ef add missing semicolon to journey parser.y 2013-04-30 13:43:59 -05:00
Gaurish Sharma
6d2a77ea0d Rack::Mount was replaced by Journey, Fixed comment 2013-04-30 23:11:17 +05:30
Rafael Mendonça França
feb44b9213 rails/master is now 4.1.0.beta 2013-04-29 13:15:24 -03:00
David Heinemeier Hansson
1ec64297f9 Bump version to rc1 2013-04-29 08:29:18 -07:00
Andrew White
ab08519b1a Don't reprocess the options hash on every request 2013-04-27 12:43:47 +01:00
Rafael Mendonça França
faa2c71dee Revert "Merge pull request #10337 from eimermusic/fix_template_digestor_lookup"
This reverts commit b4239622afc4f3f73808fd0c97512f3a534e07dd, reversing
changes made to f99ce3c188f5dde57e2ff63e6a22363c62f0a4cd.

Reason: This broke the build
https://travis-ci.org/rails/rails/jobs/6629894
2013-04-25 11:14:22 -03:00
Rafael Mendonça França
b4239622af Merge pull request #10337 from eimermusic/fix_template_digestor_lookup
Fix ActionView::Digestor to correctly pass format to LookupContext

Conflicts:
	actionpack/CHANGELOG.md
2013-04-25 10:22:51 -03:00
Andrew White
f99ce3c188 Add support for extra options to force_ssl
This commit adds support for passing additional url options along
with a :status option and any of the flash-related options to
`redirect_to` (i.e. :flash, :alert & :notice).

Closes #7570.
2013-04-25 13:45:52 +01:00
Martin Westin
9a79c13c45 AV Digestor correctly passes format to LookupContext
ActionView::Digestor now passes arguments correctly to
LookupContext::find method. This makes cache digests
respect the format option correctly.

FixtureFinder in tests also changed to reflect this.
2013-04-25 09:52:04 +02:00
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
Rncrtr
e9eb30fae4 fixed typo in select_tag docs 2013-04-18 14:25:27 -06: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
Andrew White
148b9ccbb5 Merge pull request #9932 from senny/9913_routing_problem
routing bugfixes when matching multiple paths
2013-04-03 06:48:04 -07:00
Yves Senn
33971922b3 fix regression in Mapper when format: was used in a scope.
Closes #10071

`#normalize_path!` depends on the options so we need to call
`#normalize_options!` first to make sure everything is set correctly.
2013-04-03 15:01:01 +02:00
Sam Pohlenz
4bb26dd7b2 Add block support for the helper 2013-04-03 14:42:48 +10:30
thenickcox
3475e0ed24 Fix grammatical error on JS helper warning message
Add changelog entry

Delete changelog
2013-04-02 20:54:31 -07:00
Santiago Pastorino
ac6fc60621 Merge pull request #10061 from trevorturk/dummy-key-generator-rename
Rename DummyKeyGenerator -> LegacyKeyGenerator
2013-04-02 17:02:02 -07:00
Trevor Turk
7c7a427344 Rename DummyKeyGenerator -> LegacyKeyGenerator 2013-04-02 18:41:57 -05:00
Trevor Turk
e1c4b84291 ✂️ spacing after private 2013-04-02 18:31:09 -05:00
Trevor Turk
c60d3b916b Be consistent when talking about cookies, key -> name 2013-04-02 18:29:57 -05:00
Trevor Turk
c0b1eb112f Fix permanent cookie jar accessor typo 2013-04-02 18:20:24 -05:00
Sam Ruby
04cda1848c Prefer find_by over dynamic finders in rdoc 2013-04-02 15:09:15 -04:00
Trevor Turk
ca58bf1543 Improve documentation around the cookie store auto-upgrade to encryption 2013-04-01 11:38:06 -05:00
Santiago Pastorino
f9d23b3848 Merge pull request #9978 from trevorturk/cookie-store-auto-upgrade
Cookie-base session store auto-upgrade
2013-04-01 08:10:34 -07:00
ogawaso
d4d3d05d64 typo recomend -> recommend 2013-04-01 19:54:46 +09:00
Carlos Antonio da Silva
0a16cf19c2 Merge pull request #9680 from bdmac/time-zone-options-revert-grep-to-select
Revert grep to select since they are not the same
2013-03-31 15:46:48 -07:00
Steve Klabnik
2f53c27b81 Merge pull request #10015 from vipulnsward/remove_unused_variable_in_get
remove unused variable and assignment
2013-03-31 08:53:01 -07:00