ruby - Rails SelectTag include_blank not working -



ruby - Rails SelectTag include_blank not working -

i using select_tag , populating database using this.

<%= select_tag 'project', options_from_collection_for_select(@issue_statuses,"id", "name"), :include_blank => 'select' , html_options = { :onblur => "myblur(this);", :onchange=> "submit_selected(this);", :style=> "visibility:visible;" } %>

but on including ":include_blank" getting next error:

compile error /home/hitesh/redmine-1.3.0-1/apps/redmine/vendor/plugins/redmine_polls/app/views/questions/index.html.erb:42: syntax error, unexpected ')', expecting tassoc ...le=> "visibility:visible;" } ).to_s); @output_buffer.concat ... ^

how include blank or prompt value in above code.

thnx.

enclose :include_blank phone call within this: {}

<%= select_tag 'project', options_from_collection_for_select([],"id", "name"), {:include_blank => 'select', :onblur => "myblur(this);", :onchange=> "submit_selected(this);", :style=> "visibility:visible;" } %>

ruby-on-rails ruby

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -