Commit Graph

17 Commits

Author SHA1 Message Date
Rafael Mendonça França 18707ab17f
Standardize nodoc comments 2021-07-29 21:18:07 +00:00
Rafael Mendonça França 4d77dcad09
Remove support to template handlers that don't accept two arguments 2020-10-30 00:25:13 +00:00
Akira Matsuda 356857a122 active_support/deprecation has to be already required via active_support/rails.rb 2019-07-12 18:34:07 +09:00
localhostdotdev b2b2f70f1f Fix arity warning for template handlers
Mainly to help with knowning which template is reponsible for the
warning.

handler.class # => Class

handler.to_s # => Coffee::Rails::TemplateHandler

Before:

Change:
  >> Class#call(template)
To:
  >> Class#call(template, source)

After:

Change:
  >> Coffee::Rails::TemplateHandler.call(template)
To:
  >> Coffee::Rails::TemplateHandler.call(template, source)
2019-04-04 19:13:46 +02:00
Aaron Patterson 0fa0107d2d
Take in to account optional arguments when deprecating
Refs: rails/jbuilder#452
2019-02-04 13:21:24 -08:00
Aaron Patterson 28f88e0074
Pass source to template handler and deprecate old style handler
This commit passes the mutated source to the template handler as a
parameter and deprecates the old handlers.  Old handlers required that
templates contain a reference to mutated source code, but we would like
to make template objects "read only".  This change lets the template
remain "read only" while still giving template handlers access to the
source code after mutations.
2019-02-01 16:19:53 -08:00
Yoshiyuki Hirano 9740a59aee Fix broken doc layout for action_view [ci skip] 2017-08-27 09:12:19 +09: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
Xavier Noria 66a7cfa910 applies new string literal convention in actionview/lib
The current code base is not uniform. After some discussion,
we have chosen to go with double quotes by default.
2016-08-06 18:48:35 +02:00
Santiago Pastorino 8a998b0fa7 Add Html template handler that wraps Raw output in an OutputBuffer
This fixes the case when you try to render an html you know safe and the
file is named something.html. With this commit the content of the html
won't be escaped anymore because AV won't use Raw handler and choose
Html handler instead.
2016-01-05 16:54:39 -03:00
Rafael Mendonça França 4be859f0fd Change the default template handler from `ERB` to `Raw`.
Files without a template handler in their extension will be rended
using the raw handler instead of ERB.
2015-01-04 11:58:42 -03:00
Erik Michaels-Ober d1374f99bf Pass symbol as an argument instead of a block 2014-11-29 11:53:24 +01:00
claudiob 5aedabe82d Wrap code snippets in +, not backticks, in sdoc
I grepped the source code for code snippets wrapped in backticks in the comments
and replaced the backticks with plus signs so they are correctly displayed in
the Rails documentation.

[ci skip]
2014-11-20 15:45:15 -08:00
Zuhao Wan a1dbb4e7e0 Add unregister_template_handler to prevent leaks. 2014-06-12 18:49:40 +08:00
Piotr Sarnacki 0d6e8edc2a Move actionpack/lib/action_view* into actionview/lib 2013-06-20 17:23:15 +02:00