toshiyukihina / before_render

Hooker before invoking render method.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BeforeRender

Register your hook method which is invoked before invoking render method.

Installation

Add this line to your application's Gemfile:

gem 'before_render'

And then execute:

$ bundle

Or install it yourself as:

$ gem install before_render

Usage

class SomeController < ApplicationController

  before_render :my_hooker_before_render, only: [...]

  def my_hooker_before_render
    # Invoked before render method.
  end
end

Contributing

Bug reports and pull requests are welcome on GitHub at https://github.com/toshiyukihina/before_render.

License

The gem is available as open source under the terms of the MIT License.

About

Hooker before invoking render method.

License:MIT License


Languages

Language:Ruby 95.0%Language:Shell 5.0%