--------------------------------------------------------------------------------
/config/initializers/backtrace_silencers.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4 | # Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
5 |
6 | # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
7 | # Rails.backtrace_cleaner.remove_silencers!
8 |
--------------------------------------------------------------------------------
/config/initializers/session_store.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | Fridgechart::Application.config.session_store :cookie_store, key: '_fridgechart_session'
4 |
5 | # Use the database for sessions instead of the cookie-based default,
6 | # which shouldn't be used to store highly confidential information
7 | # (create the session table with "rails generate session_migration")
8 | # Fridgechart::Application.config.session_store :active_record_store
9 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # See http://help.github.com/ignore-files/ for more about ignoring files.
2 | #
3 | # If you find yourself ignoring temporary files generated by your text editor
4 | # or operating system, you probably want to add a global ignore instead:
5 | # git config --global core.excludesfile ~/.gitignore_global
6 |
7 | # Ignore bundler config
8 | /.bundle
9 |
10 | # Ignore the default SQLite database.
11 | /db/*.sqlite3
12 |
13 | # Ignore all logfiles and tempfiles.
14 | /log/*.log
15 | /tmp
16 |
--------------------------------------------------------------------------------
/spec/requests/static_pages_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe "Static pages" do
4 |
5 | describe "Home page" do
6 |
7 | it "should have the h1 'FridgeChart'" do
8 | visit root_path
9 | page.should have_selector('h1', :text => 'FridgeChart')
10 | end
11 |
12 | it "should have the title 'FridgeChart'" do
13 | visit root_path
14 | page.should have_selector('title',
15 | :text => "FridgeChart | Home")
16 | end
17 | end
18 | end
--------------------------------------------------------------------------------
/config/initializers/secret_token.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Your secret key for verifying the integrity of signed cookies.
4 | # If you change this key, all old signed cookies will become invalid!
5 | # Make sure the secret is at least 30 characters and all random,
6 | # no regular words or you'll be exposed to dictionary attacks.
7 | Fridgechart::Application.config.secret_token = '8d2882bdca28a1ea7302e59296317b2859702dbb0d20d250724ba69728781a93ae589ea1e608e12a91b419d3981ad75d1c94ace1216a67f2a2c0c429f5785f3c'
8 |
--------------------------------------------------------------------------------
/config/initializers/wrap_parameters.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 | #
3 | # This file contains settings for ActionController::ParamsWrapper which
4 | # is enabled by default.
5 |
6 | # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7 | ActiveSupport.on_load(:action_controller) do
8 | wrap_parameters format: [:json]
9 | end
10 |
11 | # Disable root element in JSON by default.
12 | ActiveSupport.on_load(:active_record) do
13 | self.include_root_in_json = false
14 | end
15 |
--------------------------------------------------------------------------------
/config/initializers/inflections.rb:
--------------------------------------------------------------------------------
1 | # Be sure to restart your server when you modify this file.
2 |
3 | # Add new inflection rules using the following format
4 | # (all these examples are active by default):
5 | # ActiveSupport::Inflector.inflections do |inflect|
6 | # inflect.plural /^(ox)$/i, '\1en'
7 | # inflect.singular /^(ox)en/i, '\1'
8 | # inflect.irregular 'person', 'people'
9 | # inflect.uncountable %w( fish sheep )
10 | # end
11 | #
12 | # These inflection rules are supported but not enabled by default:
13 | # ActiveSupport::Inflector.inflections do |inflect|
14 | # inflect.acronym 'RESTful'
15 | # end
16 |
--------------------------------------------------------------------------------
/app/views/stocks/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_for @stock do |f| %>
2 | <%= render 'shared/error_messages', object: f.object %>
3 |
12 | <%= f.submit 'Submit', :class => 'btn btn-primary' %>
13 | <% end %>
14 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/application.css:
--------------------------------------------------------------------------------
1 | /*
2 | * This is a manifest file that'll be compiled into application.css, which will include all the files
3 | * listed below.
4 | *
5 | * Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6 | * or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
7 | *
8 | * You're free to add application-wide styles to this file and they'll appear at the top of the
9 | * compiled file, but it's generally better to create a new file per style scope.
10 | *
11 | *= require_self
12 | *= require select2
13 | *= require bootstrap-datepicker
14 | *= require_tree .
15 | */
16 |
--------------------------------------------------------------------------------
/config/database.yml:
--------------------------------------------------------------------------------
1 | # SQLite version 3.x
2 | # gem install sqlite3
3 | #
4 | # Ensure the SQLite 3 gem is defined in your Gemfile
5 | # gem 'sqlite3'
6 | development:
7 | adapter: sqlite3
8 | database: db/development.sqlite3
9 | pool: 5
10 | timeout: 5000
11 |
12 | # Warning: The database defined as "test" will be erased and
13 | # re-generated from your development database when you run "rake".
14 | # Do not set this db to the same as development or production.
15 | test:
16 | adapter: sqlite3
17 | database: db/test.sqlite3
18 | pool: 5
19 | timeout: 5000
20 |
21 | production:
22 | adapter: sqlite3
23 | database: db/production.sqlite3
24 | pool: 5
25 | timeout: 5000
26 |
--------------------------------------------------------------------------------
/public/500.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | We're sorry, but something went wrong (500)
5 |
17 |
18 |
19 |
20 |
21 |
16 | <% end %>
17 | <%= yield %>
18 |
19 |
20 |
--------------------------------------------------------------------------------
/app/assets/javascripts/application.js:
--------------------------------------------------------------------------------
1 | // This is a manifest file that'll be compiled into application.js, which will include all the files
2 | // listed below.
3 | //
4 | // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5 | // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
6 | //
7 | // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
8 | // the compiled file.
9 | //
10 | // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
11 | // GO AFTER THE REQUIRES BELOW.
12 | //
13 | //= require jquery
14 | //= require jquery_ujs
15 | //= require bootstrap
16 | //= require bootstrap-datepicker
17 | //= require select2
18 | //= require_tree .
19 |
--------------------------------------------------------------------------------
/public/422.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | The change you wanted was rejected (422)
5 |
17 |
18 |
19 |
20 |
21 |
22 |
The change you wanted was rejected.
23 |
Maybe you tried to change something you didn't have access to.
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/spec/models/stock_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe Stock do
4 |
5 | before do
6 | @stock = Stock.new(food_id: 1, expiration: "2013-02-13 07:21:40.423921", quantity: 5)
7 | end
8 |
9 | subject { @stock }
10 |
11 | it { should respond_to(:food_id) }
12 | it { should respond_to(:expiration) }
13 | it { should respond_to(:quantity) }
14 |
15 | it { should be_valid }
16 |
17 | describe "when food_id is not present" do
18 | before { @stock.food_id = nil }
19 | it { should_not be_valid }
20 | end
21 |
22 | describe "when expiration is not present" do
23 | before { @stock.expiration = " " }
24 | it { should_not be_valid }
25 | end
26 |
27 | describe "when quantity is not present" do
28 | before { @stock.quantity = " " }
29 | it { should_not be_valid }
30 | end
31 | end
--------------------------------------------------------------------------------
/app/views/foods/_form.html.erb:
--------------------------------------------------------------------------------
1 | <%= form_for @food do |f| %>
2 | <%= render 'shared/error_messages', object: f.object %>
3 |
13 | <%= f.submit "Submit", :class => 'btn btn-primary' %>
14 | <% end %>
--------------------------------------------------------------------------------
/Gemfile:
--------------------------------------------------------------------------------
1 | source 'https://rubygems.org'
2 |
3 | gem 'rails', '3.2.12'
4 |
5 | group :development, :test do
6 | gem 'sqlite3', '1.3.5'
7 | gem 'rspec-rails', '2.11.0'
8 | gem 'guard-rspec', '1.2.1'
9 | gem 'guard-spork', '1.2.0'
10 | gem 'spork', '0.9.2'
11 | end
12 |
13 | # Gems used only for assets and not required
14 | # in production environments by default.
15 | group :assets do
16 | gem 'sass-rails', '3.2.5'
17 | gem 'coffee-rails', '3.2.2'
18 | gem 'uglifier', '1.2.3'
19 | gem 'bootstrap-sass', '~> 2.3.0.0'
20 | gem 'bootstrap-datepicker-rails'
21 | gem 'select2-rails'
22 | end
23 |
24 | gem 'jquery-rails', '2.0.2'
25 |
26 | group :test do
27 | gem 'capybara', '1.1.2'
28 | gem 'rb-fsevent', '0.9.1', :require => false
29 | gem 'growl', '1.0.3'
30 | end
31 |
32 | group :production do
33 | gem 'pg', '0.12.2'
34 | end
--------------------------------------------------------------------------------
/public/404.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | The page you were looking for doesn't exist (404)
5 |
17 |
18 |
19 |
20 |
21 |
22 |
The page you were looking for doesn't exist.
23 |
You may have mistyped the address or the page may have moved.
24 |
25 |
26 |
27 |
--------------------------------------------------------------------------------
/app/assets/stylesheets/custom.css.scss:
--------------------------------------------------------------------------------
1 | @import "bootstrap";
2 |
3 | $fridgeblue: #2480de;
4 |
5 | h1 {
6 | color: $fridgeblue;
7 | font-family: 'Open Sans', sans-serif;
8 | }
9 |
10 | h3 {
11 | font-family: 'Open Sans', sans-serif;
12 | }
13 |
14 | .center {
15 | text-align:center;
16 | }
17 |
18 | .top_banner {
19 | background: url('/assets/gray_jean.png') repeat;
20 | height: 300px;
21 | }
22 |
23 | .navbar .brand {
24 | padding: 6px 20px 0px;
25 | }
26 |
27 | .nav li a {
28 | font-family: 'Open Sans', sans-serif;
29 | }
30 |
31 | .nav li {
32 | padding-top: 3px;
33 | }
34 |
35 | .nav > li.active {
36 | border-top: 3px solid #fff;
37 | padding-top: 0px;
38 | }
39 |
40 | #lower_banner {
41 | padding-top: 30px;
42 | }
43 |
44 | #top_slogan {
45 | margin-top: 50px;
46 | }
47 |
48 | #home_demo_button {
49 | margin-top:25px;
50 | }
--------------------------------------------------------------------------------
/app/controllers/foods_controller.rb:
--------------------------------------------------------------------------------
1 | class FoodsController < ApplicationController
2 | def new
3 | @food = Food.new
4 | end
5 |
6 | def create
7 | @food = Food.new(params[:food])
8 | if @food.save
9 | redirect_to @food, notice: "Created New Food!"
10 | else
11 | render :new
12 | end
13 | end
14 |
15 | def edit
16 | @food = Food.find(params[:id])
17 | end
18 |
19 | def update
20 | @food = Food.find(params[:id])
21 | if @food.update_attributes(params[:food])
22 | redirect_to @food, notice: "Updated Food!"
23 | else
24 | render 'edit'
25 | end
26 | end
27 |
28 | def show
29 | @food = Food.find(params[:id])
30 | end
31 |
32 | def index
33 | @foods = Food.order("id").all
34 | end
35 |
36 | def destroy
37 | @food = Food.find(params[:id])
38 | @food.destroy
39 | redirect_to foods_path, notice: "Deleted Food!"
40 | end
41 |
42 | end
43 |
--------------------------------------------------------------------------------
/app/controllers/stocks_controller.rb:
--------------------------------------------------------------------------------
1 | class StocksController < ApplicationController
2 | def new
3 | @stock = Stock.new
4 | end
5 |
6 | def create
7 | @stock = Stock.new(params[:stock])
8 | if @stock.save
9 | redirect_to @stock, notice: "Created New Stock!"
10 | else
11 | render :new
12 | end
13 | end
14 |
15 | def edit
16 | @stock = Stock.find(params[:id])
17 | end
18 |
19 | def update
20 | @stock = Stock.find(params[:id])
21 | if @stock.update_attributes(params[:stock])
22 | redirect_to @stock, notice: "Updated Stock!"
23 | else
24 | render 'edit'
25 | end
26 | end
27 |
28 | def show
29 | @stock = Stock.find(params[:id])
30 | end
31 |
32 | def index
33 | @stocks = Stock.order("id").all
34 | end
35 |
36 | def destroy
37 | @stock = Stock.find(params[:id])
38 | @stock.destroy
39 | redirect_to stocks_path, notice: "Deleted Stock!"
40 | end
41 |
42 | end
43 |
--------------------------------------------------------------------------------
/spec/models/food_spec.rb:
--------------------------------------------------------------------------------
1 | require 'spec_helper'
2 |
3 | describe Food do
4 |
5 | before do
6 | @food = Food.new(name: "Apple", food_type: "Produce", lcd_unit: "Apple")
7 | end
8 |
9 | subject { @food }
10 |
11 | it { should respond_to(:name) }
12 | it { should respond_to(:food_type) }
13 | it { should respond_to(:lcd_unit) }
14 |
15 | it { should be_valid }
16 |
17 | describe "when name is not present" do
18 | before { @food.name = " " }
19 | it { should_not be_valid }
20 | end
21 |
22 | describe "when food_type is not present" do
23 | before { @food.food_type = " " }
24 | it { should_not be_valid }
25 | end
26 |
27 | describe "when lcd_unit is not present" do
28 | before { @food.lcd_unit = " " }
29 | it { should_not be_valid }
30 | end
31 |
32 | describe "when name is already taken" do
33 | before do
34 | food_with_same_name = @food.dup
35 | food_with_same_name.name = @food.name.upcase
36 | food_with_same_name.save
37 | end
38 |
39 | it { should_not be_valid }
40 | end
41 |
42 | end
--------------------------------------------------------------------------------
/db/schema.rb:
--------------------------------------------------------------------------------
1 | # encoding: UTF-8
2 | # This file is auto-generated from the current state of the database. Instead
3 | # of editing this file, please use the migrations feature of Active Record to
4 | # incrementally modify your database, and then regenerate this schema definition.
5 | #
6 | # Note that this schema.rb definition is the authoritative source for your
7 | # database schema. If you need to create the application database on another
8 | # system, you should be using db:schema:load, not running all the migrations
9 | # from scratch. The latter is a flawed and unsustainable approach (the more migrations
10 | # you'll amass, the slower it'll run and the greater likelihood for issues).
11 | #
12 | # It's strongly recommended to check this file into your version control system.
13 |
14 | ActiveRecord::Schema.define(:version => 20130213064609) do
15 |
16 | create_table "foods", :force => true do |t|
17 | t.string "name"
18 | t.string "food_type"
19 | t.string "lcd_unit"
20 | t.datetime "created_at", :null => false
21 | t.datetime "updated_at", :null => false
22 | end
23 |
24 | add_index "foods", ["name"], :name => "index_foods_on_name", :unique => true
25 |
26 | create_table "stocks", :force => true do |t|
27 | t.integer "food_id"
28 | t.datetime "expiration"
29 | t.integer "quantity"
30 | t.datetime "created_at", :null => false
31 | t.datetime "updated_at", :null => false
32 | end
33 |
34 | end
35 |
--------------------------------------------------------------------------------
/config/environments/development.rb:
--------------------------------------------------------------------------------
1 | Fridgechart::Application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb
3 |
4 | # In the development environment your application's code is reloaded on
5 | # every request. This slows down response time but is perfect for development
6 | # since you don't have to restart the web server when you make code changes.
7 | config.cache_classes = false
8 |
9 | # Log error messages when you accidentally call methods on nil.
10 | config.whiny_nils = true
11 |
12 | # Show full error reports and disable caching
13 | config.consider_all_requests_local = true
14 | config.action_controller.perform_caching = false
15 |
16 | # Don't care if the mailer can't send
17 | config.action_mailer.raise_delivery_errors = false
18 |
19 | # Print deprecation notices to the Rails logger
20 | config.active_support.deprecation = :log
21 |
22 | # Only use best-standards-support built into browsers
23 | config.action_dispatch.best_standards_support = :builtin
24 |
25 | # Raise exception on mass assignment protection for Active Record models
26 | config.active_record.mass_assignment_sanitizer = :strict
27 |
28 | # Log the query plan for queries taking more than this (works
29 | # with SQLite, MySQL, and PostgreSQL)
30 | config.active_record.auto_explain_threshold_in_seconds = 0.5
31 |
32 | # Do not compress assets
33 | config.assets.compress = false
34 |
35 | # Expands the lines which load the assets
36 | config.assets.debug = true
37 | end
38 |
--------------------------------------------------------------------------------
/config/environments/test.rb:
--------------------------------------------------------------------------------
1 | Fridgechart::Application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb
3 |
4 | # The test environment is used exclusively to run your application's
5 | # test suite. You never need to work with it otherwise. Remember that
6 | # your test database is "scratch space" for the test suite and is wiped
7 | # and recreated between test runs. Don't rely on the data there!
8 | config.cache_classes = true
9 |
10 | # Configure static asset server for tests with Cache-Control for performance
11 | config.serve_static_assets = true
12 | config.static_cache_control = "public, max-age=3600"
13 |
14 | # Log error messages when you accidentally call methods on nil
15 | config.whiny_nils = true
16 |
17 | # Show full error reports and disable caching
18 | config.consider_all_requests_local = true
19 | config.action_controller.perform_caching = false
20 |
21 | # Raise exceptions instead of rendering exception templates
22 | config.action_dispatch.show_exceptions = false
23 |
24 | # Disable request forgery protection in test environment
25 | config.action_controller.allow_forgery_protection = false
26 |
27 | # Tell Action Mailer not to deliver emails to the real world.
28 | # The :test delivery method accumulates sent emails in the
29 | # ActionMailer::Base.deliveries array.
30 | config.action_mailer.delivery_method = :test
31 |
32 | # Raise exception on mass assignment protection for Active Record models
33 | config.active_record.mass_assignment_sanitizer = :strict
34 |
35 | # Print deprecation notices to the stderr
36 | config.active_support.deprecation = :stderr
37 | end
38 |
--------------------------------------------------------------------------------
/Guardfile:
--------------------------------------------------------------------------------
1 | # A sample Guardfile
2 | # More info at https://github.com/guard/guard#readme
3 |
4 | require 'active_support/core_ext'
5 |
6 | guard 'spork', :rspec_env => { 'RAILS_ENV' => 'test' } do
7 | watch('config/application.rb')
8 | watch('config/environment.rb')
9 | watch(%r{^config/environments/.+\.rb$})
10 | watch(%r{^config/initializers/.+\.rb$})
11 | watch('Gemfile')
12 | watch('Gemfile.lock')
13 | watch('spec/spec_helper.rb')
14 | watch('test/test_helper.rb')
15 | watch('spec/support/')
16 | end
17 |
18 | guard 'rspec', :version => 2, :all_after_pass => false, :cli => '--drb' do
19 | watch(%r{^spec/.+_spec\.rb$})
20 | watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
21 | watch('spec/spec_helper.rb') { "spec" }
22 |
23 | # Rails example
24 | watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
25 | watch(%r{^app/(.*)(\.erb|\.haml)$}) { |m| "spec/#{m[1]}#{m[2]}_spec.rb" }
26 | watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb", "spec/acceptance/#{m[1]}_spec.rb"] }
27 | watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
28 | watch('config/routes.rb') { "spec/routing" }
29 | watch('app/controllers/application_controller.rb') { "spec/controllers" }
30 |
31 | watch(%r{^app/controllers/(.+)_(controller)\.rb$}) do |m|
32 | ["spec/routing/#{m[1]}_routing_spec.rb",
33 | "spec/#{m[2]}s/#{m[1]}_#{m[2]}_spec.rb",
34 | "spec/acceptance/#{m[1]}_spec.rb",
35 | (m[1][/_pages/] ? "spec/requests/#{m[1]}_spec.rb" :
36 | "spec/requests/#{m[1].singularize}_pages_spec.rb")]
37 | end
38 | watch(%r{^app/views/(.+)/}) do |m|
39 | (m[1][/_pages/] ? "spec/requests/#{m[1]}_spec.rb" :
40 | "spec/requests/#{m[1].singularize}_pages_spec.rb")
41 | end
42 |
43 | # Capybara request specs
44 | watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
45 |
46 | # Turnip features and steps
47 | watch(%r{^spec/acceptance/(.+)\.feature$})
48 | watch(%r{^spec/acceptance/steps/(.+)_steps\.rb$}) { |m| Dir[File.join("**/#{m[1]}.feature")][0] || 'spec/acceptance' }
49 | end
50 |
51 |
52 | guard 'spork', :cucumber_env => { 'RAILS_ENV' => 'test' }, :rspec_env => { 'RAILS_ENV' => 'test' } do
53 | watch('config/application.rb')
54 | watch('config/environment.rb')
55 | watch('config/environments/test.rb')
56 | watch(%r{^config/initializers/.+\.rb$})
57 | watch('Gemfile')
58 | watch('Gemfile.lock')
59 | watch('spec/spec_helper.rb') { :rspec }
60 | watch('test/test_helper.rb') { :test_unit }
61 | watch(%r{features/support/}) { :cucumber }
62 | end
63 |
--------------------------------------------------------------------------------
/config/environments/production.rb:
--------------------------------------------------------------------------------
1 | Fridgechart::Application.configure do
2 | # Settings specified here will take precedence over those in config/application.rb
3 |
4 | # Code is not reloaded between requests
5 | config.cache_classes = true
6 |
7 | # Full error reports are disabled and caching is turned on
8 | config.consider_all_requests_local = false
9 | config.action_controller.perform_caching = true
10 |
11 | # Disable Rails's static asset server (Apache or nginx will already do this)
12 | config.serve_static_assets = false
13 |
14 | # Compress JavaScripts and CSS
15 | config.assets.compress = true
16 |
17 | # Don't fallback to assets pipeline if a precompiled asset is missed
18 | config.assets.compile = false
19 |
20 | # Generate digests for assets URLs
21 | config.assets.digest = true
22 |
23 | # Defaults to nil and saved in location specified by config.assets.prefix
24 | # config.assets.manifest = YOUR_PATH
25 |
26 | # Specifies the header that your server uses for sending files
27 | # config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
28 | # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
29 |
30 | # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
31 | # config.force_ssl = true
32 |
33 | # See everything in the log (default is :info)
34 | # config.log_level = :debug
35 |
36 | # Prepend all log lines with the following tags
37 | # config.log_tags = [ :subdomain, :uuid ]
38 |
39 | # Use a different logger for distributed setups
40 | # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
41 |
42 | # Use a different cache store in production
43 | # config.cache_store = :mem_cache_store
44 |
45 | # Enable serving of images, stylesheets, and JavaScripts from an asset server
46 | # config.action_controller.asset_host = "http://assets.example.com"
47 |
48 | # Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
49 | # config.assets.precompile += %w( search.js )
50 |
51 | # Disable delivery errors, bad email addresses will be ignored
52 | # config.action_mailer.raise_delivery_errors = false
53 |
54 | # Enable threaded mode
55 | # config.threadsafe!
56 |
57 | # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
58 | # the I18n.default_locale when a translation can not be found)
59 | config.i18n.fallbacks = true
60 |
61 | # Send deprecation notices to registered listeners
62 | config.active_support.deprecation = :notify
63 |
64 | # Log the query plan for queries taking more than this (works
65 | # with SQLite, MySQL, and PostgreSQL)
66 | # config.active_record.auto_explain_threshold_in_seconds = 0.5
67 | end
68 |
--------------------------------------------------------------------------------
/app/views/static_pages/home.html.erb:
--------------------------------------------------------------------------------
1 | <% provide(:title, 'Home') %>
2 |
3 |
4 |
FridgeChart - Never Let Your Food Spoil Again
5 |
Easily track your fridge inventory. Save money. Save Time.
6 |
7 | <%= link_to "Free Demo", root_path, :class => "m-btn red big rnd" %>
8 |