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

12 commits

Author SHA1 Message Date
Jonathan Hefner
cd2b3be9a6 Allow Erubi bufvar to be configured
This allows `render_in` components that compile their own templates to
use their view context's current output buffer while a
`with_output_buffer` block is being evaluated.

Partially addresses #39377.
2020-05-21 15:22:51 -05:00
Rafael Mendonça França
49f9dff9b6
Fix more offences 2018-09-25 13:21:40 -04:00
Aaron Patterson
3301804ff6
make bot happy 2018-09-24 16:01:34 -07:00
Aaron Patterson
4f96e739c2
Remove deprecated catch-all route in the AV tests
This commit removes a deprecated catch-all route in the AV tests.  It
defines and includes the necessary routes for each test such that we
don't need the catch-all anymore.

This also helps push us toward #33970
2018-09-24 15:39:15 -07:00
Rafael Mendonça França
7de7f12fd1
Remove deprecated Erubis ERB handler 2017-10-23 12:50:31 -04: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
bogdanvlviv
32b74fe255 Set correct "routes" in tests cases 2017-02-20 01:27:32 +02:00
Fumiaki MATSUSHIMA
d2306900bc Fix inherit from deprecated ActionView::Template::Handlers::Erubis
There are some classes inherit from `ActionView::Template::Handlers::Erubis`.
(ex. https://github.com/haml/haml/blob/4.0.7/lib/haml/helpers/safe_erubis_template.rb#L3)

```
Class.new(ActionView::Template::Handlers::Erubis)
# => TypeError: superclass must be a Class (ActiveSupport::Deprecation::DeprecatedConstantProxy given)
```
2017-02-01 00:12:53 +09:00
Jeremy Evans
7da8d76206
Change ActionView ERB Handler from Erubis to Erubi
Erubi offers the following advantages for Rails:

* Works with ruby's --enable-frozen-string-literal option
* Has 88% smaller memory footprint
* Does no freedom patching (Erubis adds a method to Kernel)
* Has simpler internals (1 file, <150 lines of code)
* Has an open development model (Erubis doesn't have a
  public source control repository or bug tracker)
* Is not dead (Erubis hasn't been updated since 2011)

Erubi is a simplified fork of Erubis that contains just the
parts that are generally needed (which includes the parts
that Rails uses).  The only intentional difference in
behavior is that it does not include support for <%=== tags
for debug output.  That could be added to the ActionView ERB
handler if it is desired.

The Erubis template handler remains in a deprecated state
so that code that accesses it directly does not break.  It
can be removed after Rails 5.1.
2017-01-25 01:41:27 -07:00
Piotr Sarnacki
eb23754ebb Move template tests from actionpack to actionview 2013-06-20 17:23:16 +02:00