Home  >  Q&A  >  body text

ruby - rails2.3.11升级到3.2.rec后form_tag 不能正常调用?

在view中form_tag 不能动作!具体的(我用的是haml):

-form_tag :action =>:change_db do
=set_db_button

方法“set_db_button”是我自定的:

def set_db_button
option = ""
DATABASE.each do |db|
option += "<span>#{radio_button_tag "db_name",db,false}#{db}</span>"
end
return option
end

按理来说上面的那个form_tag 会是由几个单选按钮组成。但是什么也没有.

怪我咯怪我咯2762 days ago703

reply all(1)I'll reply

  • ringa_lee

    ringa_lee2017-04-21 10:58:12

    Put it

    -form_tag :action =>:change_db do
    =set_db_button

    changed to

    =form_tag :action =>:change_db do
    =set_db_button

    reply
    0
  • Cancelreply