Getting "uninitialized constant" in Rails app
- by Robert McCabe
I'm new to Rails and feeling my way, but this has me stumped.
I moved some constants to a separate module ie:
module Fns
Fclick = "function() { alert(\"You clicked the map.\");}\n"
...
end
then in my controller added:
require "fns"
class GeomapController < ApplicationController
def index
fstring = Fns::Fclick
...
end
but when I run the server I get:
uninitialized constant Fns::Fclick
what am I missing?