ruby on rails - Routing Error when using Wicked Gem -
i'm following ryan bate's tutorial , getting routing error. i'm super new @ all, i'm sure it's obvious.
my listing steps controller this
class listingstepscontroller < applicationcontroller include wicked::wizard steps :building, :space, :ownership, :terms def show @property = property.new(params[:building]) render_wizard end def update @property = property.new(params[:building]) render_wizard @property end
end
and building.html.erb file this
<%= form_for @property, url: wizard_path |f| %> <h1> tell building </h1> <div class="form"> <%= f.label :company %><br /> <%= f.text_field :company, autofocus: true, class: "form-control" %> </div> <div class="form-group"> <%= f.label :description %><br> <%= f.text_field :description, class: "form-control" %> </div> <div class="actions"> <%= f.submit "continue" %> </div> <% end %>
and routes file this
rails.application.routes.draw resources :spaces resources :properties resources :listing_steps devise_for :users root 'properties#index' 'list' => "pages#list" 'reserve' => "pages#reserve" end
here terminal readout:
actioncontroller::routingerror (no route matches [post] "/listing_steps/building"): actionpack (4.2.1) lib/action_dispatch/middleware/debug_exceptions.rb:21:in `call' web-console (2.1.2) lib/web_console/middleware.rb:37:in `call' actionpack (4.2.1) lib/action_dispatch/middleware/show_exceptions.rb:30:in `call' railties (4.2.1) lib/rails/rack/logger.rb:38:in `call_app' railties (4.2.1) lib/rails/rack/logger.rb:20:in `block in call' activesupport (4.2.1) lib/active_support/tagged_logging.rb:68:in `block in tagged' activesupport (4.2.1) lib/active_support/tagged_logging.rb:26:in `tagged' activesupport (4.2.1) lib/active_support/tagged_logging.rb:68:in `tagged' railties (4.2.1) lib/rails/rack/logger.rb:20:in `call' actionpack (4.2.1) lib/action_dispatch/middleware/request_id.rb:21:in `call' rack (1.6.1) lib/rack/methodoverride.rb:22:in `call' rack (1.6.1) lib/rack/runtime.rb:18:in `call' activesupport (4.2.1) lib/active_support/cache/strategy/local_cache_middleware.rb:28:in `call' rack (1.6.1) lib/rack/lock.rb:17:in `call' actionpack (4.2.1) lib/action_dispatch/middleware/static.rb:113:in `call' rack (1.6.1) lib/rack/sendfile.rb:113:in `call' railties (4.2.1) lib/rails/engine.rb:518:in `call' railties (4.2.1) lib/rails/application.rb:164:in `call' rack (1.6.1) lib/rack/lock.rb:17:in `call' rack (1.6.1) lib/rack/content_length.rb:15:in `call' rack (1.6.1) lib/rack/handler/webrick.rb:89:in `service' /users/zak/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/webrick/httpserver.rb:138:in `service' /users/zak/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/webrick/httpserver.rb:94:in `run' /users/zak/.rvm/rubies/ruby-2.2.1/lib/ruby/2.2.0/webrick/server.rb:294:in `block in start_thread' rendered /users/zak/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/_trace.html.erb (1.0ms) rendered /users/zak/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/routes/_route.html.erb (2.0ms) rendered /users/zak/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/routes/_table.html.erb (1.0ms) rendered /users/zak/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/_request_and_response.html.erb (1.1ms) rendered /users/zak/.rvm/gems/ruby-2.2.1/gems/actionpack-4.2.1/lib/action_dispatch/middleware/templates/rescues/routing_error.html.erb within rescues/layout (58.5ms) rendered /users/zak/.rvm/gems/ruby-2.2.1/gems/web-console-2.1.2/lib/web_console/templates/_markup.html.erb (0.4ms) rendered /users/zak/.rvm/gems/ruby-2.2.1/gems/web-console-2.1.2/lib/web_console/templates/style.css.erb within layouts/inlined_string (0.3ms) rendered /users/zak/.rvm/gems/ruby-2.2.1/gems/web-console-2.1.2/lib/web_console/templates/_inner_console_markup.html.erb within layouts/inlined_string (0.2ms) rendered /users/zak/.rvm/gems/ruby-2.2.1/gems/web-console-2.1.2/lib/web_console/templates/_prompt_box_markup.html.erb within layouts/inlined_string (0.2ms) rendered /users/zak/.rvm/gems/ruby-2.2.1/gems/web-console-2.1.2/lib/web_console/templates/console.js.erb within layouts/javascript (32.4ms) rendered /users/zak/.rvm/gems/ruby-2.2.1/gems/web-console-2.1.2/lib/web_console/templates/main.js.erb within layouts/javascript (0.3ms) rendered /users/zak/.rvm/gems/ruby-2.2.1/gems/web-console-2.1.2/lib/web_console/templates/error_page.js.erb within layouts/javascript (0.4ms) rendered /users/zak/.rvm/gems/ruby-2.2.1/gems/web-console-2.1.2/lib/web_console/templates/index.html.erb (80.4ms)
thanks help/suggestions
properties_controller.rb
class propertiescontroller < applicationcontroller def create @property = property.new(property_params) if @property.save session[:property_id] = @property.id redirect_to listing_steps_path else render :new end end end
Comments
Post a Comment