I have two lines in my routes.rb that look like this:
resources :locations
get '/locations/:session_series_token/new', to: 'locations#new', as: "new_location"
I want the create
method in my LocationsController, and I also want a specific locations#new
path.
Removing the resources :locations
line causes my #new
form to error with:
undefined method `locations_path' for #<<Class:0x007fa18caeb3b8>:0x007fa18caea8f0>
Extracted source (around line #1):
<%= form_for [@location] do |form| %>
<h2>Class Location</h2>
There must be a way to do this correctly!