[size=large]有关text_field即时保存:[/size]
在使用的实体里登录的用户必须要有资源权限,否则要不校验。
在使用的实体里登录的用户必须要有资源权限,否则要不校验。
controller
in_place_edit_for :user, :mobile
会生成一个action,set_user_mobile,在提示没有权限时,在skip_before_filter里加上此action,还有一点要注意:会对页面的必填字段进行校验,一般放在单独的页面保存。
view
in_place_text_field :user, :mobile, :object => @dis_sugg, :saving_text =>"保存中...", :save_button_text => "html.button.save"