Skip to content
Permalink
Browse files

Add Movies Controller

  • Loading branch information
ImsirovicAjdin committed Jan 3, 2020
1 parent 8ef2e71 commit 8e01b3dcea56c887d053e2795b36a17d7bb3a57b
@@ -0,0 +1,3 @@
// Place all the styles related to the Movies controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: https://sass-lang.com/
@@ -0,0 +1,29 @@
class MoviesController < ApplicationController
# CREATE
def new
end

def create
end

# READ
def index
end

def show
end

# UPDATE
def edit
end

# DELETE
def update
end

def delete
end

def destroy
end
end
@@ -0,0 +1,2 @@
module MoviesHelper
end
@@ -0,0 +1,2 @@
<h1>Movies#delete</h1>
<p>Find me in app/views/movies/delete.html.erb</p>
@@ -0,0 +1,2 @@
<h1>Movies#edit</h1>
<p>Find me in app/views/movies/edit.html.erb</p>
@@ -0,0 +1,2 @@
<h1>Movies#index</h1>
<p>Find me in app/views/movies/index.html.erb</p>
@@ -0,0 +1,2 @@
<h1>Movies#new</h1>
<p>Find me in app/views/movies/new.html.erb</p>
@@ -0,0 +1,2 @@
<h1>Movies#show</h1>
<p>Find me in app/views/movies/show.html.erb</p>
@@ -1,4 +1,9 @@
Rails.application.routes.draw do
get 'movies/new'
get 'movies/index'
get 'movies/show'
get 'movies/edit'
get 'movies/delete'
# get 'yet_another/index'
# get 'yet_another/update'
# get 'yet_another/edit'
@@ -0,0 +1,29 @@
require 'test_helper'

class MoviesControllerTest < ActionDispatch::IntegrationTest
test "should get new" do
get movies_new_url
assert_response :success
end

test "should get index" do
get movies_index_url
assert_response :success
end

test "should get show" do
get movies_show_url
assert_response :success
end

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

test "should get delete" do
get movies_delete_url
assert_response :success
end

end

0 comments on commit 8e01b3d

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