lib/scaffolding_extensions/jquery_helper.rb
# Javascript that removes @remove_element_id from the page and inserts
# an option into the appropriate select box (unless @auto_complete).
Javascript that removes @remove_element_id from the page and inserts
an option into the appropriate select box (unless @auto_complete).
Javascript that removes @remove_element_id from the page and inserts an option into the appropriate select box ( unless @auto_complete ) .
def scaffold_remove_existing_habtm_element
        content = "$('##{@remove_element_id}').remove();\n"
        content << "$('##{@select_id}').append(\"\\u003Coption value='#{@select_value}' id='#{@select_id}_#{@select_value}'\\u003E#{@select_text}\\u003C/option\\u003E\");\n" unless @auto_complete
        content
      end
def scaffold_remove_existing_habtm_element content = "$('##{@remove_element_id}').remove();\n" content << "$('##{@select_id}').append(\"\\u003Coption value='#{@select_value}' id='#{@select_id}_#{@select_value}'\\u003E#{@select_text}\\u003C/option\\u003E\");\n" unless @auto_complete content end
Javascript that removes @remove_element_id from the page and inserts
an option into the appropriate select box (unless @auto_complete).
Javascript that removes @remove_element_id from the page and inserts an option into the appropriate select box ( unless @auto_complete ) .