1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00
rails--rails/actionview/test
Peter Schilling f9960f2d74 Change render to support any hash keys in locals
this lets you pass ruby keywords to templates:

    <%= render 'example', class: "cool" %>

    <%= render 'example', "spaces are" => "a-ok" %>

    <%= render 'example', Foo: "bar" %>

Previously you'd see confusing syntax errors like this:

    SyntaxError (.../_example.html.erb:1: syntax error, unexpected '='

Now you can reference invalid identifiers through local_assigns.

If you try to use an invalid keyword (e.g. class) in your template, you
get a syntax error on the line where you use it.
2016-10-02 00:21:17 -07:00
..
actionpack Fix broken comments indentation caused by rubocop auto-correct [ci skip] 2016-09-14 18:26:32 +09:00
activerecord Fix broken comments indentation caused by rubocop auto-correct [ci skip] 2016-09-14 18:26:32 +09:00
fixtures Change render to support any hash keys in locals 2016-10-02 00:21:17 -07:00
lib/controller applies remaining conventions across the project 2016-08-06 20:20:22 +02:00
template Change render to support any hash keys in locals 2016-10-02 00:21:17 -07:00
tmp Add tmp dir in actionview/test/ 2013-08-05 01:24:14 +05:30
abstract_unit.rb Fix broken comments indentation caused by rubocop auto-correct [ci skip] 2016-09-14 18:26:32 +09:00
active_record_unit.rb Add three new rubocop rules 2016-08-16 04:30:11 -03:00