- 01 1月, 2020 1 次提交
-
-
由 Abhay Nikam 提交于
-
- 20 12月, 2019 1 次提交
-
-
由 Edouard CHIN 提交于
- ### Problem ActionPack requires "action_view/base" at boot time, this causes a variety of issue that I described in detail in #38024. There is no real reason to require av/base in the ActionDispatch::Debugexceptions class. ### Solution Like any other components (such as ActiveRecord, ActiveJob...), ActionView::Base shouldn't be loaded at boot time. Here are the two main changes needed for this: 1) Actionview has a special initializer that needs to run before the app is fully booted (adding a executor needs to be done before application is done booting) https://github.com/rails/rails/blob/63ec70e700e321b22e9baf2ad2d45cd3f4febc79/actionview/lib/action_view/railtie.rb#L81-L84 That initializer used a lazy load hooks but we can't do that anymore because Action::Base view won't be triggered during booting process. When it will get triggered, (presumably on the first request), it's too late to add an executor. ------------------------------------------------ 2) Compare to other components, ActionView doesn't use `Base` for configuration flag. A lot of flags ares instead set on modules (FormHelper, FormTagHelper). The problem is that those module depends on AV::Base to be loaded, as otherwise configuration set by the user aren't applied. (Since the lazy load hooks hasn't been triggered) https://github.com/rails/rails/blob/63ec70e700e321b22e9baf2ad2d45cd3f4febc79/actionview/lib/action_view/railtie.rb#L66-L69 We shouldn't wait for AB::Base to be loaded in order to set these configuration. However, we need to do it inside an `after_initialize` block in order to let application set it to the value they want. Closes #28538 Co-authored-by: betesh <iybetesh@gmail.com>"
-
- 20 6月, 2019 1 次提交
-
-
由 Guilherme Mansur 提交于
When a SyntaxError is detected in a template we raise this exception. On a first request to the server the exception we get a NameError since the exception is not required from `active_view/template/error.rb` yet. However later on it gets required and a second request will succeed. On the first request we see the rails "Something Wen Wrong" page and not the expected syntax error in template error page with the webconsole and stacktrace. By autoloading the constant we fix this issue. Co-authored-by: NGannon McGibbon <gannon.mcgibbon@gmail.com>
-
- 13 4月, 2019 1 次提交
-
-
由 John Hawthorn 提交于
Previously it's possible to have multiple copies of the "same" Template. For example, if index.html.erb is found both the :en and :fr locale, it will return a different Template object for each. The same can happen with formats, variants, and handlers. This commit de-duplicates templates, there will now only be one template per file/virtual_path/locals tuple. We need to consider virtual_path because both `render "index"`, and `render "index.html"` can both find the same file but will have different virtual_paths. IMO this is rare and should be deprecated/removed, but it exists now so we need to consider it in order to cache correctly. This commit introduces a new UnboundTemplate class, which represents a template with unknown locals. Template objects can be built from it by using `#with_locals`. Currently, this is just a convenience around caching templates, but I hope it's a helpful concept that could have more utility in the future.
-
- 05 4月, 2019 1 次提交
-
-
由 John Hawthorn 提交于
This is unnecessary now that we can just provide a file source
-
- 02 4月, 2019 1 次提交
-
-
由 John Hawthorn 提交于
-
- 07 2月, 2019 1 次提交
-
-
由 Aaron Patterson 提交于
Now we can throw away the subclass and the generated methods will get GC'd too
-
- 02 2月, 2019 1 次提交
-
-
由 Aaron Patterson 提交于
Every template that specifies a "virtual path" loses the template source when the template gets compiled: https://github.com/rails/rails/blob/eda0f574f129fcd5ad1fc58b55cb6d1db71ea95c/actionview/lib/action_view/template.rb#L275 The "refresh" method seems to think that the source code for a template can be recovered if there is a virtual path: https://github.com/rails/rails/blob/eda0f574f129fcd5ad1fc58b55cb6d1db71ea95c/actionview/lib/action_view/template.rb#L171-L188 Every call site that allocates a template object *and* provides a "virtual path" reads the template contents from the filesystem: https://github.com/rails/rails/blob/eda0f574f129fcd5ad1fc58b55cb6d1db71ea95c/actionview/lib/action_view/template/resolver.rb#L229-L231 Templates that are inline or literals don't provide a "virtual path": https://github.com/rails/rails/blob/eda0f574f129fcd5ad1fc58b55cb6d1db71ea95c/actionview/lib/action_view/renderer/template_renderer.rb#L34 This commit introduces a `FileTemplate` type that subclasses `Template`. The `FileTemplate` keeps a reference to the filename, and reads the source from the filesystem. This effectively makes the template source immutable. Other classes depended on the source to be mutated while being compiled, so this commit also introduces a temporary way to pass the mutated source to the ERB (or whatever) compiler. See `LegacyTemplate`. I think we should consider it an error to provide a virtual path on a non file type template an non-file templates can't recover their source. Here is an example: https://github.com/rails/rails/blob/eda0f574f129fcd5ad1fc58b55cb6d1db71ea95c/actionview/lib/action_view/testing/resolvers.rb#L53 This provides a "virtual path" so the source code (a string literal) is thrown away after compilation. Clearly we can't recover that string, so I think this should be an error.
-
- 31 12月, 2018 1 次提交
-
-
由 Arun Agrawal 提交于
-
- 31 12月, 2017 1 次提交
-
-
由 Yoshiyuki Hirano 提交于
-
- 31 10月, 2017 1 次提交
-
-
由 yuuji.yaginuma 提交于
`MissingRequestError` is no longer used since 1e2b0ce9.
-
- 21 10月, 2017 1 次提交
-
-
由 Akira Matsuda 提交于
This basically reverts c4d1a4ef
-
- 24 7月, 2017 1 次提交
-
-
由 Kir Shatrov 提交于
-
- 02 7月, 2017 1 次提交
-
-
由 Matthew Draper 提交于
This reverts commit 3420a145, reversing changes made to afb66a5a.
-
- 01 7月, 2017 2 次提交
-
-
由 Akira Matsuda 提交于
-
由 Kir Shatrov 提交于
-
- 23 5月, 2017 1 次提交
-
-
由 bogdanvlviv 提交于
".. with __dir__ we can restore order in the Universe." - by @fxn Related to 5b8738c2
-
- 31 12月, 2016 1 次提交
-
-
由 Jon Moss 提交于
Per https://www.timeanddate.com/counters/firstnewyear.html, it's already 2017 in a lot of places, so we should bump the Rails license years to 2017. [ci skip]
-
- 07 8月, 2016 1 次提交
-
-
由 Xavier Noria 提交于
The current code base is not uniform. After some discussion, we have chosen to go with double quotes by default.
-
- 01 1月, 2016 1 次提交
-
-
由 Rashmi Yadav 提交于
-
- 31 12月, 2014 1 次提交
-
-
由 Arun Agrawal 提交于
-
- 17 6月, 2014 2 次提交
- 16 6月, 2014 1 次提交
-
-
由 Timm 提交于
-
- 01 2月, 2014 2 次提交
-
-
由 Aaron Patterson 提交于
LookupContext is eagerly loaded, and FallbackFileSystemResolver is referenced at the class level. Just require the resolver from the eagerly loaded class rather than jumping through autoload hoops
-
由 Aaron Patterson 提交于
-
- 06 1月, 2014 1 次提交
-
-
由 Washington Luiz 提交于
just like all the other modules do require their version file
-
- 02 1月, 2014 1 次提交
-
-
由 Vipul A M 提交于
-
- 03 12月, 2013 1 次提交
-
-
由 Rafael Mendonça França 提交于
-
- 25 8月, 2013 5 次提交
-
-
由 Łukasz Strzałkowski 提交于
HTML Scanner is part of ActionView and it should be loaded along with it
-
由 Łukasz Strzałkowski 提交于
Name was singular, should be plural
-
由 Łukasz Strzałkowski 提交于
-
由 Łukasz Strzałkowski 提交于
-
由 Łukasz Strzałkowski 提交于
-
- 20 6月, 2013 3 次提交
-
-
由 Łukasz Strzałkowski 提交于
-
由 Piotr Sarnacki 提交于
-
由 Piotr Sarnacki 提交于
This commit creates structure for Action View gem and is first of a series of commits extracting Action View from Action Pack.
-
- 01 1月, 2013 1 次提交
-
-
由 Andrew Nesbitt 提交于
-
- 01 1月, 2012 1 次提交
-
-
由 Andrew Nesbitt 提交于
-
- 23 2月, 2011 1 次提交
-
-
由 Prem Sichanugrist 提交于
Signed-off-by: NSantiago Pastorino <santiago@wyeworks.com>
-