Topic: Question about Model and Helper Methods

I'm unsure about not only when to use these, but also how. Example: I was implementing a button that creates a relationship between my Course model and my User model (to subscribe a user to a course). In Michael Hartl's railstutorial, he uses a model method called follow! and calls it in the controller. I tried that (making appropriate changes for my use-case of course), but kept winding up with an 'undefined method' error, so I just moved the logic to the controller for right now.

My question is more general than that though. When do you use a method in the model? Is it only for logic that accesses the database? And helper methods are only for the views, right? I want to follow the 'Fat Model, Skinny Controller' idea, but so far, my app is the opposite of that.

Change is a vector. You can have all the change in the world, but if it doesn't go in the right direction, what good is it? | techonamission.com

Re: Question about Model and Helper Methods

Well, I found a great article (though a little old) that explains cleaning up views by moving logic into the model: http://weblog.jamisbuck.org/2006/10/18/ … -fat-model

That helped a lot with understanding not only what goes where, but also how to call a model method from the view or controller. Being a rails newbie, the

Change is a vector. You can have all the change in the world, but if it doesn't go in the right direction, what good is it? | techonamission.com