I'm having a hard time including some view helpers in a file thats in /lib
, say I have this:
module TwitterPost
include ActionView::Helpers::NumberHelper
def update
number_with_delimiter(1234567)
end
end
I get:
NoMethodError: undefined method `number_with_delimiter' for TwitterPost:Module
But in my console, I'm able to just include ActionView::Helpers::NumberHelper
and then I'm able to just do number_with_delimiter(1234567)
and it works just fine.
Why is this? I need to include ActionView::Helpers::NumberHelper
in a bunch of different models as well but I've had no luck in getting it to work.