aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/view_paths.rb
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"Matthew Draper2017-07-021-1/+0
| | | | | This reverts commit 3420a14590c0e6915d8b6c242887f74adb4120f9, reversing changes made to afb66a5a598ce4ac74ad84b125a5abf046dcf5aa.
* Enforce frozen string in RubocopKir Shatrov2017-07-011-0/+1
|
* Add option for class_attribute default (#29270)David Heinemeier Hansson2017-05-291-3/+1
| | | | | | | | | | | | * Allow a default value to be declared for class_attribute * Convert to using class_attribute default rather than explicit setter * Removed instance_accessor option by mistake * False is a valid default value * Documentation
* `self.` is not needed when calling its own instance methodAkira Matsuda2017-01-051-1/+1
| | | | Actually, private methods cannot be called with `self.`, so it's not just redundant, it's a bad habit in Ruby
* better docs for ActionView::ViewPaths#prepend_view_pathAlexander Kustov2016-11-121-0/+12
| | | | ✂️ extra line
* Fix broken comments indentation caused by rubocop auto-correct [ci skip]Ryuta Kamizono2016-09-141-2/+2
| | | | | | 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 rulesRafael Mendonça França2016-08-161-1/+1
| | | | | | | | Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository.
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-3/+3
|
* modernizes hash syntax in actionviewXavier Noria2016-08-061-1/+1
|
* Break up a circular require between AP/AVSean Griffin2016-03-111-2/+0
| | | | | | | | | | | | | | | | | | Right now referencing the constant `AbstractController::Rendering` causes `ActionView::Base` to be loaded, and thus the load hooks for action_view are run. If that load hook references any part of action view that then references action controller (such as `ActionView::TestCase`), the constant `AbstractController::Rendering` will attempt to be autoloaded and blow up. With this change, `ActionView::LoadPaths` no longer requires `ActionView::Base` (which it had no reason to require). There was a needed class from `AbstractController::Base` in the Rendering module, which I've moved into its own file so we don't need to load all of `AbstractController::Base` there. This commit fixes https://github.com/rails/rails-controller-testing/issues/21
* Lock down new `ImplicitRender` behavior for 5.0 RCGodfrey Chan2016-02-251-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Conceptually revert #20276 The feature was implemented for the `responders` gem. In the end, they did not need that feature, and have found a better fix (see plataformatec/responders#131). `ImplicitRender` is the place where Rails specifies our default policies for the case where the user did not explicitly tell us what to render, essentially describing a set of heuristics. If the gem (or the user) knows exactly what they want, they could just perform the correct `render` to avoid falling through to here, as `responders` did (the user called `respond_with`). Reverting the patch allows us to avoid exploding the complexity and defining “the fallback for a fallback” policies. 2. `respond_to` and templates are considered exhaustive enumerations If the user specified a list of formats/variants in a `respond_to` block, anything that is not explicitly included should result in an `UnknownFormat` error (which is then caught upstream to mean “406 Not Acceptable” by default). This is already how it works before this commit. Same goes for templates – if the user defined a set of templates (usually in the file system), that set is now considered exhaustive, which means that “missing” templates are considered `UnknownFormat` errors (406). 3. To keep API endpoints simple, the implicit render behavior for actions with no templates defined at all (regardless of formats, locales, variants, etc) are defaulted to “204 No Content”. This is a strictly narrower version of the feature landed in #19036 and #19377. 4. To avoid confusion when interacting in the browser, these actions will raise an `UnknownFormat` error for “interactive” requests instead. (The precise definition of “interactive” requests might change – the spirit here is to give helpful messages and avoid confusions.) Closes #20666, #23062, #23077, #23564 [Godfrey Chan, Jon Moss, Kasper Timm Hansen, Mike Clark, Matthew Draper]
* [skip ci] Lookup can be a noun but it is not a verbJon Atack2015-07-171-3/+3
| | | | Various grammar corrections and wrap to 80 characters.
* [ci skip] Fix to Fixed-width Fontyui-knk2015-06-141-2/+2
| | | | LookupContext is class name
* Remove deprecated `AbstractController::Base::parent_prefixes`Rafael Mendonça França2015-01-041-19/+3
|
* edit pass over all warningsXavier Noria2014-10-281-1/+5
| | | | | | | | | | | | | | | This patch uniformizes warning messages. I used the most common style already present in the code base: * Capitalize the first word. * End the message with a full stop. * "Rails 5" instead of "Rails 5.0". * Backticks for method names and inline code. Also, converted a few long strings into the new heredoc convention.
* We need an explicit returnRafael Mendonça França2014-05-141-4/+4
| | | | | | | | | | | If we don't return early Ruby will memoize the value of the prefix of the parent class what will make the subsequent searchs to not work as expected. If the early return we are avoiding the memoization. But when using the deprecated path we need to memoize the value, so we are not using early return for the deprecated path.
* Refactoring the code to make consitional return explicitRafael Mendonça França2014-05-141-4/+9
|
* Follow the documentation guidelineRafael Mendonça França2014-05-141-1/+1
|
* Mark _prefix as nodocRafael Mendonça França2014-05-141-3/+2
| | | | These methods are private API.
* ._prefix is private API so we should not recommend to override itRafael Mendonça França2014-05-141-2/+2
|
* deprecate AbC:Base::parent_prefixes.Nick Sutterer2014-05-131-4/+16
| | | | | | rename ::_local_prefixes to ::local_prefixes to state the public attribute. document the latter. make ::local_prefixes private, test overriding it and remove documentation for overriding ::_parent_prefixes.
* simplify AC:ViewPaths::_prefixes. by making it recursively traversing up the ↵Nick Sutterer2014-05-131-15/+10
| | | | inheritance chain, classes can override local prefixes.
* Revert "Require only path_set && lookup_context instead of whole base"Łukasz Strzałkowski2013-08-251-2/+1
| | | | This reverts commit 77bb03df2ca3687b290e9fe77d21007642f0329c.
* Require only path_set && lookup_context instead of whole baseŁukasz Strzałkowski2013-08-251-1/+2
|
* Move view_paths from AP to AVŁukasz Strzałkowski2013-08-251-0/+96