Reputation: 9820
How could I link to custom controller actions using short and flexible solutions like links_path
or up_link_url(link)
, for this controller route match "/random" => "links#random"
Must manually extend the path or is there a helper out there?
Upvotes: 0
Views: 36
Reputation: 115511
use :as
:
match "/random" => "links#random", :as => :random_links
to create:
random_links_path #and random_links_url
Upvotes: 1