1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionview
Andrew White 3bf47b018b Add custom polymorphic mapping
Allow the use of `direct` to specify custom mappings for polymorphic_url, e.g:

  resource :basket
  direct(class: "Basket") { [:basket] }

This will then generate the following:

  >> link_to "Basket", @basket
  => <a href="/basket">Basket</a>

More importantly it will generate the correct url when used with `form_for`.

Fixes #1769.
2017-02-21 15:30:47 +00:00
..
app/assets/javascripts Import rails-ujs v0.1.0 from rails/rails-ujs 2017-02-20 14:29:55 +09:00
bin update bin/test scripts to prevent double runs. 2016-11-21 17:25:12 +01:00
lib Add custom polymorphic mapping 2017-02-21 15:30:47 +00:00
test Import rails-ujs v0.1.0 from rails/rails-ujs 2017-02-20 14:29:55 +09:00
.gitignore Add rails-ujs to Action View 2016-11-26 01:23:07 -05:00
actionview.gemspec use rails-html-sanitizer >= 1.0.3 2017-01-27 13:53:13 +09:00
blade.yml Add rails-ujs to Action View 2016-11-26 01:23:07 -05:00
CHANGELOG.md Change ActionView ERB Handler from Erubis to Erubi 2017-01-25 01:41:27 -07:00
MIT-LICENSE Bump license years for 2017 2016-12-31 08:34:08 -05:00
package.json Add rails-ujs to Action View 2016-11-26 01:23:07 -05:00
Rakefile Fix Rubocop violations and fix documentation visibility 2016-12-28 21:53:51 -05:00
README.rdoc [ci skip] Add a dollar sign to each command in the READMEs 2015-12-06 19:18:52 +01:00
RUNNING_UJS_TESTS.rdoc Wrong rake task name in the document 2016-12-24 07:04:34 +09:00
RUNNING_UNIT_TESTS.rdoc

= 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.

== 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:

* http://www.opensource.org/licenses/MIT


== Support

API documentation is at

* http://api.rubyonrails.org

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

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

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

* https://groups.google.com/forum/?fromgroups#!forum/rubyonrails-core