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
Post a Comment