box-o-sand/oldstuff/RubyFun/cookbook/015/hodgepodge/app/controllers/foo_controller.rb

19 lines
227 B
Ruby
Raw Normal View History

2011-08-09 10:33:51 +00:00
class FooController < ApplicationController
layout :figure_out_layout
2011-08-09 10:33:51 +00:00
def index
end
def pretty
end
def figure_out_layout
if action_name =~ /pretty/
'pretty'
else
'standard'
end
end
2011-08-09 10:33:51 +00:00
end