Ruby on Rails, Using Class Methods?

You should checkout named scopes for what you want to do. Checkout the following articles on how you can use scope to do what you are thinking of doing using class methods: edgerails.info/articles/what-s-new-in-ed... zachholman.com/2010/01/simplifying-rails....

I didn't understand why we need interface for this purpose, if your are looking for a way to write a method outside the class and make use of it, you may look into modules and mixins. If I understand correctly, your requirement can be fulfilled with the use of scope, User model: scope :sixth_grade, where("grade='6'") scope :programs, select("program, count(*) as program_count"). Group("program").

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