thanks in adavance for any help/insights.
i have just finished creating a Magazine model class, that is it’s own
little object, not backed by a db. altogether i have 20 magazines or so,
and they won’t change throughout the application, so there is no need
for a table to back these up. hence, i created the following:
def initialize(mag_id, title, description)
@mag_id = mag_id
@title = title
@description = description
mag0 = Newsletter.new(0, ‘cosmo’, ‘description of the cosmo mag goes
mag1 = Newsletter.new(1, ‘pc magazine’, 'description of the pcs and all
the computers and stuff goes here, ya ')
mag2 = Newsletter.new(2, ‘road trips are good’, ‘description of other
mag3 = Newsletter.new(3, ‘blahs and yas’, 'description of the pcs and
all the computers and stuff goes here, ya ')
mag4 = Newsletter.new(4, ‘moo papa’, ‘gulu is a article sombrero’)
the above objects work fine when i put them straight into the rhtml i
want to display them, but i was hoping that there was a conventional
place that i’m not aware of on where to put these, as when i put them in
the model, the app didn’t recognize these objects.
i can’t put this in enviornment.rb, although for some reason, i feel as
if i should…how should i go about this issue?