What’s the preferred way to add options to an extension. I want to let
the developer configure things like path locations so that their choices
are loaded at startup (and then used by my extension).
-Chris
What’s the preferred way to add options to an extension. I want to let
the developer configure things like path locations so that their choices
are loaded at startup (and then used by my extension).
-Chris
Chris,
I like to use Radiant::Config. So if my extension was named Foo, I
might do something like this:
Radiant::Config[“foo.file_path”] = “/some/path/to/somewhere”
Radiant::Config[“foo.download_enabled?”] = true
Sean
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs