I don’t know why, but it is generating the path with a . instead of /
if I use
link_to ‘Destroy’, @serie
it generates /series.1
so I had to use this:
link_to ‘Destroy’, series_path + “/” + @serie.id.to_s
In order to get /series/1
but this is a problem to submit, I would have to override it everywhere
Any ideas of what I’ve done wrong?
my routes file:
`Newepisode::Application.routes.draw do
resource :users
resource :series
resources :series
resource :episodes
resources :episodes
resource :user_serie
match “login” => “users#login”
match “logout” => ‘users#logout’
match “signin” => “users#signin”
post “users/do_login”
match “series/load_other_series” => “user_serie#load_other_series”
get “admin” => “admin#index”
match ‘user/:alias’ => ‘series#load_user_series’
match ‘feed/:alias’ => ‘user_serie#feed’
root :to => ‘series#main’
end`
This is your problem:
It should be
or
[Edit]
The same stuff with :episodes…
[Edit]
This is basic stuff… you’re getting this link: /series.1 becouse with this line
you are telling rails that there is only one row in series objects, so the id of the object is irrelevant. You should remove this line and leave only
and don’t forget to restart server after that