I have searched and tried a bunch on different things. None have worked. What am I missing in my routes to cause this error?
resources :the_name do
member do
get 'revert'
end
end
In my controller
def revert
...
end
My view is calling
revert_the_name_path(@some_var)
@some_var is just an instance of the model. IE: @some_var = SomeModelName.new
I’ve tried
resources :the_name do
collection do
get 'revert'
end
end
This will not work if your instance is new record ( like SomeModelName.new )
You need id to generate a member path. Be sure that @some_var.id is not nil.