how to use model withour database


I'm new to ruby on rails and I have little problem. I need to make
application that creates list of items on startup. So model shouldnt
have database.

1. Is the best choice to use standard class as model, for example
item.rb in models folder?

2. What's the best way to create collection of model on controller
Is it creating array of model classes in initialize() method of

3. My app should have search functionality based on items name. Is the
best way to simply search array in for loop and return searched items?

Is there any better and simplier approach than this I described?

Thanks in advance


maybe this could help you



The table-less model railscast is kinda outdated and can lead into
something wrong I think :)) It's better to watch this one:

Or read Yehuda's introduction:

Thanks for the answers.

Can you tell me hwt's the best way to make collection of this model
on app startup - is it initialize method of controller and what's the
best way to search that collection - make serch action in controller ?