Thanks, Stephen. This works great, and it does look "pretty". Here are my views now:

<%=h Company::Name %>

That is just what I wanted.

-Nathan


Stephen Waits wrote:
Kevin Clark wrote:
$blah is a global variable.

Which might be ok for just a few things.. If you want to pretty it up, you might consider creating a Module with constants (assuming these are in fact constant, which it sounds like they are in your case). Something like this:

  module AppParameters
    SiteOwner = "Sam Spade"
    ...
  end

Then, throw that into a file (maybe under lib), require it app wide (environment.rb), and access your constants everywhere..

  <%= AppParameters::SiteOwner %>

etc..

One thing though...  I haven't actually tested this.  :)

--Steve


_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby


_______________________________________________
Sdruby mailing list
[email protected]
http://lists.sdruby.com/mailman/listinfo/sdruby

Reply via email to