Skip to content

Instantly share code, notes, and snippets.

@dagi3d
Created September 3, 2010 18:23
Show Gist options
  • Save dagi3d/564312 to your computer and use it in GitHub Desktop.
Save dagi3d/564312 to your computer and use it in GitHub Desktop.
# controllers/foo.rb
#
class FooController < ApplicationController
def index
render :text => Foo.value
end
end
# lib/foo.rb
#
class Foo
cattr_accessor :value
end
# initializers/foo.rb
#
Foo.value = 'FOO'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment