diff --git a/Gemfile b/Gemfile index b2d1b60..3aa501b 100644 --- a/Gemfile +++ b/Gemfile @@ -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' diff --git a/Gemfile.lock b/Gemfile.lock index c4542cd..0793634 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -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) diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index e07c5a8..7465856 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -13,4 +13,5 @@ //= require jquery //= require jquery_ujs //= require turbolinks +//= require bootstrap-sprockets //= require_tree . diff --git a/app/assets/javascripts/suporters.coffee b/app/assets/javascripts/suporters.coffee deleted file mode 100644 index 24f83d1..0000000 --- a/app/assets/javascripts/suporters.coffee +++ /dev/null @@ -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/ diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.sass similarity index 93% rename from app/assets/stylesheets/application.css rename to app/assets/stylesheets/application.sass index f9cd5b3..c12d7f0 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.sass @@ -13,3 +13,5 @@ *= require_tree . *= require_self */ +@import "bootstrap-sprockets" +@import "bootstrap" diff --git a/app/controllers/suporters_controller.rb b/app/controllers/suporters_controller.rb deleted file mode 100644 index f52bc72..0000000 --- a/app/controllers/suporters_controller.rb +++ /dev/null @@ -1,2 +0,0 @@ -class SuportersController < ApplicationController -end diff --git a/app/controllers/supporters_controller.rb b/app/controllers/supporters_controller.rb new file mode 100644 index 0000000..c64d6b2 --- /dev/null +++ b/app/controllers/supporters_controller.rb @@ -0,0 +1,5 @@ +class SupportersController < ApplicationController + def new + @supporter = Supporter.new + end +end diff --git a/app/helpers/suporters_helper.rb b/app/helpers/suporters_helper.rb deleted file mode 100644 index 547372d..0000000 --- a/app/helpers/suporters_helper.rb +++ /dev/null @@ -1,2 +0,0 @@ -module SuportersHelper -end diff --git a/app/models/supporter.rb b/app/models/supporter.rb index da36516..50fa02b 100644 --- a/app/models/supporter.rb +++ b/app/models/supporter.rb @@ -1,16 +1,15 @@ class Supporter include Mongoid::Document - field :first_name, type: String - field :last_name, type: String - field :street, type: String - field :zip, type: Integer - field :email, type: String - field :support, type: String # Indicates the type of support - field :votable, type: Boolean - + field :first_name, type: String + field :last_name, type: String + field :street, type: String + field :zip, type: Integer + field :email, type: String + field :support, type: String # Indicates the type of support field :age_category, type: String - validates :email, presence: true, uniqueness: true - validates :support, presence: true + validates :email, presence: true, uniqueness: true + validates :support, presence: true + validates :age_category, presence: true end diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb deleted file mode 100644 index cfe8483..0000000 --- a/app/views/layouts/application.html.erb +++ /dev/null @@ -1,14 +0,0 @@ - - -
-