Gem simple_form 与 paritial

sforce100 · November 21, 2012 · Last by zhangyuan replied at November 21, 2012 · 1778 hits
simple_form @user do |f|
   f.input
   f.input
...
   render 'parital', :locals => { :f => f }
end
render 'parital', :locals => { :f => f }

传递不了 f

0 Floor has deleted

render 'parital', :f => f 可以吗?

#2 楼 @zhangyuan 居然可以 0.0...这样传有什么不同吗

render :partial =>'parital', :locals => { :f => f } 应该也可以。是你的调用方式写错了,建议看看它的实现

ps: partial 这个词貌似写错了

You need to Sign in before reply, if you don't have an account, please Sign up first.