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
Post a Comment