aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/test/abstract
Commit message (Collapse)AuthorAgeFilesLines
* Add more rubocop rules about whitespacesRafael Mendonça França2016-10-291-1/+1
|
* Remove deprecated methods related to controller filtersRafael Mendonça França2016-10-091-48/+0
| | | | | | | | | | `skip_action_callback`, `skip_filter`, `before_filter`, `prepend_before_filter`, `skip_before_filter`, `append_before_filter`, `around_filter` `prepend_around_filter`, `skip_around_filter`, `append_around_filter`, `after_filter`, `prepend_after_filter`, `skip_after_filter` and `append_after_filter`.
* Fix broken alignments caused by auto-correct commit 411ccbdRyuta Kamizono2016-08-101-1/+2
| | | | Hash syntax auto-correcting breaks alignments. 411ccbdab2608c62aabdb320d52cb02d446bb39c
* applies remaining conventions across the projectXavier Noria2016-08-061-1/+0
|
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-16/+16
|
* remove redundant curlies from hash argumentsXavier Noria2016-08-061-4/+2
|
* modernizes hash syntax in actionpackXavier Noria2016-08-061-3/+3
|
* applies new string literal convention in actionpack/testXavier Noria2016-08-063-11/+11
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* Revert "ActionController::Base#process() now only takes an action name"Aaron Patterson2015-10-291-0/+20
| | | | This reverts commit 9f93a5efbba3e1cbf0bfa700a17ec8d1ef60d7c6.
* ActionController::Base#process() now only takes an action nameAaron Patterson2015-10-291-20/+0
| | | | | | rather than an action name and *args. The *args were not being used in regular applications outside tests. This causes a backwards compatibility issue, but reduces array allocations for most users.
* Use `Mime[:foo]` instead of `Mime::Type[:FOO]` for back compatJeremy Daer2015-10-061-3/+3
| | | | | | | | | | | | | | | | | Rails 4.x and earlier didn't support `Mime::Type[:FOO]`, so libraries that support multiple Rails versions would've had to feature-detect whether to use `Mime::Type[:FOO]` or `Mime::FOO`. `Mime[:foo]` has been around for ages to look up registered MIME types by symbol / extension, though, so libraries and plugins can safely switch to that without breaking backward- or forward-compatibility. Note: `Mime::ALL` isn't a real MIME type and isn't registered for lookup by type or extension, so it's not available as `Mime[:all]`. We use it internally as a wildcard for `respond_to` negotiation. If you use this internal constant, continue to reference it with `Mime::ALL`. Ref. efc6dd550ee49e7e443f9d72785caa0f240def53
* stop calling deprecated methodsAaron Patterson2015-09-211-3/+3
| | | | | We should be asking the mime type method for the mime objects rather than via const lookup
* Get rid of mocha tests - part 1Marcin Olichwirowicz2015-08-241-7/+15
|
* Merge pull request #11790 from printercu/patch-3Rafael Mendonça França2015-02-121-7/+26
|\ | | | | | | ActionController#translate supports symbols
| * ActionController#translate also lookups shortcut without action nameMax Melentiev2013-10-221-2/+6
| |
| * ActionController#translate supports symbolsprintercu2013-09-251-6/+21
| | | | | | | | Made it similar to views helper.
* | Deprecate all *_filter callbacks in favor of *_action callbacksAbdelkader Boudih2015-01-081-3/+5
| |
* | Partially revert deprecation of *_filterRafael Mendonça França2014-06-031-5/+3
| | | | | | | | | | | | | | | | | | | | | | We are going to deprecate only on Rails 5 to make easier plugin maintainers support different Rails versions. Right now we are only discouraging their usage. This reverts commit 6c5f43bab8206747a8591435b2aa0ff7051ad3de. Conflicts: actionpack/CHANGELOG.md
* | Deprecate all *_filter callbacks in favor of *_action callbacksRafael Mendonça França2014-05-271-3/+5
| | | | | | | | | | This is the continuation of the work started at 9d62e04838f01f5589fa50b0baa480d60c815e2c
* | Ensure :js is defined regardless of the outcome of the test.Zuhao Wan2014-05-171-5/+11
| |
* | Action Pack VariantsŁukasz Strzałkowski2013-12-041-1/+1
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, variants in the templates will be picked up if a variant is set and there's a match. The format will be: app/views/projects/show.html.erb app/views/projects/show.html+tablet.erb app/views/projects/show.html+phone.erb If request.variant = :tablet is set, we'll automatically be rendering the html+tablet template. In the controller, we can also tailer to the variants with this syntax: class ProjectsController < ActionController::Base def show respond_to do |format| format.html do |html| @stars = @project.stars html.tablet { @notifications = @project.notifications } html.phone { @chat_heads = @project.chat_heads } end format.js format.atom end end end The variant itself is nil by default, but can be set in before filters, like so: class ApplicationController < ActionController::Base before_action do if request.user_agent =~ /iPad/ request.variant = :tablet end end end This is modeled loosely on custom mime types, but it's specifically not intended to be used together. If you're going to make a custom mime type, you don't need a variant. Variants are for variations on a single mime types.
* Move abstract's controller tests to AVŁukasz Strzałkowski2013-08-2514-886/+0
| | | | The ones that were actually testing AV functionality and should belong in there
* Create AbstractController::Rendering interfaceŁukasz Strzałkowski2013-08-254-1/+5
| | | | This interface should be use when implementing renderers.
* Fix AP test suite after moving stuff to AVŁukasz Strzałkowski2013-08-254-6/+6
|
* add test-case to verify `error.path` when a helper was not found.Yves Senn2013-07-121-0/+5
| | | | | This verifies the code added with: https://github.com/rails/rails/commit/99c9d18601539c7e7e87f26bb047add1f93072af
* move `MissingHelperError` out of the `ClassMethods` module.Yves Senn2013-07-121-1/+1
|
* Remove accidentally committed vi .swp file.Marc Schütz2013-07-101-0/+0
|
* Show real LoadError on helpers requirePiotr Niełacny2013-07-102-0/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | When helper try to require missing file rails will throw exception about missing helper. # app/helpers/my_helper.rb require 'missing' module MyHelper end And when we try do load helper class ApplicationController helper :my end Rails will throw exception. This is wrong because there is a helper file. Missing helper file helpers/my_helper.rb Now when helper try to require non-existed file rails will throw proper exception. No such file to load -- missing
* Avoid leak into controller's action_methodsprintercu2013-04-181-0/+6
|
* Refactored to remove unused variableAnupam Choudhury2013-03-281-2/+2
|
* Merge pull request #8458 from ↵Rafael Mendonça França2013-03-271-0/+14
|\ | | | | | | | | | | | | | | | | lucisferre/improve-layout-override-fallback-behavior Provides standard layout lookup behavior for method and proc cases Conflicts: actionpack/CHANGELOG.md
| * Provides standard layout lookup behavior for method and proc casesChris Nicola2013-03-271-0/+14
| | | | | | | | | | | | | | When setting the layout either by referencing a method or supplying a Proc there is no way to fall back to the default lookup behavior if desired. This patch allows fallback to the layout lookup behavior when returning nil from the proc or method.
* | Changed 'args' to 'arguments' in test descriptionPrathamesh Sonpatki2013-03-242-2/+2
|/
* Fix setting expected value in translation testsCarlos Antonio da Silva2013-01-211-2/+2
| | | | It was being set to nil instead due to the wrong assignment.
* Removed ActionController::Base dependency from abstract controller ↵Jens Bissinger2013-01-201-41/+46
| | | | translation tests.
* Test abstract controller's localize method.Jens Bissinger2013-01-201-0/+6
|
* Remove unnecessary begin..rescue..end, use only rescueAkira Matsuda2013-01-062-11/+7
|
* add tests to aliased _filter callbacksFrancesco Rodriguez2012-12-071-0/+46
|
* use `_action` instead of `_filter` callbacksFrancesco Rodriguez2012-12-071-21/+19
|
* Rename all action callbacks from *_filter to *_actionDavid Heinemeier Hansson2012-12-071-5/+5
|
* add lazy look up in abstract controller's translate methodSergey Pchelincev2012-07-181-0/+13
|
* we raise a subclass of LoadError, so rescue thatAaron Patterson2012-06-141-1/+6
|
* Add a test case for layout nil.José Valim2012-03-281-1/+15
|
* use consistent explicit module inclusionLuke Gruber2012-03-163-6/+6
| | | | aid ease of understanding and readability for tests
* allow zero-arity proc for AbstrController::layoutLuke Gruber2012-03-151-0/+33
| | | | | proc without parameters can now be given to AbstractController::layout
* Add missing requireSantiago Pastorino2012-03-101-0/+1
|
* AbstractController.action_methods should return a SetSantiago Pastorino2012-03-101-1/+1
|
* Fix layout lookup for anonymous controllerAlexey Vakhov2012-02-281-0/+12
|
* AP tests should inherit from AS::TestCaseAaron Patterson2012-01-051-2/+2
|
* Remove deprecated layout lookup.José Valim2011-12-201-12/+3
|