1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
Commit graph

27 commits

Author SHA1 Message Date
Gert Goet
2d08fd2506 Remove internal options from query string of paths
Fixes #17057
2014-09-25 17:50:16 +02:00
Rafael Mendonça França
5c057f9255 Remove warning 2014-09-01 22:20:39 -03:00
Sammy Larbi
2fae37f0ac Allow polymorphic routes with nil when a route can still be drawn
Suppose you have two resources routed in the following manner:

```ruby
resources :blogs do
  resources :posts
end

resources :posts
```

When using polymorphic resource routing like `url_for([@blog, @post])`, and `@blog` is `nil` Rails should still try to match the route to the top-level posts resource.

Fixes #16754
2014-08-31 11:39:46 -05:00
Rafael Mendonça França
5e6c45a7db Removed warning 2014-08-18 20:41:03 -03:00
Rafael Mendonça França
d2d809868c Merge pull request #15889 from carnesmedia/model-name
Use #model_name on instances instead of classes
2014-08-17 23:01:13 -03:00
José Valim
2b0c602bc3 Remove usafe of respond_to in ActionView tests 2014-08-17 13:20:22 -04:00
Carlos Antonio da Silva
29a6a17a11 Properly assert for the expected messages
The message passed to Minitest's assert_raise is used as output in case
the assertion fails, but we can test against the exact message by using
the actual exception object that is returned from the assert_raise call.
2014-07-30 23:41:19 -03:00
Amiel Martin
6b0e834a19 Use #model_name on instances instead of classes
This allows rails code to be more confdent when asking for a model name, instead of having to ask for the class.

Rails core discussion here: https://groups.google.com/forum/#!topic/rubyonrails-core/ThSaXw9y1F8
2014-06-24 17:20:24 -07:00
Aaron Patterson
84908bbde9 fix bad merge 2014-05-12 18:08:41 -07:00
Aaron Patterson
b451648e1f add a test for the parameters sent to the url helper for new records 2014-05-12 15:54:44 -07:00
Aaron Patterson
45c8a976af add a test with three objects 2014-05-12 15:54:41 -07:00
Aaron Patterson
38dcb27e72 add a test for passing two models to the polymorphic_url method 2014-05-12 15:54:41 -07:00
Aaron Patterson
ea58684b57 add tests for path based url_for calls 2014-05-08 15:56:15 -07:00
Aaron Patterson
2a10028ee3 don't manipulate the testclass, just add helpers to the instance 2014-05-08 15:07:33 -07:00
Aaron Patterson
66274d6d03 add a test for classes with options 2014-05-08 14:28:09 -07:00
Aaron Patterson
5dd6e1b142 add tests for the polymorphic_path method 2014-05-08 13:43:25 -07:00
Aaron Patterson
de6cda5e5f add more tests around the polymorphic url api 2014-05-08 10:33:57 -07:00
Aaron Patterson
37d4415a7b test for inconsistency between String and Symbol url_for handling 2014-05-07 10:18:18 -07:00
Aaron Patterson
bfcbd6fd4c add tests for symbols passed to polymorphic_url 2014-05-07 09:55:57 -07:00
Aaron Patterson
af864447f1 apparently passing a string to polymorphic_url is something we support
o_O
2014-05-06 18:10:44 -07:00
Aaron Patterson
57e5098032 make sure url_for works similar to polymorphic_url 2014-05-06 17:51:24 -07:00
Aaron Patterson
e60c55d846 add a test for the parameters sent to the url helper for new records 2014-05-06 15:59:58 -07:00
Aaron Patterson
c1c6f514f4 passing a nil in the polymorphic array is not supported. remove nils before you call the method 2014-05-02 14:29:08 -07:00
Aaron Patterson
dece005f0a passing a nil should always raise an ArgumentError 2014-05-02 11:38:37 -07:00
Joost Baaij
89ff1f82f0 Remove wrapping div with inline styles for hidden form fields.
We are dropping HTML 4.01 and XHTML strict compliance since input
tags directly inside a form are valid HTML5, and the absense of
inline styles help in validating for Content Security Policy.
2014-04-14 19:45:12 +02:00
Gaelian Ditchburn
7a085dac2a Switched to use display:none in extra_tags_for_form method.
The use of `display:inline` with the content_tag call in the
extra_tags_for_form method potentially causes display issues with some
browsers, namely Internet Explorer. IE's behaviour of not collapsing
the line height on divs with ostensibly no content means that the
automatically added div containing the hidden authenticity_token, utf8
and _method form input tags may interfere with other visible form
elements in certain circumstances. The use of `display:none` rather
than `display:inline` fixes this problem.

Fixes #6403
2014-01-05 17:16:22 +00:00
Piotr Sarnacki
eb23754ebb Move template tests from actionpack to actionview 2013-06-20 17:23:16 +02:00