https://github.com/pinzolo/rails-render_hooks
Add callbacks for render method
https://github.com/pinzolo/rails-render_hooks
callbacks ruby ruby-on-rails
Last synced: 7 months ago
JSON representation
Add callbacks for render method
- Host: GitHub
- URL: https://github.com/pinzolo/rails-render_hooks
- Owner: pinzolo
- License: mit
- Created: 2014-06-10T06:13:37.000Z (over 11 years ago)
- Default Branch: master
- Last Pushed: 2019-04-20T14:50:03.000Z (over 6 years ago)
- Last Synced: 2024-04-30T01:42:40.574Z (over 1 year ago)
- Topics: callbacks, ruby, ruby-on-rails
- Language: Ruby
- Homepage:
- Size: 16.6 KB
- Stars: 4
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# rails-render_hooks
[](http://travis-ci.org/pinzolo/rails-render_hooks)
[](https://coveralls.io/r/pinzolo/rails-render_hooks)This gem provides new callbacks to your controller (on RoR).
## Installation
Add this line to your application's Gemfile:
gem 'rails-render_hooks'
And then execute:
$ bundle
Or install it yourself as:
$ gem install rails-render_hooks
## Hooks
* before_render
* prepend_before_render
* skip_before_render
* after_render
* prepend_after_render
* skip_after_render
* around_render
* prepend_around_render
* skip_around_render## Ordering of hooks
1. before_action
1. around_action
1. prepend_around_render
1. prepend_before_render
1. before_render
1. around_render
1. rendering
1. around_render
1. after_render
1. prepend_after_render
1. prepend_around_render
1. around_action
1. after_action## Supported versions
* Ruby: 2.3.x, 2.4.x, 2.5.x, 2.6.x
* Rails: 4.2.x, 5.0.x, 5.1.x, 5.2.x## Contributing
1. Fork it ( https://github.com/pinzolo/rails-render_hooks/fork )
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 a new Pull Request## Changelog
* v1.0.0 (2014-06-10 JST): First release
* v2.0.0 (2019-04-20 JST): Compatible to recent ruby and rails versions