This commit is contained in:
benji 2015-04-03 21:27:03 +02:00
parent 983174b67d
commit f4cc8a9a27
3 changed files with 48 additions and 39 deletions

61
Gemfile
View file

@ -3,41 +3,35 @@ source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2'
# Use sqlite3 as the database for Active Record
gem 'sqlite3'
# Use SCSS for stylesheets
gem 'sass-rails', '~> 4.0.3'
gem 'bootstrap-sass', '3.2.0.0'
# Use Uglifier as compressor for JavaScript assets
gem 'uglifier', '>= 1.3.0'
# Use CoffeeScript for .js.coffee assets and views
gem 'coffee-rails', '~> 4.0.0'
# See https://github.com/sstephenson/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# Responders
gem 'responders', '~> 2.0'
# Use jquery as the JavaScript library
gem 'jquery-rails'
# Turbolinks makes following links in your web application faster. Read more: https://github.com/rails/turbolinks
gem 'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem 'jbuilder', '~> 2.0'
# bundle exec rake doc:rails generates the API under doc/api.
gem 'sdoc', '~> 0.4.0', group: :doc
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring', group: :development
# add annotations of schema inside models
gem 'annotate'
gem 'airbrake'
# Deployment
gem 'capistrano', '~> 3.1'
gem 'capistrano-rails', '~> 1.1'
gem 'capistrano-rvm'
gem 'capistrano-passenger'
group :doc do
gem 'sdoc', '~> 0.4.0'
end
group :production do
gem 'mysql2' # Database
@ -49,23 +43,38 @@ group :test do
gem "codeclimate-test-reporter", require: nil
end
group :development do
gem 'annotate'
end
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
gem 'spring', group: :development
# Airbrake
gem 'airbrake'
# Deployment
gem 'capistrano', '~> 3.1'
gem 'capistrano-rails', '~> 1.1'
gem 'capistrano-rvm'
gem 'capistrano-passenger'
# Generate seed data
gem 'faker', '1.4.2'
#bootstrap
gem 'bootstrap-sass', '3.2.0.0'
#debug stuff
# Debug stuff
gem 'byebug'
#paginate stuff
# Paginate stuff
gem 'will_paginate', '3.0.7'
gem 'bootstrap-will_paginate', '0.0.10'
# paperclip for easy file attachment
# Paperclip for easy file attachment
gem 'paperclip'
# Use devise for Admins
# Use devise for users and admins
gem 'devise'
gem 'omniauth-oauth2'
# Use cancancan for authorization
gem 'cancancan'
@ -76,8 +85,8 @@ gem 'paper_trail', '~> 4.0.0.beta'
# Windoos sux
gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw]
# Coveralls
gem 'coveralls', require: false
gem 'omniauth-oauth2'
# Default avatar for users
gem 'identicon'

View file

@ -2,7 +2,7 @@
<%= f.label :total_price %>
<div class="input-group">
<span class="input-group-addon">&euro;</span>
<%= f.number_field :price, skip_label: true, step: :any, class: 'form-control big-form-field' %>
<%= f.number_field :price, disabled: true, skip_label: true, step: :any, class: 'form-control big-form-field' %>
<span class="input-group-btn">
<%= f.submit "Order!", class: "btn btn-primary big-form-button" %>
</span>

View file

@ -14,84 +14,84 @@ products = [
name: "Twix",
price: 0.4,
category: "food",
stock: 0,
stock: 30,
avatar: File.new('public/seeds/products/1.jpg', 'r')
},
{
name: "M&M Peanuts",
price: 0.6,
category: "food",
stock: 0,
stock: 30,
avatar: File.new('public/seeds/products/2.jpg', 'r')
},
{
name: "Snickers",
price: 0.4,
category: "food",
stock: 0,
stock: 30,
avatar: File.new('public/seeds/products/3.jpg', 'r')
},
{
name: "Fanta",
price: 0.6,
category: "beverages",
stock: 0,
stock: 30,
avatar: File.new('public/seeds/products/4.jpg', 'r')
},
{
name: "Ice Tea",
price: 0.7,
category: "beverages",
stock: 0,
stock: 30,
avatar: File.new('public/seeds/products/5.jpg', 'r')
},
{
name: "Cola",
price: 0.6,
category: "beverages",
stock: 0,
stock: 30,
avatar: File.new('public/seeds/products/6.jpg', 'r')
},
{
name: "Abrikozencake",
price: 0.4,
category: "food",
stock: 0,
stock: 30,
avatar: File.new('public/seeds/products/7.jpg', 'r')
},
{
name: "Kinder Delice",
price: 0.4,
category: "food",
stock: 0,
stock: 30,
avatar: File.new('public/seeds/products/8.jpg', 'r')
},
{
name: "Kinder Bueno",
price: 0.6,
category: "food",
stock: 0,
stock: 30,
avatar: File.new('public/seeds/products/9.jpg', 'r')
},
{
name: "Arizona Ice Tea",
price: 1.0,
category: "beverages",
stock: 0,
stock: 30,
avatar: File.new('public/seeds/products/10.png', 'r')
},
{
name: "Dinosauruskoeken",
price: 0.5,
category: "food",
stock: 0,
stock: 30,
avatar: File.new('public/seeds/products/11.jpg', 'r')
},
{
name: "Chocolade - melk",
price: 0.7,
category: "food",
stock: 0,
stock: 30,
avatar: File.new('public/seeds/products/12.jpg', 'r')
}
]