Commit 953ac793
Changed files (3)
app/controllers/comments_controller.rb
@@ -0,0 +1,3 @@
+class CommentsController < ApplicationController
+
+end
config/routes.rb
@@ -4,6 +4,7 @@ Cake::Application.routes.draw do
get "why_cakeside" => "home#why_cakeside"
get 'dashboard', to: 'dashboard#index'
+ post 'comments', to: 'comments#create'
resources :tutorials do
get 'page/:page', :action => :index, :on => :collection
spec/routing/comments_routing_spec.rb
@@ -0,0 +1,8 @@
+require "spec_helper"
+
+
+describe "/comments" do
+ it "routes to the create action" do
+ expect({ :post => '/comments' }).to route_to(controller: 'comments', action: 'create')
+ end
+end