Hey Everyone.

First day diving in to ROR and Ruby...

My question is how do you define methods with in the model class and/or
should I even be doing this?

It is my understanding that you should put as much of the business logic
into the model as possible.  I want to do some data manipulation before
I things are submitted to the database

IE (Create a variable out of two submitted via form, as well as some
other things.)

Should this all be done in the model? If so how do I declare and call
these methods?

def method_name
def self.method_name
def class_name.method_name

don't seem to work for me?

should I define them in the model and call them in controller?  This
doesn't seem right to me?

Any Help would be appropriated.

-N
-- 
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 rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to