Skip to content
This repository has been archived by the owner on Aug 25, 2021. It is now read-only.

Commit

Permalink
Generate attempts controller
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Williams committed Oct 3, 2014
1 parent 68730b1 commit a765c9c
Show file tree
Hide file tree
Showing 8 changed files with 29 additions and 0 deletions.
3 changes: 3 additions & 0 deletions app/assets/javascripts/attempts.js.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
3 changes: 3 additions & 0 deletions app/assets/stylesheets/attempts.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the attempts controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
4 changes: 4 additions & 0 deletions app/controllers/attempts_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class AttemptsController < ApplicationController
def index
end
end
2 changes: 2 additions & 0 deletions app/helpers/attempts_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module AttemptsHelper
end
2 changes: 2 additions & 0 deletions app/views/attempts/index.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1>Attempts#index</h1>
<p>Find me in app/views/attempts/index.html.erb</p>
2 changes: 2 additions & 0 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
Rails.application.routes.draw do
get 'attempts/index'

post '/attempt' => 'hashes#attempt', :as => :attempt

get 'users/index'
Expand Down
9 changes: 9 additions & 0 deletions test/controllers/attempts_controller_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'test_helper'

class AttemptsControllerTest < ActionController::TestCase
test "should get index" do
get :index
assert_response :success
end

end
4 changes: 4 additions & 0 deletions test/helpers/attempts_helper_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require 'test_helper'

class AttemptsHelperTest < ActionView::TestCase
end

0 comments on commit a765c9c

Please sign in to comment.