Topic: how to avoid duplication/share variables between views and model?
I need to use a variable "api_key" in both my views and a model. The api_key depends on a few factors and I want to avoid duplication and be able to change it in just one place. Is it possible to share a variable (or method) between views and a model?
i'm thinking of making a module in the lib folder and including it in application_helper and the model. is there a more direct way of doing this?
Last edited by sthapit (2007-06-16 12:05:02)