Joined April 2013
·

Sunny Ripert

Cosmic Communication
·
Paris, France
·
·
·

Exactly! Using notice: on redirects is actually a shortcut to flash[:notice].

I only use the return keyword when I need to explicitly stop a method but it's a question of Ruby-style I guess.

You can simplify this further by having your notice called beforehand.

flash[:notice] = ...

You can then return only the urls and therefore remove the arrays, the splat, and the "return" keyword while you are at it.

Achievements
169 Karma
0 Total ProTip Views