Whats is the difference between
render partial: 'shared/errors', locals: { errors: @project.errors }
and
render 'shared/errors', errors: @project.errors
when rendering a partial shared/_errors.rb
?
Whats is the difference between
render partial: 'shared/errors', locals: { errors: @project.errors }
and
render 'shared/errors', errors: @project.errors
when rendering a partial shared/_errors.rb
?
They both seem to be doing exact same thing, but in some cases you have to explicitly specify render partial: '...' if you want to use certain options such as :layout, :collection etc.
As stated here: http://guides.rubyonrails.org/layouts_and_rendering.html#using-partials