ruby - Rails app can't upload files that use gem jquery_mobile_rails -
gemfile:
gem 'jquery-rails' gem 'jquery_mobile_rails'
application.js:
//= require jquery.mobile
html:
<form accept-charset="utf-8" action="/home/test" enctype="multipart/form-data" method="post"> <br> <div class="ui-input-text ui-body-inherit ui-corner-all ui-shadow-inset"> <input id="test" name="test" type="file"> </div> <div class="ui-btn ui-input-btn ui-corner-all ui-shadow"> <input type="submit"> </div> </form>
controller:
class homecontroller < applicationcontroller skip_before_filter :verify_authenticity_token, only: [:test] def index end def test binding.pry end end
after current selection file submitted, no params[:test] in params. when rid of "//= require jquery.mobile",params[:test] in params. not know have not encountered, how solve?
Comments
Post a Comment