I am using a shared template from within another template AND also using the same from a controller action.
It works fine when called from the template BUT when called from the controller the parameter is not passed in from the controller.
the controller action is -
@picture = Picture.find(params[:id])
render(:template=>“shared/trip”, “image” => @picture)
and the shared template is - trip.rhtml
The template is invoked but the image variable within the template is nil.
You have a nil object when you didn't expect it! The error occured while evaluating nil.file_name