Class: ActionDispatch::Routing::Mapper

Inherits:
Object
  • Object
show all
Defined in:
lib/lazy_render/rails/routes.rb

Instance Method Summary collapse

Instance Method Details

#lazy_render_for(path, *block) ⇒ Object



6
7
8
9
# File 'lib/lazy_render/rails/routes.rb', line 6

def lazy_render_for(path, *block)
  options = block.extract_options!
  match "#{path}", to: "#{options[:to]}#load", via: 'post'
end