Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add assertion to polymorphic_routes_test.rb | bogdanvlviv | 2017-02-20 | 1 | -2/+1 |
| | | | | | | | | | | | | | | | | The assertion will ensure that the behavior doesn't regress. assert_equal "/projects", polymorphic_path("projects") Remove FIXME related to polymorphic_url behavior. polymorphic_url with Symbol or String works equally. Example: default_url_options[:host] = "example.com" polymorphic_url(:projects) # => "http://example.com/projects" polymorphic_url("projects") # => "http://example.com/projects" Related to 37d4415a7b433fcb987b1c6a5b51bf2d8efc5d5e | ||||
* | module Blog; class Post appears twice in AV tests | Akira Matsuda | 2017-02-02 | 1 | -3/+3 |
| | | | | This causes TypeError when loaded separately | ||||
* | class Foo < Struct.new(:x) creates an extra unneeded anonymous class | Akira Matsuda | 2017-01-13 | 1 | -1/+1 |
| | | | | because Struct.new returns a Class, we just can give it a name and use it directly without inheriting from it | ||||
* | Reduce string objects by using \ instead of + or << for concatenating strings | Akira Matsuda | 2017-01-12 | 1 | -1/+1 |
| | | | | (I personally prefer writing one string in one line no matter how long it is, though) | ||||
* | `self.` is not needed when calling its own instance method | Akira Matsuda | 2017-01-05 | 1 | -1/+1 |
| | | | | Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby | ||||
* | Privatize unneededly protected methods in Action View tests | Akira Matsuda | 2016-12-23 | 1 | -1/+1 |
| | |||||
* | Add more rubocop rules about whitespaces | Rafael Mendonça França | 2016-10-29 | 1 | -1/+1 |
| | |||||
* | Fix broken comments indentation caused by rubocop auto-correct [ci skip] | Ryuta Kamizono | 2016-09-14 | 1 | -1/+1 |
| | | | | | | All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772. But comments was still kept absolute position. This commit aligns comments with method definitions for consistency. | ||||
* | Add three new rubocop rules | Rafael Mendonça França | 2016-08-16 | 2 | -2/+2 |
| | | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository. | ||||
* | applies remaining conventions across the project | Xavier Noria | 2016-08-06 | 1 | -1/+0 |
| | |||||
* | normalizes indentation and whitespace across the project | Xavier Noria | 2016-08-06 | 1 | -24/+24 |
| | |||||
* | remove redundant curlies from hash arguments | Xavier Noria | 2016-08-06 | 1 | -3/+3 |
| | |||||
* | modernizes hash syntax in actionview | Xavier Noria | 2016-08-06 | 4 | -37/+37 |
| | |||||
* | applies new string literal convention in actionview/test | Xavier Noria | 2016-08-06 | 6 | -44/+44 |
| | | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default. | ||||
* | Store the old logger before calling super | Rafael Mendonça França | 2016-07-17 | 1 | -1/+1 |
| | | | | | | setup in ActiveSupport::LogSubscriber::TestHelper call set_logger that will change ActionController::Base.logger to the MockLogger so that logger will be always MockLogger | ||||
* | Fix debug helper test | Ryuta Kamizono | 2016-06-03 | 1 | -1/+4 |
| | |||||
* | Fix calling cache helper with a relation | Lachlan Sylvester | 2015-08-28 | 1 | -0/+18 |
| | |||||
* | Remove `assigns` and `assert_template`. | Guo Xiang Tan | 2015-05-30 | 1 | -16/+2 |
| | |||||
* | :put_litter_in_its_place: Unused methods | Akira Matsuda | 2015-04-25 | 1 | -4/+0 |
| | |||||
* | don't need to rescue Exception in this case | Aaron Patterson | 2015-03-05 | 1 | -0/+6 |
| | |||||
* | Avoid accurate assertions on error messages | Robin Dupret | 2015-03-02 | 1 | -1/+1 |
| | | | | | Since there are disparities between the raised error messages on the different implementations, let's avoid being too accurate. | ||||
* | Make the helpers a required argument | Evan Phoenix | 2015-02-19 | 1 | -1/+1 |
| | |||||
* | Use public Module#include, in favor of https://bugs.ruby-lang.org/issues/8846 | robertomiranda | 2015-01-31 | 1 | -1/+1 |
| | | | | ref: https://github.com/rails/rails/pull/18763#issuecomment-72349769 | ||||
* | Fix form_for to work with objects that implement to_model | Travis Grathwell | 2014-12-29 | 1 | -5/+15 |
| | | | | | | | | | | | | | Previously, if you tried to use form_for with a presenter object that implements to_model, it would crash in action_dispatch/routing/polymorphic_routes.rb when asking the presenter whether it is .persisted? Now, we always ask .persisted? of the to_model object instead. This seems to been an issue since 1606fc9d840da869a60213bc889da6fcf1fdc431 Signed-off-by: Eugenia Dellapenna <eugenia.dellapenna@gmail.com> | ||||
* | Move test that depends on ActiveRecord | claudiob | 2014-11-21 | 1 | -0/+8 |
| | | | | | | | | | | | | | | | | | | | | | | | | This commit moves a test from `test/template` to `test/activerecord` since the test depends on ActiveRecord. This matches the documentation from [RUNNING_UNIT_TESTS](https://github.com/rails/rails/blob/f28d1ddd507174ac233b773cc4f35c3c05ad32e7/actionview/RUNNING_UNIT_TESTS.rdoc): > Test cases in the test/activerecord/ directory depend on having activerecord and sqlite3 installed. > If Active Record is not in actionview/../activerecord directory, or the sqlite3 rubygem is not installed, these tests are skipped. > Other tests are runnable from a fresh copy of actionview without any configuration. --- More details about this commit. All the tests starting with `require 'active_record_unit'` are already inside `test/activerecord`, except for the one test this commit moves. If you don't have `active_record` on your machine, the following command currently fails on master: ```bash ``` | ||||
* | Remove internal options from query string of paths | Gert Goet | 2014-09-25 | 1 | -0/+9 |
| | | | | Fixes #17057 | ||||
* | Remove warning | Rafael Mendonça França | 2014-09-01 | 1 | -2/+2 |
| | |||||
* | Allow polymorphic routes with nil when a route can still be drawn | Sammy Larbi | 2014-08-31 | 1 | -2/+34 |
| | | | | | | | | | | | | | | | | 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 | ||||
* | Removed warning | Rafael Mendonça França | 2014-08-18 | 1 | -1/+1 |
| | |||||
* | Merge pull request #15889 from carnesmedia/model-name | Rafael Mendonça França | 2014-08-17 | 1 | -2/+2 |
|\ | | | | | | | Use #model_name on instances instead of classes | ||||
| * | Use #model_name on instances instead of classes | Amiel Martin | 2014-06-24 | 1 | -2/+2 |
| | | | | | | | | | | | | 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 | ||||
* | | Remove usafe of respond_to in ActionView tests | José Valim | 2014-08-17 | 1 | -3/+1 |
| | | |||||
* | | Properly assert for the expected messages | Carlos Antonio da Silva | 2014-07-30 | 1 | -4/+8 |
|/ | | | | | | 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. | ||||
* | fix bad merge | Aaron Patterson | 2014-05-12 | 1 | -15/+0 |
| | |||||
* | add a test for the parameters sent to the url helper for new records | Aaron Patterson | 2014-05-12 | 1 | -0/+15 |
| | |||||
* | add a test with three objects | Aaron Patterson | 2014-05-12 | 1 | -2/+13 |
| | |||||
* | add a test for passing two models to the polymorphic_url method | Aaron Patterson | 2014-05-12 | 1 | -0/+8 |
| | |||||
* | add tests for path based url_for calls | Aaron Patterson | 2014-05-08 | 1 | -2/+19 |
| | |||||
* | don't manipulate the testclass, just add helpers to the instance | Aaron Patterson | 2014-05-08 | 1 | -10/+11 |
| | |||||
* | add a test for classes with options | Aaron Patterson | 2014-05-08 | 1 | -0/+7 |
| | |||||
* | add tests for the polymorphic_path method | Aaron Patterson | 2014-05-08 | 1 | -0/+3 |
| | |||||
* | add more tests around the polymorphic url api | Aaron Patterson | 2014-05-08 | 1 | -0/+12 |
| | |||||
* | test for inconsistency between String and Symbol url_for handling | Aaron Patterson | 2014-05-07 | 1 | -0/+4 |
| | |||||
* | add tests for symbols passed to polymorphic_url | Aaron Patterson | 2014-05-07 | 1 | -0/+12 |
| | |||||
* | apparently passing a string to polymorphic_url is something we support | Aaron Patterson | 2014-05-06 | 1 | -0/+12 |
| | | | | o_O | ||||
* | make sure url_for works similar to polymorphic_url | Aaron Patterson | 2014-05-06 | 1 | -38/+43 |
| | |||||
* | add a test for the parameters sent to the url helper for new records | Aaron Patterson | 2014-05-06 | 1 | -0/+15 |
| | |||||
* | passing a nil in the polymorphic array is not supported. remove nils before ↵ | Aaron Patterson | 2014-05-02 | 1 | -4/+4 |
| | | | | you call the method | ||||
* | passing a nil should always raise an ArgumentError | Aaron Patterson | 2014-05-02 | 1 | -0/+25 |
| | |||||
* | Remove wrapping div with inline styles for hidden form fields. | Joost Baaij | 2014-04-14 | 1 | -4/+5 |
| | | | | | | 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. |