Module: Rails5BeforeRender::BeforeRender::ClassMethods
- Defined in:
- lib/before_render/before_render.rb
Instance Method Summary collapse
- #append_before_render_filter(*names, &blk) ⇒ Object (also: #before_render, #append_before_render)
- #prepend_before_render_filter(*names, &blk) ⇒ Object (also: #prepend_before_render)
- #skip_before_render_filter(*names, &blk) ⇒ Object (also: #skip_before_render)
Instance Method Details
#append_before_render_filter(*names, &blk) ⇒ Object Also known as: before_render, append_before_render
15 16 17 18 19 |
# File 'lib/before_render/before_render.rb', line 15 def append_before_render_filter(*names, &blk) _insert_callbacks(names, blk) do |name, | set_callback(:render, :before, name, ) end end |
#prepend_before_render_filter(*names, &blk) ⇒ Object Also known as: prepend_before_render
21 22 23 24 25 |
# File 'lib/before_render/before_render.rb', line 21 def prepend_before_render_filter(*names, &blk) _insert_callbacks(names, blk) do |name, | set_callback(:render, :before, name, .merge(:prepend => true)) end end |
#skip_before_render_filter(*names, &blk) ⇒ Object Also known as: skip_before_render
27 28 29 30 31 |
# File 'lib/before_render/before_render.rb', line 27 def skip_before_render_filter(*names, &blk) _insert_callbacks(names, blk) do |name, | skip_callback(:render, :before, name, ) end end |