In my edit.haml file, I have =render :partial => 'old_question_tags', :locals => {:current_question => @question.id}
.
I'd like to pass the value in :current_question to a link_to_remote call in _old_question_tags.haml:
#{link_to_remote image_tag('red-x.png', {:alt => "Remove #{t.name} tag"}), :url => {:action => 'remove_old_tag_from_question', :tag_remove => t.id, :current_question => current_question}}
But I get this error on the link_to_remote
line:
ActionView::TemplateError (undefined local variable or method `current_question' for #<ActionView::Base:0xdb2fec8>)
In _old_question_tags.haml, if I just print current_question (using =current_question
), it prints the number without any problems.
How do I properly pass that value to the partial so that I can pass it to the link_to_remote call?