Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Rails 3 config.ru, new files, config.to_prepare workaround, activerec…
…ord require fix
- Loading branch information
Showing
7 changed files
with
65 additions
and
3 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Require your environment file to bootstrap Rails | ||
require ::File.expand_path('../config/environment', __FILE__) | ||
|
||
# Dispatch the request | ||
run Rails.application |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
|
||
require 'activerecord' | ||
require 'active_record' | ||
|
||
module ActiveRecord | ||
class Base | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Be sure to restart your server when you modify this file. | ||
|
||
# Add new mime types for use in respond_to blocks: | ||
# Mime::Type.register "text/richtext", :rtf | ||
# Mime::Type.register_alias "text/html", :iphone |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
# Be sure to restart your server when you modify this file. | ||
|
||
# These settings change the behavior of Rails 2 apps and will be defaults | ||
# for Rails 3. You can remove this initializer when Rails 3 is released. | ||
|
||
if defined?(ActiveRecord) | ||
# Include Active Record class name as root for JSON serialized output. | ||
ActiveRecord::Base.include_root_in_json = true | ||
|
||
# Store the full class name (including module namespace) in STI type column. | ||
ActiveRecord::Base.store_full_sti_class = true | ||
end | ||
|
||
# Use ISO 8601 format for JSON serialized times and dates. | ||
ActiveSupport.use_standard_json_time_format = true | ||
|
||
# Don't escape HTML entities in JSON, leave that for the #json_escape helper. | ||
# if you're including raw json in an HTML page. | ||
ActiveSupport.escape_html_entities_in_json = false |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# This file should contain all the record creation needed to seed the database with its default values. | ||
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup). | ||
# | ||
# Examples: | ||
# | ||
# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }]) | ||
# Mayor.create(:name => 'Daley', :city => cities.first) |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<meta http-equiv="content-type" content="text/html; charset=UTF-8" /> | ||
<title>The change you wanted was rejected (422)</title> | ||
<style type="text/css"> | ||
body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; } | ||
div.dialog { | ||
width: 25em; | ||
padding: 0 4em; | ||
margin: 4em auto 0 auto; | ||
border: 1px solid #ccc; | ||
border-right-color: #999; | ||
border-bottom-color: #999; | ||
} | ||
h1 { font-size: 100%; color: #f00; line-height: 1.5em; } | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<!-- This file lives in public/422.html --> | ||
<div class="dialog"> | ||
<h1>The change you wanted was rejected.</h1> | ||
<p>Maybe you tried to change something you didn't have access to.</p> | ||
</div> | ||
</body> | ||
</html> |
This file contains 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