You are here: Forums Ask a Rails expert Extending fixnum class...
Posted in Forums : Ask a Rails expert
Authority 12
Posting Rating 0
Sign in to rate this post
|
Hi, noobie here. I need to extend the fixnum class, where do I put the extension so it will be available throughout the application. I tried it in applicationhelper, but it did not seem to work when I tried 10.mynewmethod I get method not found. Any Help appreciated |
Authority 62
Posting Rating 100
Sign in to rate this post
|
This kind of stuff belongs in an initializer (config/initializers) if you’re on Rails 2 or in the environment.rb in Rails 1.x. |
Authority 12
Posting Rating 0
Sign in to rate this post
|
superb thanks a million |
Ask a Rails expert : How to work with ror 2.1.1 using Netbeans IDE 6.1
Ask a Rails expert : json gem error
Ask a Rails expert : Problem with break
Ask a Rails expert : activesupport string first method error
Ask a Rails expert : url_for broken ?
Ask a Rails expert : map.routes.rb pls help
Ask a Rails expert : how to h tag in controller
Ask a Rails expert : Problem with Restful routing and partial form
Ask a Rails expert : will_paginate, search and ajax