Rails: Model instance method or helper method?

Go with the first (keep in model), also because you might want to do other stuff, like combined indexes :).

Everything directly related to your model should stay in your model. This way, you keep coherent logic and tests.

The difference between first_name and @user. First_name is the point Rails to use database column as attribute instead of private variable if you have the same name vars. If you read the attribute, use first_name, if you write, use self.

First_name.

That doesn't answer the question at all. – Thilo Jul 16 at 8:07 you are right, I read the question quckly and didn't understand the question correctly. Anyway, I agree with Kain and Apneadiving, it should be going on Model layer level – mikhailov Jul 16 at 10:33.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions