search for: anhash

Displaying 2 results from an estimated 2 matches for "anhash".

Did you mean: ahash
2006 Jun 18
4
share an hash ..
Hello, How to share an Hash between all objects (model, controller ect ...) => I did a static Hash in my model where a static method fill it basically, this is the code class Person < ActiveModel @@anHash.new def Person.anHelperMethod(aKey) if anHash.size==0 ... load the hash, some SQL to fill the Hash end return anHash[aKey] end => The problem,: it always reload the Hash ! as it was a local variable .... I don''t understand since it has the good behavior in the co...
2006 Jul 27
2
accessing a variable inside a plugin
Hello, I would like to load an Hash in my init.rb plugin file ... than I would like to use this hash in my module ... in my init.rb: @anHash = load From file... in mymodule: module Amodule def myFunction #@anHash .... end end How can I access to my hash in my plugin module function ? thanks for this dummy question ;-) Arnaud