Martin Berli wrote:
[...]
> 
> Are you suggesting to put "everything" into a model, even if it's not 
> related to a database object? So to also put classes into the the 
> app/models directory, which are not of type ActiveRecord::Base ?

Often, yes.  Models are not only for database objects.  Read up on the 
role of the model in MVC: basically it represents *any* domain object. 
In Rails, that usually means AR subclasses, bur it doesn't have to.

> 
> Just as an example: I'm using the FasterCSV gem, in order to read 
> uploaded CSV files into a hash table structure, and do a lot of 
> post-processing with this data. I thought it would be more logical to 
> create a separate class in the rails lib directory, and then use its 
> methods from within my controller.

Your controller should probably not be doing CSV postprocessing.  That's 
more of a model-type responsibility.

Best,
-- 
Marnen Laibow-Koser
http://www.marnen.org
[email protected]
-- 
Posted via http://www.ruby-forum.com/.

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to