Skip to content
Permalink
Browse files

Add another controller

  • Loading branch information
ImsirovicAjdin committed Dec 23, 2019
1 parent ecdcb35 commit 0dbb09183fe572ad7317d9539aa95468cc386ec3
@@ -0,0 +1,3 @@
// Place all the AnotherController styles here.
// These will be auto-imported to application.css
// Visit https://sass-lang.com for info.
@@ -0,0 +1,13 @@
class AnotherController < ApplicationController
def index
end

def update
end

def edit
end

def hello
end
end
@@ -0,0 +1,2 @@
module AnotherHelper
end
@@ -0,0 +1,2 @@
<h1>AnotherController#edit</h1>
<p>Find me in app/views/another/edit.html.erb</p>
@@ -0,0 +1,2 @@
<h1>AnotherController#hello</h1>
<p>Find me in app/views/another/hello.html.erb</p>
@@ -0,0 +1,2 @@
<h1>AnotherController#index</h1>
<p>Find me in app/views/another/index.html.erb</p>
@@ -0,0 +1,2 @@
<h1>AnotherController#update</h1>
<p>Find me in app/views/another/update.html.erb</p>
@@ -1,4 +1,8 @@
Rails.application.routes.draw do
get 'yet_another/index'
get 'yet_another/update'
get 'yet_another/edit'
get 'yet_another/hello'
# get 'play/index'
# get ':controller(/:action(/:id))'
match "/", :to => "play#index", :via => :get
@@ -0,0 +1,24 @@
require 'test_helper'

class AnotherControllerTest < ActionDispatch::IntegrationTest
test "should get index" do
get another_index_url
assert_response :success
end

test "should get update" do
get another_update_url
assert_response :success
end

test "should get edit" do
get another_edit_url
assert_response :success
end

test "should get hello" do
get another_hello_url
assert_response :success
end

end

0 comments on commit 0dbb091

Please sign in to comment.
You can’t perform that action at this time.