This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Sample::Application.configure do | |
| # Settings specified here will take precedence over those in config/application.rb. | |
| # The test environment is used exclusively to run your application's | |
| # test suite. You never need to work with it otherwise. Remember that | |
| # your test database is "scratch space" for the test suite and is wiped | |
| # and recreated between test runs. Don't rely on the data there! | |
| config.cache_classes = true | |
| # Do not eager load code on boot. This avoids loading your whole application |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| require File.expand_path('../boot', __FILE__) | |
| require 'rails/all' | |
| # Assets should be precompiled for production (so we don't need the gems loaded then) | |
| Bundler.require(*Rails.groups(assets: %w(development test))) | |
| module Sample | |
| class Application < Rails::Application | |
| # Settings in config/environments/* take precedence over those specified here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Set up gems listed in the Gemfile. | |
| ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) | |
| require 'bundler/setup' if File.exists?(ENV['BUNDLE_GEMFILE']) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Be sure to restart your server when you modify this file. | |
| # | |
| # This file contains settings for ActionController::ParamsWrapper which | |
| # is enabled by default. | |
| # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. | |
| ActiveSupport.on_load(:action_controller) do | |
| wrap_parameters :format => [:json] | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Be sure to restart your server when you modify this file. | |
| Sample::Application.config.session_store :encrypted_cookie_store, key: '_sample_session' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Be sure to restart your server when you modify this file. | |
| # Configure sensitive parameters which will be filtered from the log file. | |
| Rails.application.config.filter_parameters += [:password] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| source 'https://rubygems.org' | |
| # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' | |
| gem 'rails', '4.0.0.beta1' | |
| gem 'sqlite3' | |
| # Gems used only for assets and not required | |
| # in production environments by default. | |
| group :assets do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // This is a manifest file that'll be compiled into application.js, which will include all the files | |
| // listed below. | |
| // | |
| // Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, | |
| // or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. | |
| // | |
| // It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the | |
| // compiled file. | |
| // | |
| // WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Product.joins(:brand).where('brand.id = 1') |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Product.joins(:brand).where('brand.id = 1') |