mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
f9960f2d74
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. |
||
---|---|---|
.. | ||
actionpack | ||
comments | ||
custom_pattern | ||
customers | ||
db_definitions | ||
developers | ||
digestor | ||
fun | ||
games | ||
good_customers | ||
helpers | ||
helpers_missing | ||
layout_tests/alt | ||
layouts | ||
mascots | ||
override/test | ||
override2/layouts/test | ||
projects | ||
public | ||
replies | ||
respond_to | ||
test | ||
topics | ||
translations/templates | ||
_top_level_partial.html.erb | ||
_top_level_partial_only.erb | ||
companies.yml | ||
company.rb | ||
developer.rb | ||
developers.yml | ||
developers_projects.yml | ||
mascot.rb | ||
mascots.yml | ||
plain_text.raw | ||
plain_text_with_characters.raw | ||
project.rb | ||
projects.yml | ||
replies.yml | ||
reply.rb | ||
ruby_template.ruby | ||
shared.html.erb | ||
topic.rb | ||
topics.yml | ||
with_format.json.erb |