fnando / has_layout
- Source
- Commits
- Network (1)
- Issues (0)
- Downloads (0)
- Wiki (1)
- Graphs
-
Tree:
2646b4d
commit 2646b4d02c4d61b4b0c1a873fbb19b475770abb4
tree ed19ced6831a4b8cb9eedb14791d7f2f4a26a80a
parent df47354081a8ed2200b3237eaeda679f7678a5e7
tree ed19ced6831a4b8cb9eedb14791d7f2f4a26a80a
parent df47354081a8ed2200b3237eaeda679f7678a5e7
has_layout / README.markdown
has_layout
has_layout is plugin that allow to choose the layout with options like
:except, :only, :if and :unless.
Instalation
1) Install the plugin with script/plugin install git://github.com/fnando/has_layout.git
Usage
1) Add the method call has_layout to your controller.
class PagesController < ApplicationController
has_layout 'site', :only => %w(faq feedback)
has_layout 'custom', :except => %w(faq feedback)
has_layout 'admin', :if => proc { current_user.admin? }
has_layout 'public', :unless => proc { !current_user.admin? }
end
Copyright (c) 2008 Nando Vieira, released under the MIT license
