基本、パーシャルしかレンダーしないっす。
What's New in Edge Rails: render Stops Being High-Maintenance
2.3からは
render @article
なんとすまーとな。
render @article
- formatted_user_path(:id => '1', :format => 'xml').should == "/users/1.xml" - formatted_user_path(:id => '1', :format => 'json').should == "/users/1.json" + user_path(:id => '1', :format => 'xml').should == "/users/1.xml" + user_path(:id => '1', :format => 'json').should == "/users/1.json"
'<script>alert('y0');</script>'
'alert('y0');'
module ApplicationHelper
~~~~~
def reload_flash(page)
page.replace_html 'flash', :partial => 'layouts/flash'
flash.discard
end
~~~~
end
def お徳用(商品)
return if 商品.length == 0
if 商品.length >6
[商品[0..5]] + お徳用(商品[6..商品.length])
else
[商品[0..5]]
end
end
| The Little Schemer, 4th Edition The MIT Press 1995-12-21 売り上げランキング : 3390 Amazonで詳しく見る by G-Tools |