您是我的新手,并没有找到解决此特定问题的解决方案,请提供帮助。
该值未从视图传递到控制器操作。
这是我的观点。
<%= form_tag({action: :update_table_one}, multipart: true, method: :post) do%>
<label class=" control-label">Tables :</label>
<%= select_tag 'val', options_for_select(@v.each{ |value| [ value ] }) %> <br>
<%= button_tag(type: 'submit', class: "btn btn-default") do %>
Submit
<% end %>
<% end %>
这是我的控制器动作
def update_table_one
require 'pg'
value = params[:val]
begin
con = PG.connect :dbname => 'abc', :user => 'Mrx',
:password => 'xyz'
con.exec "DELETE FROM #{value}"
rescue PG::Error => e
puts e.message
ensure
con.close if con
end
end
这是我的控制台
Started GET "/page/update_table?utf8=%E2%9C%93&authenticity_token=pKvsDq8Lj5fI8Gw%2BIa%2BLMnsKIM%2FfElmrCHsQHmmK6xnqZrLr3ei4gVhCipEEu9ntO3fFZ9ZwncLwx0X%2Bdcnrjg%3D%3D&val=+tmp_kapow_test&button=" for ::1 at 2017-03-05 22:41:49 +0530
Processing by PageController#update_table as HTML
Parameters: {"utf8"=>"✓", "authenticity_token"=>"pKvsDq8Lj5fI8Gw+Ia+LMnsKIM/fElmrCHsQHmmK6xnqZrLr3ei4gVhCipEEu9ntO3fFZ9ZwncLwx0X+dcnrjg==", "val"=>" tmp_kapow_test", "button"=>""}
Rendering page/update_table.html.erb within layouts/application
Rendered page/update_table.html.erb within layouts/application (4.2ms)
Completed 200 OK in 2642ms (Views: 182.6ms | ActiveRecord: 0.0ms)
答案 0 :(得分:0)
注意:取决于您的mov esi,esp
ss lodsb ; size of LODS can change result to +-2 or +-4 (+-8 in 64b)
sub esi,esp ; esi = +1/-1 for DF = 0/1, does clobber AL
; sets al ; to get AL = 0/1 for DF = 0/1
ruby
将不与
相同params[:val]
在这种情况下,最有可能出现问题。