setting up first view
This commit is contained in:
@@ -30,7 +30,7 @@ gem 'sdoc', '~> 0.4.0', group: :doc
|
|||||||
# gem 'capistrano-rails', group: :development
|
# gem 'capistrano-rails', group: :development
|
||||||
|
|
||||||
gem 'mongoid', '~> 5.0.0'
|
gem 'mongoid', '~> 5.0.0'
|
||||||
|
gem 'bootstrap-sass', '~> 3.3.5'
|
||||||
gem 'slim'
|
gem 'slim'
|
||||||
gem 'slim-rails'
|
gem 'slim-rails'
|
||||||
|
|
||||||
|
|||||||
@@ -37,8 +37,14 @@ GEM
|
|||||||
thread_safe (~> 0.3, >= 0.3.4)
|
thread_safe (~> 0.3, >= 0.3.4)
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
arel (6.0.3)
|
arel (6.0.3)
|
||||||
|
autoprefixer-rails (6.0.3)
|
||||||
|
execjs
|
||||||
|
json
|
||||||
binding_of_caller (0.7.2)
|
binding_of_caller (0.7.2)
|
||||||
debug_inspector (>= 0.0.1)
|
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)
|
bson (3.2.4)
|
||||||
builder (3.2.2)
|
builder (3.2.2)
|
||||||
byebug (6.0.2)
|
byebug (6.0.2)
|
||||||
@@ -183,6 +189,7 @@ PLATFORMS
|
|||||||
ruby
|
ruby
|
||||||
|
|
||||||
DEPENDENCIES
|
DEPENDENCIES
|
||||||
|
bootstrap-sass (~> 3.3.5)
|
||||||
byebug
|
byebug
|
||||||
coffee-rails (~> 4.1.0)
|
coffee-rails (~> 4.1.0)
|
||||||
jbuilder (~> 2.0)
|
jbuilder (~> 2.0)
|
||||||
|
|||||||
@@ -13,4 +13,5 @@
|
|||||||
//= require jquery
|
//= require jquery
|
||||||
//= require jquery_ujs
|
//= require jquery_ujs
|
||||||
//= require turbolinks
|
//= require turbolinks
|
||||||
|
//= require bootstrap-sprockets
|
||||||
//= require_tree .
|
//= require_tree .
|
||||||
|
|||||||
@@ -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_tree .
|
||||||
*= require_self
|
*= require_self
|
||||||
*/
|
*/
|
||||||
|
@import "bootstrap-sprockets"
|
||||||
|
@import "bootstrap"
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
class SuportersController < ApplicationController
|
|
||||||
end
|
|
||||||
@@ -0,0 +1,5 @@
|
|||||||
|
class SupportersController < ApplicationController
|
||||||
|
def new
|
||||||
|
@supporter = Supporter.new
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -1,2 +0,0 @@
|
|||||||
module SuportersHelper
|
|
||||||
end
|
|
||||||
+9
-10
@@ -1,16 +1,15 @@
|
|||||||
class Supporter
|
class Supporter
|
||||||
include Mongoid::Document
|
include Mongoid::Document
|
||||||
|
|
||||||
field :first_name, type: String
|
field :first_name, type: String
|
||||||
field :last_name, type: String
|
field :last_name, type: String
|
||||||
field :street, type: String
|
field :street, type: String
|
||||||
field :zip, type: Integer
|
field :zip, type: Integer
|
||||||
field :email, type: String
|
field :email, type: String
|
||||||
field :support, type: String # Indicates the type of support
|
field :support, type: String # Indicates the type of support
|
||||||
field :votable, type: Boolean
|
|
||||||
|
|
||||||
field :age_category, type: String
|
field :age_category, type: String
|
||||||
|
|
||||||
validates :email, presence: true, uniqueness: true
|
validates :email, presence: true, uniqueness: true
|
||||||
validates :support, presence: true
|
validates :support, presence: true
|
||||||
|
validates :age_category, presence: true
|
||||||
end
|
end
|
||||||
|
|||||||
@@ -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>
|
|
||||||
@@ -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
|
||||||
@@ -0,0 +1 @@
|
|||||||
|
h1 Test
|
||||||
+2
-53
@@ -1,56 +1,5 @@
|
|||||||
Rails.application.routes.draw do
|
Rails.application.routes.draw do
|
||||||
# The priority is based upon order of creation: first created -> highest priority.
|
root 'supporters#new'
|
||||||
# See how all your routes lay out with "rake routes".
|
|
||||||
|
|
||||||
# You can have the root of your site routed with "root"
|
resources :supporters
|
||||||
# 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
|
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user