discourse/lib/generators/plugin/templates/routes.rb.erb
Joffrey JAFFEUX d83f99fc2e
DEV: improves rails plugin generator (#7949)
Fixes bugs, simplifies code, more default files. General idea, more is more here as it's easier to just delete things than reading and passing all the options.
2019-07-27 18:21:44 +02:00

8 lines
379 B
Plaintext

require_dependency "<%= underscored_name %>_constraint"
<%= classified_name %>::Engine.routes.draw do
get "/" => "<%= dasherized_name %>#index", constraints: <%= classified_name %>Constraint.new
get "/actions" => "actions#index", constraints: <%= classified_name %>Constraint.new
get "/actions/:id" => "actions#show", constraints: <%= classified_name %>Constraint.new
end