layouts = Dir['app/views/layouts/*'].map {|f| File.basename(f,'.html.erb') # returns 'layout' for 'layout.html.erb' }