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

Popular posts from this blog

magento2 - Magento 2 admin grid add filter to collection -

Android volley - avoid multiple requests of the same kind to the server? -

Combining PHP Registration and Login into one class with multiple functions in one PHP file -