rails/rails — pull request #7082 by jalkoby (2012-07-18 00:29:39+00:00)
Title: add lazy look up in abstract controller's translate method

As we know in views rails provides a lazy lookup to translate the text. This facilitates reducing code size. But I've always seemed very strange that such a functional is not in the controllers and mailers. In every new project I had a similar method. It would be nice if this was part of the core. So

```ruby

class ProductController < ApplicationController

def create
if @product.save
redirect_to root_path, :notice => t('.saved')
else
flash[:error] = t('.failed')
end
end

end

# will equal to