aboutsummaryrefslogtreecommitdiffstats
path: root/actionview/lib/action_view/layouts.rb
Commit message (Collapse)AuthorAgeFilesLines
* Fix `_write_layout_method`Ryuta Kamizono2019-08-021-1/+1
|
* No private defRafael Mendonça França2019-08-011-1/+2
|
* These methods doesn't have to be `protected`Akira Matsuda2019-08-011-2/+1
|
* Use match? where we don't need MatchDataAkira Matsuda2019-07-271-1/+1
| | | | We're already running Performance/RegexpMatch cop, but it seems like the cop is not always =~ justice
* Enable `Layout/EmptyLinesAroundAccessModifier` copRyuta Kamizono2019-06-131-3/+0
| | | | | | | | | | | We sometimes say "✂️ newline after `private`" in a code review (e.g. https://github.com/rails/rails/pull/18546#discussion_r23188776, https://github.com/rails/rails/pull/34832#discussion_r244847195). Now `Layout/EmptyLinesAroundAccessModifier` cop have new enforced style `EnforcedStyle: only_before` (https://github.com/rubocop-hq/rubocop/pull/7059). That cop and enforced style will reduce the our code review cost.
* Pass lookup context to the layout handlersAaron Patterson2019-02-221-5/+5
| | | | | | | I want to start reducing the calls to `lookup_context`. That method caches the lookup context in an ivar, but I would like to cache the lookup context on the stack. That way we aren't coupled to the behavior of the `lookup_context` method.
* [Action View] require_relative => requireAkira Matsuda2017-10-211-1/+1
| | | | This basically reverts c4d1a4efeec6f0b5b58222993aa0bec85a19b6a8
* Clarify intentions around method redefinitionsMatthew Draper2017-09-011-2/+2
| | | | | | | | | Don't use remove_method or remove_possible_method just before a new definition: at best the purpose is unclear, and at worst it creates a race condition. Instead, prefer redefine_method when practical, and silence_redefinition_of_method otherwise.
* Use frozen string literal in actionview/Kir Shatrov2017-07-241-0/+2
|
* [Action View] require => require_relativeAkira Matsuda2017-07-011-1/+1
|
* Add option for class_attribute default (#29270)David Heinemeier Hansson2017-05-291-3/+3
| | | | | | | | | | | | * 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
* No need to nodoc private methodsAkira Matsuda2016-12-241-1/+1
|
* Minor corrections to #26905Andrew White2016-11-131-1/+1
|
* Merge pull request #26905 from bogdanvlviv/docsAndrew White2016-11-131-14/+14
|\ | | | | Add missing `+` around a some literals.
| * Add missing `+` around a some literals.bogdanvlviv2016-10-271-14/+14
| | | | | | | | | | | | Mainly around `nil` [ci skip]
* | let Regexp#match? be globally availableXavier Noria2016-10-271-1/+0
|/ | | | | | Regexp#match? should be considered to be part of the Ruby core library. We are emulating it for < 2.4, but not having to require the extension is part of the illusion of the emulation.
* Remove deprecated support to :text in renderRafael Mendonça França2016-10-101-1/+1
|
* Fix broken comments indentation caused by rubocop auto-correct [ci skip]Ryuta Kamizono2016-09-141-11/+11
| | | | | | 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.
* Fix broken heredoc indentation caused by rubocop auto-correctRyuta Kamizono2016-09-031-16/+17
| | | | | | All indentation was normalized by rubocop auto-correct at 80e66cc4d90bf8c15d1a5f6e3152e90147f00772. But heredocs was still kept absolute position. This commit aligns heredocs indentation 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.
* applies remaining conventions across the projectXavier Noria2016-08-061-14/+14
|
* normalizes indentation and whitespace across the projectXavier Noria2016-08-061-13/+13
|
* modernizes hash syntax in actionviewXavier Noria2016-08-061-1/+1
|
* applies new string literal convention in actionview/libXavier Noria2016-08-061-3/+3
| | | | | The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
* systematic revision of =~ usage in AVXavier Noria2016-07-251-3/+4
| | | | | Where appropriate, prefer the more concise Regexp#match?, String#include?, String#start_with?, or String#end_with?
* Merge pull request #25850 from ojab/layout_doc_fixRafael Mendonça França2016-07-171-1/+4
|\ | | | | | | Mention that layout can call a Proc [ci skip]
| * Mention that layout can call a Proc [ci skip]ojab2016-07-151-1/+4
|/ | | | Also document return values for Proc/Symbol arguments
* Improve readability of docs by using code tag [ci skip]Prakash Laxkar2015-09-291-1/+1
|
* Pass the correct formatsRafael Mendonça França2015-08-241-2/+2
|
* Pass formats to lookup_contextRafael Mendonça França2015-08-241-7/+8
| | | | | | | | Before we were changing the state of the lookup_context for the duration of the with_layout_format block, but since we already know the formats we can just pass it explicitly. Related with 8d7ce0f22aee09d20091a4dc58cb379a09d13e26
* Revert "Merge pull request #19685 from vngrs/actionview_parent_layout_bug"Rafael Mendonça França2015-06-021-17/+8
| | | | | | | | | | | This reverts commit a9d58c77da800bb0052c9bfa432828b02526022c, reversing changes made to 041c2c879a3c4086ad3aa6d30fed1eede1d53c11. Reason: The old behavior is how it was working in previous version of Rails since 4.0.x so it is not safe to backport to a stable branch. See https://github.com/rails/rails/issues/19626#issuecomment-89862258 and https://github.com/rails/rails/pull/15050#issuecomment-45333449
* fix for actionview parent layout bugMehmet Emin İNAÇ2015-04-081-8/+17
| | | | | | | This commit fixes issue #19626 Don't need to check layout conditions if there is no condition test for parent layout bug fix
* [ci skip] Delete excess white in documentationAnton Davydov2015-03-051-1/+1
|
* Pass symbol as an argument instead of a blockErik Michaels-Ober2014-11-291-1/+1
|
* Introduce `render :html` for render HTML stringPrem Sichanugrist2014-02-181-1/+1
| | | | | | | | | This is an option for to HTML content with a content type of `text/html`. This rendering option calls `ERB::Util.html_escape` internally to escape unsafe HTML string, so you will have to mark your string as html safe if you have any HTML tag in it. Please see #12374 for more detail.
* Introduce `render :plain` for render plain textPrem Sichanugrist2014-02-181-1/+1
| | | | | | | | This is as an option to render content with a content type of `text/plain`. This is the preferred option if you are planning to render a plain text content. Please see #12374 for more detail.
* Introduce `render :body` for render raw contentPrem Sichanugrist2014-02-181-1/+1
| | | | | | | | | | | | This is an option for sending a raw content back to browser. Note that this rendering option will unset the default content type and does not include "Content-Type" header back in the response. You should only use this option if you are expecting the "Content-Type" header to not be set. More information on "Content-Type" header can be found on RFC 2616, section 7.2.1. Please see #12374 for more detail.
* _implied_layout_name should be privateRafael Mendonça França2013-11-191-9/+11
|
* Use the right indentationRafael Mendonça França2013-11-191-1/+1
|
* Add missing requires inside AVŁukasz Strzałkowski2013-08-251-1/+1
|
* Move layouts to AVŁukasz Strzałkowski2013-08-251-0/+424