2016-11-16 95 views
1

請告訴我是渲染部分語法

render partial: 'shared/errors', locals: { errors: @project.errors } 

render 'shared/errors', errors: @project.errors 

之間的差呈現局部shared/_errors.rb時?

+4

參見:http://stackoverflow.com/questions/4402556/rails-confused-about-syntax-for-passing-locals-to-partials?rq=1 –

回答