setting up first view

This commit is contained in:
2015-10-03 06:38:11 +02:00
parent c7a2fbe62c
commit af827b7e77
13 changed files with 37 additions and 85 deletions
+1 -1
View File
@@ -30,7 +30,7 @@ gem 'sdoc', '~> 0.4.0', group: :doc
# gem 'capistrano-rails', group: :development
gem 'mongoid', '~> 5.0.0'
gem 'bootstrap-sass', '~> 3.3.5'
gem 'slim'
gem 'slim-rails'
+7
View File
@@ -37,8 +37,14 @@ GEM
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
arel (6.0.3)
autoprefixer-rails (6.0.3)
execjs
json
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
bootstrap-sass (3.3.5.1)
autoprefixer-rails (>= 5.0.0.1)
sass (>= 3.3.0)
bson (3.2.4)
builder (3.2.2)
byebug (6.0.2)
@@ -183,6 +189,7 @@ PLATFORMS
ruby
DEPENDENCIES
bootstrap-sass (~> 3.3.5)
byebug
coffee-rails (~> 4.1.0)
jbuilder (~> 2.0)
+1
View File
@@ -13,4 +13,5 @@
//= require jquery
//= require jquery_ujs
//= require turbolinks
//= require bootstrap-sprockets
//= require_tree .
-3
View File
@@ -1,3 +0,0 @@
# 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/
@@ -13,3 +13,5 @@
*= require_tree .
*= require_self
*/
@import "bootstrap-sprockets"
@import "bootstrap"
-2
View File
@@ -1,2 +0,0 @@
class SuportersController < ApplicationController
end
+5
View File
@@ -0,0 +1,5 @@
class SupportersController < ApplicationController
def new
@supporter = Supporter.new
end
end
-2
View File
@@ -1,2 +0,0 @@
module SuportersHelper
end
+1 -2
View File
@@ -7,10 +7,9 @@ class Supporter
field :zip, type: Integer
field :email, type: String
field :support, type: String # Indicates the type of support
field :votable, type: Boolean
field :age_category, type: String
validates :email, presence: true, uniqueness: true
validates :support, presence: true
validates :age_category, presence: true
end
-14
View File
@@ -1,14 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<title>Ch420</title>
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
<%= csrf_meta_tags %>
</head>
<body>
<%= yield %>
</body>
</html>
+9
View File
@@ -0,0 +1,9 @@
html
head
title Ch420
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true
= csrf_meta_tags
body
.container
= yield
+1
View File
@@ -0,0 +1 @@
h1 Test
+2 -53
View File
@@ -1,56 +1,5 @@
Rails.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".
root 'supporters#new'
# 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
resources :supporters
end