Sha256: ac766bea1dbb9ac06469491cbc0bfb841ff67ec2ef6d235bb9df16854fc78799

Contents?: true

Size: 774 Bytes

Versions: 2

Compression:

Stored size: 774 Bytes

Contents

h1. layout_options

The layout_options gem provides a single place to set all of your layouts in
your controller. This gem really shines when using inherited_resources and
you need multiple layouts.

This gem came from that exact scenario.

h2. Usage

To add @layout_options@ to your Rails project and type 'rails generate layout_options:install'

h3. Example

Adding layout_options to your Gemfile:

@gem 'layout_options', '~> 0.1'@

Install @layout_options@:

@rails generate layout_options:install@

Define your layouts in your controllers:

<pre><code>
  class UsersController < ApplicationController
    layout_options :overlay => [:new, :edit], :none => :destroy
    # use :none for your hash key if you don't want any layout to be used
  end
</code></pre>

Thats it!

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
layout_options-0.2.2 README.textile
layout_options-0.2.1 README.textile