Module: HasStar::Route
- Defined in:
- lib/has_star/route.rb
Instance Method Summary collapse
Instance Method Details
#has_star(controller) ⇒ Object
3 4 5 6 7 8 9 10 11 12 |
# File 'lib/has_star/route.rb', line 3 def has_star(controller) patch "/#{controller}/:id/toggle_star" => "#{controller}#toggle_star", as: "toggle_star_#{controller.to_s.singularize}" get "/#{controller}/starred" => "#{controller}#starred", as: "starred_#{controller}" get "/#{controller}/unstarred" => "#{controller}#unstarred", as: "unstarred_#{controller}" end |