1

Following is my code.

class PropertyDetailsController < ApplicationController
  include ActionView::Helpers

  #Action methods.
end

But the above code is throwing following error when I try to run.

Module::DelegationError (ActionView::Helpers::ControllerHelper#action_name delegated to controller.action_name, but controller is nil: 

Any Suggestions.

UPDATE Is that true if we use params and session we cant include ActionView::Helpers

Reference: http://alphahydrae.com/2013/06/rails-3-rendering-views-outside-a-controller/

Praveenkumar
  • 921
  • 1
  • 9
  • 28

1 Answers1

1

I believe you have to require 'action_view'

arjun
  • 1,594
  • 16
  • 33