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

19 commits

Author SHA1 Message Date
Aaron Patterson
e17fe52e0e
Tighten up the AV::Base constructor
The AV::Base constructor was too complicated, and this commit tightens
up the parameters it will take.  At runtime, AV::Base is most commonly
constructed here:

  94d54fa4ab/actionview/lib/action_view/rendering.rb (L72-L74)

This provides an AV::Renderer instance, a hash of assignments, and a
controller instance.  Since this is the common case for construction, we
should remove logic from the constructor that handles other cases.  This
commit introduces special constructors for those other cases.
Interestingly, most code paths that construct AV::Base "strangely" are
tests.
2019-01-29 15:49:40 -08:00
Rafael França
05a66686f1
Merge pull request #33975 from JuanitoFatas/jf.fix-test-name
[CaptureHelperTest] Fix a content_for test description
2018-09-25 17:54:30 -04:00
Rafael Mendonça França
f679933daa
Change the empty block style to have space inside of the block 2018-09-25 13:19:35 -04:00
Juanito Fatas
6f36168eca Fix a content_for test description 2018-09-25 15:15:35 +09:00
Daniel Colson
a1ac18671a Replace assert ! with assert_not
This autocorrects the violations after adding a custom cop in
3305c78dcd.
2018-04-19 08:11:33 -04:00
Daniel Colson
94333a4c31 Use assert_predicate and assert_not_predicate 2018-01-25 23:32:59 -05:00
Kir Shatrov
424117281e Use frozen string literal in actionview/ 2017-07-24 11:53:43 +03:00
Matthew Draper
87b3e226d6 Revert "Merge pull request #29540 from kirs/rubocop-frozen-string"
This reverts commit 3420a14590, reversing
changes made to afb66a5a59.
2017-07-02 02:15:17 +09:30
Kir Shatrov
cfade1ec7e Enforce frozen string in Rubocop 2017-07-01 02:11:03 +03:00
Akira Matsuda
e8ba0c0f21 "Use assert_nil if expecting nil. This will fail in minitest 6." 2016-12-25 02:29:52 +09:00
Rafael Mendonça França
55f9b8129a
Add three new rubocop rules
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces

Fix all violations in the repository.
2016-08-16 04:30:11 -03:00
Xavier Noria
4b6c68dfb8 applies new string literal convention in actionview/test
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:50:17 +02:00
Vipul A M
b387d9a14a html_safe is not supposed to be public API for AV. This change removes usage of html_safe in favour of raw() in AV helpers.
Also changed usage of html_safe to make use of raw() instead so that the intended behaviour is verified with raw()
2016-01-20 12:38:59 +05:30
Yoong Kang Lim
7c988f8030 Use ActiveSupport::SafeBuffer when flushing content_for
Previously, when content_for is flushed, the content
was replaced directly by a new value in
ActionView::OutputFlow#set. The problem is this new
value passed to the method may not be an instance of
ActiveSupport::SafeBuffer.

This change forces the value to be set to a new
instance of ActiveSupport::SafeBuffer.
2015-05-25 22:13:03 +10:00
Akira Matsuda
6a4771fd6e 🚮 Unused method
This method is not in use since 479c7cacd5
2015-04-25 17:09:33 +09:00
Santiago Pastorino
e4627edf87 Revert "Re-enable capture'ing non-String values"
This reverts commit c2fe0938d7.
2014-12-15 21:20:54 -02:00
Carsten Zimmermann
c2fe0938d7 Re-enable capture'ing non-String values
This has been discussed in #17661 and partially reverts the changes made
in 9de83050d3 and 986cac73e3

The test case added to content_for acts as a regression / acceptance test.
2014-12-14 10:57:43 +01:00
Ryan Davis
479c7cacd5 Removed CaptureHelper#flush_output_buffer as it is only used in tests.
reviewed: @tenderlove
2014-06-04 16:30:36 -07:00
Piotr Sarnacki
eb23754ebb Move template tests from actionpack to actionview 2013-06-20 17:23:16 +02:00
Renamed from actionpack/test/template/capture_helper_test.rb (Browse further)