Generated controller for root route with 'index' action
This commit is contained in:
3
app/assets/javascripts/landings.js.coffee
Normal file
3
app/assets/javascripts/landings.js.coffee
Normal file
@@ -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
app/assets/stylesheets/landings.css.scss
Normal file
3
app/assets/stylesheets/landings.css.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
// Place all the styles related to the Landings controller here.
|
||||
// They will automatically be included in application.css.
|
||||
// You can use Sass (SCSS) here: http://sass-lang.com/
|
||||
4
app/controllers/landings_controller.rb
Normal file
4
app/controllers/landings_controller.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
class LandingsController < ApplicationController
|
||||
def index
|
||||
end
|
||||
end
|
||||
2
app/helpers/landings_helper.rb
Normal file
2
app/helpers/landings_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module LandingsHelper
|
||||
end
|
||||
2
app/views/landings/index.html.erb
Normal file
2
app/views/landings/index.html.erb
Normal file
@@ -0,0 +1,2 @@
|
||||
<h1>Landings#index</h1>
|
||||
<p>Find me in app/views/landings/index.html.erb</p>
|
||||
@@ -1,4 +1,5 @@
|
||||
PrelangTest::Application.routes.draw do
|
||||
get "landings/index"
|
||||
# The priority is based upon order of creation: first created -> highest priority.
|
||||
# See how all your routes lay out with "rake routes".
|
||||
|
||||
|
||||
9
test/controllers/landings_controller_test.rb
Normal file
9
test/controllers/landings_controller_test.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
require 'test_helper'
|
||||
|
||||
class LandingsControllerTest < ActionController::TestCase
|
||||
test "should get index" do
|
||||
get :index
|
||||
assert_response :success
|
||||
end
|
||||
|
||||
end
|
||||
4
test/helpers/landings_helper_test.rb
Normal file
4
test/helpers/landings_helper_test.rb
Normal file
@@ -0,0 +1,4 @@
|
||||
require 'test_helper'
|
||||
|
||||
class LandingsHelperTest < ActionView::TestCase
|
||||
end
|
||||
Reference in New Issue
Block a user