def determine_layout
action = params[:action]
%w(index show edit update).include?(action) ? "application" : "sessions"
...
Ruby On Determine layout
by Kryckan,
September 11, 2009 23:05
def determine_layout
action = params[:action]
if action == "index" || action == "show" || action == "edit" || action == "update"
...
Ruby Determine layout
by Kryckan,
September 11, 2009 23:00,
4 refactorings
The code looks ugly and I t...
Never mind, found a nice so...