Sha256: 00e097d50c153e6bc1a6cc725c1dc055a07cc82a295869074c5c8ce75b9ea21b

Contents?: true

Size: 948 Bytes

Versions: 2

Compression:

Stored size: 948 Bytes

Contents

# MinimalExposure

minimal_exposure is a really simple way to expose methods, rather than instance variables, to your views in a rails app.

## Installation

Add this line to your application's Gemfile:

    gem 'minimal_exposure'

And then execute:

    $ bundle

Or install it yourself as:

    $ gem install minimal_exposure

## Usage

Proceed as normal.  The instance variables declared in your controllers are now available as methods to your views.
It is important to note that this only works for partials that have been passed 'view_parameters' from the actions base view.
It is recommended to have a base view, i.e. 'new.html.haml' simply render '_new.html.haml' passing in the view_parameters hash.

## Contributing

1. Fork it
2. Create your feature branch (`git checkout -b my-new-feature`)
3. Commit your changes (`git commit -am 'Add some feature'`)
4. Push to the branch (`git push origin my-new-feature`)
5. Create new Pull Request

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
minimal_exposure-0.0.2 README.md
minimal_exposure-0.0.1 README.md