ruby on rails - The scope of custom helper -


i have defined helper function in helper:

module carshelper    def my_helper     ...   end  end 

but can neither used it(my_helper) in carscontroller nor in car model, custom helper can used in view?

helpers views. can include them in controllers well. add

helper :cars 

to controller. (docs)

models out of scope helpers. use class or instance methods in there instead.


Comments

Popular posts from this blog

java - SNMP4J General Variable Binding Error -

windows - Python Service Installation - "Could not find PythonClass entry" -

Determine if a XmlNode is empty or null in C#? -