Rails newbie here (trying to get these questions answered)
I’m using Ryan Bates’ Rails Cast on Wicked Wizard Forms to create a multi-step form. I’m getting a “No route matches [POST] “/user_steps/gender” (where gender is a view under the user_steps controller).
Any ideas?
routes.rb:
Store::Application.routes.draw do
resources :likes
resources :categories
resources :users
resources :user_steps
root to: 'static_pages#home'
user_steps controller:
class UserStepsController < ApplicationController
include Wicked::Wizard
steps :gender, :items, :brands, :final
def show
render_wizard
end
def update
@user.attributes = params[:user]
render_wizard
end
end
When you define a new method, rails will default to a get request on that method. In order to make it a post method, try adding
Check out this routes reference