Skip to content
This repository was archived by the owner on Jun 6, 2020. It is now read-only.
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
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.rbenv-gemsets

Gemfile.lock

# Ignore bundler config.
Expand Down
3 changes: 3 additions & 0 deletions app/assets/javascripts/welcome.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/welcome.css.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the welcome 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/welcome_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
class WelcomeController < ApplicationController
def index
end
end
5 changes: 5 additions & 0 deletions app/helpers/welcome_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
module WelcomeHelper
def title
"PecaUploader - Welcome !!"
end
end
14 changes: 0 additions & 14 deletions app/views/layouts/application.html.erb

This file was deleted.

9 changes: 9 additions & 0 deletions app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
!!!
%html
%head
%title= title ? title : "PecaUploader"
= stylesheet_link_tag "application", media: "all", "data-turbolinks-track" => true
= javascript_include_tag "application", "data-turbolinks-track" => true
= csrf_meta_tags
%body
= yield
3 changes: 3 additions & 0 deletions app/views/welcome/index.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
%ul
%li Top Rate
%li Today
55 changes: 1 addition & 54 deletions config/routes.rb
Original file line number Diff line number Diff line change
@@ -1,56 +1,3 @@
PecaUploader::Application.routes.draw do
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".

# You can have the root of your site routed with "root"
# root 'welcome#index'

# Example of regular route:
# get 'products/:id' => 'catalog#view'

# Example of named route that can be invoked with purchase_url(id: product.id)
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase

# Example resource route (maps HTTP verbs to controller actions automatically):
# resources :products

# Example resource route with options:
# resources :products do
# member do
# get 'short'
# post 'toggle'
# end
#
# collection do
# get 'sold'
# end
# end

# Example resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller
# end

# Example resource route with more complex sub-resources:
# resources :products do
# resources :comments
# resources :sales do
# get 'recent', on: :collection
# end
# end

# Example resource route with concerns:
# concern :toggleable do
# post 'toggle'
# end
# resources :posts, concerns: :toggleable
# resources :photos, concerns: :toggleable

# Example resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
# # (app/controllers/admin/products_controller.rb)
# resources :products
# end
root "welcome#index"
end
8 changes: 8 additions & 0 deletions spec/controllers/welcome_controller_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
require 'spec_helper'

describe WelcomeController do
describe "GET 'index'" do
before { get :index }
it { response.should be_success }
end
end
9 changes: 9 additions & 0 deletions spec/features/welcome/index.html.haml_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
require 'spec_helper'

describe "visit /" do
before { visit '/' }

it { expect(page).to have_title("PecaUploader - Welcome !!") }
it { expect(page).to have_content('Top Rate') }
it { expect(page).to have_content('Today') }
end
8 changes: 8 additions & 0 deletions spec/helpers/welcome_helper_spec.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
require 'spec_helper'

describe WelcomeHelper do
describe "#title" do
subject { helper.title }
it { expect(subject).to eql "PecaUploader - Welcome !!" }
end
end