ruby - view_context equivalent in Rails 2.3 -


looking through railscast 340, datatables/will_paginate, example uses view_context when initiating new instance.

def index   respond_to |format|     format.html     format.json { render json: productsdatatable.new(view_context) }   end end 

i've tried same code realize rails 2.3 not have it.

according docs, equivalent is

view.new[lookup_context, assigns, controller] 

what lookup_context , assigns refer to? i've tried following.

user.new(current_program.users, {}, self) 

however, expected, if pass above in, throw unexpected error 3 1.


Comments

Popular posts from this blog

javascript - Clear button on addentry page doesn't work -

c# - Selenium Authentication Popup preventing driver close or quit -

tensorflow when input_data MNIST_data , zlib.error: Error -3 while decompressing: invalid block type -