Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Including modules and classes in rails
- module TwitterPost
- include ActionView::Helpers::NumberHelper
- def update
- number_with_delimiter(1234567)
- end
- end
- NoMethodError: undefined method `number_with_delimiter' for TwitterPost:Module
- module TwitterPost
- include ActionView::Helpers::NumberHelper
- def update
- number_with_delimiter(1234567)
- end
- end
- class Foo
- include TwitterPost
- end
- foo = Foo.new
- foo.update
- => "1,234,567"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement