1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionview
Sean Doyle af6f4be040 Ensure tag.with_options({}).p builds a <p>
Prior to this change, the following call raises:

```ruby
with_options(id: "with-options") { |t| t.p "content" }

```

The `ActionView::Helpers::TagHelper::TagBuilder` implementation relies
on `method_missing` to dispatch calls to `tag_string` where the missing
method name is the resulting element's tagName. Unfortunately,
[`Kernel#p` already exists][Kernel#p] and is invoked before
`method_missing` can intervene.

This commit rectifies this by declaring `TagBuilder#p` and overriding
the existent `#p` instance method.

[Kernel#p]: https://ruby-doc.org/core-2.7.2/Kernel.html#method-i-p
2020-10-05 18:41:49 -04:00
..
app/assets/javascripts Use ES module syntax for application.js.tt and docs 2020-06-16 15:12:12 -04:00
bin Use frozen string literal in actionview/ 2017-07-24 11:53:43 +03:00
lib Ensure tag.with_options({}).p builds a <p> 2020-10-05 18:41:49 -04:00
test Ensure tag.with_options({}).p builds a <p> 2020-10-05 18:41:49 -04:00
.gitignore Clean up and consolidate .gitignores 2018-02-17 14:26:19 -08:00
actionview.gemspec Update the Rails mailing list URLs to new discuss discourse URL [ci skip] 2020-04-02 22:00:28 +05:30
blade.yml Add rails-ujs to Action View 2016-11-26 01:23:07 -05:00
CHANGELOG.md Extend ActionView::Helpers#translate to yield 2020-08-26 20:46:33 +00:00
coffeelint.json Test rails-ujs in our travis matrix 2017-02-22 13:49:28 -05:00
MIT-LICENSE Bump license years from 2019 to 2020 [ci skip] 2020-01-01 15:10:31 +05:30
package.json update package.json files to use https homepage value 2019-10-02 12:00:11 +02:00
Rakefile Load framework test files in deterministic order 2019-12-16 16:55:06 +00:00
README.rdoc Update the Rails mailing list URLs to new discuss discourse URL [ci skip] 2020-04-02 22:00:28 +05:30
RUNNING_UJS_TESTS.rdoc Fix typos and add a few suggestions 2017-11-28 19:27:43 +01:00
RUNNING_UNIT_TESTS.rdoc Fix typos and add a few suggestions 2017-11-28 19:27:43 +01:00

= Action View

Action View is a framework for handling view template lookup and rendering, and provides
view helpers that assist when building HTML forms, Atom feeds and more.
Template formats that Action View handles are ERB (embedded Ruby, typically
used to inline short Ruby snippets inside HTML), and XML Builder.

You can read more about Action View in the {Action View Overview}[https://edgeguides.rubyonrails.org/action_view_overview.html] guide.

== Download and installation

The latest version of Action View can be installed with RubyGems:

  $ gem install actionview

Source code can be downloaded as part of the Rails project on GitHub:

* https://github.com/rails/rails/tree/master/actionview


== License

Action View is released under the MIT license:

* https://opensource.org/licenses/MIT


== Support

API documentation is at

* https://api.rubyonrails.org

Bug reports for the Ruby on Rails project can be filed here:

* https://github.com/rails/rails/issues

Feature requests should be discussed on the rails-core mailing list here:

* https://discuss.rubyonrails.org/c/rubyonrails-core