Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Generated GuideCards controllers #49

Merged
merged 1 commit into from
Mar 22, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions app/controllers/guide_cards_controller.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# frozen_string_literal: true

# controller for GuideCards
class GuideCardsController < ApplicationController
def index; end

def show; end
end
2 changes: 1 addition & 1 deletion app/helpers/guide_cards_helper.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# frozen_string_literal: true

# a helper for GuideCards
# helper for GuideCards
module GuideCardsHelper
end
2 changes: 2 additions & 0 deletions app/views/guide_cards/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>GuideCards#index</h1>
<p>Find me in app/views/guide_cards/index.html.erb</p>
2 changes: 2 additions & 0 deletions app/views/guide_cards/show.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>GuideCards#show</h1>
<p>Find me in app/views/guide_cards/show.html.erb</p>
2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# frozen_string_literal: true

Rails.application.routes.draw do
get 'guide_cards/index'
get 'guide_cards/show'
resources :guide_cards
# Define your application routes per the DSL in https://guides.rubyonrails.org/routing.html

Expand Down
12 changes: 11 additions & 1 deletion spec/requests/guide_cards_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@

RSpec.describe 'GuideCards', type: :request do
describe 'GET /index' do
pending "add some examples (or delete) #{__FILE__}"
it 'returns http success' do
get '/guide_cards/index'
expect(response).to have_http_status(:success)
end
end

describe 'GET /show' do
it 'returns http success' do
get '/guide_cards/show'
expect(response).to have_http_status(:success)
end
end
end
7 changes: 7 additions & 0 deletions spec/views/guide_cards/index.html.erb_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

require 'rails_helper'

RSpec.describe 'guide_cards/index.html.erb', type: :view do
pending "add some examples to (or delete) #{__FILE__}"
end
7 changes: 7 additions & 0 deletions spec/views/guide_cards/show.html.erb_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# frozen_string_literal: true

require 'rails_helper'

RSpec.describe 'guide_cards/show.html.erb', type: :view do
pending "add some examples to (or delete) #{__FILE__}"
end