RailsCasts Pro episodes are now free!
Learn more or hide this
GitHub User: Tomanow
See my comment below for how to do this.
To anyone trying to access instance variables from within the datatable controller, pass the instance variable to a method within a helper. For example:
# application_helper.rb module ApplicationHelper def user_name @user.name end end # datatables/my_datatable.rb class MyDatatable ... def hello_method "Hello, #{@view.user_name}" end end
See my comment below for how to do this.
To anyone trying to access instance variables from within the datatable controller, pass the instance variable to a method within a helper. For example: