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
| ------------ From Rake Task | |
| namespace :app do | |
| # Checks and ensures task is not run in production. | |
| task :ensure_development_environment => :environment do | |
| if Rails.env.production? | |
| raise "\nI'm sorry, I can't do that.\n(You're asking me to drop your production database.)" | |
| end | |
| 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
| # MySQL. Versions 4.1 and 5.0 are recommended. | |
| # | |
| # Install the MySQL driver: | |
| # gem install mysql2 | |
| # | |
| # And be sure to use new-style password hashing: | |
| # http://dev.mysql.com/doc/refman/5.0/en/old-client.html | |
| development: | |
| adapter: mysql2 | |
| encoding: utf8 |
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
| # Avoid annoying ActionController::UnknownHttpMethod exceptions like: | |
| # | |
| # ActionController::UnknownHttpMethod) "CONNECT, accepted HTTP methods are get, head, put, post, delete, and options" | |
| # | |
| # Install this file in app/metal and these requests will receive a 405 | |
| # "Method Not Allowed" status and will be logged under `info'. | |
| class IgnoreUnknownHttpMethod | |
| def self.call(env) | |
| [ | |
| if ActionController::Request::HTTP_METHODS.include?(env["REQUEST_METHOD"].downcase) |
NewerOlder