1 2 layout :my_layout_func 3 4 ... 5 6 protected 7 8 def my_layout_func 9 # anything ruby will work 10 ['list','index',nil].include?(action_name)? 11 'noheading':'my_layout' 12 13 # or you could do 14 case action_name 15 when 'monkey': 'monkey_layout' 16 when 'edit' : 'form_layout' 17 end 18 end 19
You need to create an account or log in to post comments to this site.