Passing ActionView::Helpers::FormBuilder to a partial

前端 未结 3 1115
渐次进展
渐次进展 2021-01-05 01:01

I am atempting to dinamically create form elements given a certain AJAX request.

This is my setup:

View:

    <%= link_to \'Next\', check_         


        
3条回答
  •  天涯浪人
    2021-01-05 01:23

    In the view, I've found that 'view_context' does not work in Rails 3.1. Instead try 'self' when creating a FormBuilder object.

    s = ActionView::Helpers::FormBuilder.new(:student, @student, self, {}, proc{})

提交回复
热议问题