Rails 3 – Action Mailer

Today I will try to put down some basic changes that ActionMailer got with Rails 3. Using a mailer model and a view, ActionMailer allows you to send emails from Rails application. Mailers get inherited from base class of ActionMailer i.e ActionMailer::Base and views reside with controller views. Generating a mailer is simple. $rails g […]

Read more "Rails 3 – Action Mailer"

Ruby Arrays and Hashes

Came to know about these : Inject method: Say you have an array a1 = [1,2,3,4,5] and you want to sum up the elements, then do this – a1.inject(0) {| sum_so_far, item | sum_so_far + item} This iterates over all the five elements and returns 15. To find the product: a1.injetc(1) { | product, item| […]

Read more "Ruby Arrays and Hashes"