Passing option to helper


I'm a bit stumped as to how to pass options to these helpers:

# helpers
  def generate_html(form_builder, method, options = {})
    options[:object] ||=
    options[:partial] ||= method.to_s.singularize
    options[:form_builder_local] ||= :f
    form_builder.fields_for(method, options[:object], :child_index =>
'NEW_RECORD') do |f|
      render(:partial => options[:partial], :locals => {
options[:form_builder_local] => f })

  def generate_template(form_builder, method, options = {})
    escape_javascript generate_html(form_builder, method, options = {})

The first problem I have is I cannot escape the quotation mark inside
the option hash, backslash does not work somehow.
# view - this does not work
<%= "var keyword='#{generate_template(form, :keywords, {:partial =>
'nested_shared/keyword'})}\'" %>

Second problem is the option is not passed between the two helpers
# view
<%= "var keyword='#{generate_template(form, :keywords, {:partial =>
:test})}\'" %>

I can see the option in generate template but it's not passed onward to
generate html.

Help would be much appreciated