mongo_translatable 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (112) hide show
  1. data/.document +5 -0
  2. data/.gitignore +26 -0
  3. data/.gitmodules +3 -0
  4. data/LICENSE +295 -0
  5. data/README.rdoc +131 -0
  6. data/Rakefile +55 -0
  7. data/VERSION +1 -0
  8. data/app/controllers/translations_controller.rb +150 -0
  9. data/app/helpers/translations_helper.rb +71 -0
  10. data/app/views/layouts/translations.html.erb +18 -0
  11. data/app/views/translations/_form.html.erb +50 -0
  12. data/app/views/translations/_translatable_value.html.erb +17 -0
  13. data/app/views/translations/_translation_field.html.erb +34 -0
  14. data/app/views/translations/_translation_field_input.html.erb +8 -0
  15. data/app/views/translations/edit.html.erb +8 -0
  16. data/app/views/translations/index.html.erb +22 -0
  17. data/app/views/translations/new.html.erb +7 -0
  18. data/app/views/translations/show.html.erb +12 -0
  19. data/config/locales/en.yml +33 -0
  20. data/config/locales/fr.yml +18 -0
  21. data/lib/mongo_translatable.rb +336 -0
  22. data/lib/mongo_translatable_configuration.rb +5 -0
  23. data/lib/translatables_helper.rb +227 -0
  24. data/lib/translations_controller_helpers.rb +37 -0
  25. data/rails/init.rb +3 -0
  26. data/test/full_2_3_5_app_with_tests/.gitignore +27 -0
  27. data/test/full_2_3_5_app_with_tests/README +1 -0
  28. data/test/full_2_3_5_app_with_tests/Rakefile +10 -0
  29. data/test/full_2_3_5_app_with_tests/app/controllers/application_controller.rb +26 -0
  30. data/test/full_2_3_5_app_with_tests/app/controllers/items_controller.rb +85 -0
  31. data/test/full_2_3_5_app_with_tests/app/helpers/application_helper.rb +3 -0
  32. data/test/full_2_3_5_app_with_tests/app/helpers/items_helper.rb +2 -0
  33. data/test/full_2_3_5_app_with_tests/app/models/comment.rb +3 -0
  34. data/test/full_2_3_5_app_with_tests/app/models/item.rb +5 -0
  35. data/test/full_2_3_5_app_with_tests/app/models/not_swapped_in_record.rb +3 -0
  36. data/test/full_2_3_5_app_with_tests/app/models/person.rb +3 -0
  37. data/test/full_2_3_5_app_with_tests/app/models/recipe.rb +21 -0
  38. data/test/full_2_3_5_app_with_tests/app/views/items/edit.html.erb +24 -0
  39. data/test/full_2_3_5_app_with_tests/app/views/items/index.html.erb +24 -0
  40. data/test/full_2_3_5_app_with_tests/app/views/items/new.html.erb +23 -0
  41. data/test/full_2_3_5_app_with_tests/app/views/items/show.html.erb +21 -0
  42. data/test/full_2_3_5_app_with_tests/app/views/layouts/items.html.erb +19 -0
  43. data/test/full_2_3_5_app_with_tests/config/boot.rb +110 -0
  44. data/test/full_2_3_5_app_with_tests/config/database.yml +22 -0
  45. data/test/full_2_3_5_app_with_tests/config/environment.rb +54 -0
  46. data/test/full_2_3_5_app_with_tests/config/environments/development.rb +17 -0
  47. data/test/full_2_3_5_app_with_tests/config/environments/production.rb +28 -0
  48. data/test/full_2_3_5_app_with_tests/config/environments/test.rb +28 -0
  49. data/test/full_2_3_5_app_with_tests/config/initializers/backtrace_silencers.rb +7 -0
  50. data/test/full_2_3_5_app_with_tests/config/initializers/inflections.rb +10 -0
  51. data/test/full_2_3_5_app_with_tests/config/initializers/mime_types.rb +5 -0
  52. data/test/full_2_3_5_app_with_tests/config/initializers/new_rails_defaults.rb +21 -0
  53. data/test/full_2_3_5_app_with_tests/config/initializers/session_store.rb +15 -0
  54. data/test/full_2_3_5_app_with_tests/config/locales.yml +5 -0
  55. data/test/full_2_3_5_app_with_tests/config/locales/en.yml +4 -0
  56. data/test/full_2_3_5_app_with_tests/config/locales/fr.yml +4 -0
  57. data/test/full_2_3_5_app_with_tests/config/locales/zh.yml +4 -0
  58. data/test/full_2_3_5_app_with_tests/config/routes.rb +4 -0
  59. data/test/full_2_3_5_app_with_tests/db/migrate/20100407010602_create_items.rb +14 -0
  60. data/test/full_2_3_5_app_with_tests/db/migrate/20100504234216_create_not_swapped_in_records.rb +15 -0
  61. data/test/full_2_3_5_app_with_tests/db/migrate/20100509011052_create_people.rb +13 -0
  62. data/test/full_2_3_5_app_with_tests/db/migrate/20100509042718_create_comments.rb +14 -0
  63. data/test/full_2_3_5_app_with_tests/db/migrate/20110112023516_create_recipes.rb +14 -0
  64. data/test/full_2_3_5_app_with_tests/db/schema.rb +56 -0
  65. data/test/full_2_3_5_app_with_tests/db/seeds.rb +7 -0
  66. data/test/full_2_3_5_app_with_tests/doc/README_FOR_APP +2 -0
  67. data/test/full_2_3_5_app_with_tests/public/404.html +30 -0
  68. data/test/full_2_3_5_app_with_tests/public/422.html +30 -0
  69. data/test/full_2_3_5_app_with_tests/public/500.html +30 -0
  70. data/test/full_2_3_5_app_with_tests/public/favicon.ico +0 -0
  71. data/test/full_2_3_5_app_with_tests/public/images/rails.png +0 -0
  72. data/test/full_2_3_5_app_with_tests/public/index.html +275 -0
  73. data/test/full_2_3_5_app_with_tests/public/javascripts/application.js +2 -0
  74. data/test/full_2_3_5_app_with_tests/public/javascripts/controls.js +963 -0
  75. data/test/full_2_3_5_app_with_tests/public/javascripts/dragdrop.js +973 -0
  76. data/test/full_2_3_5_app_with_tests/public/javascripts/effects.js +1128 -0
  77. data/test/full_2_3_5_app_with_tests/public/javascripts/prototype.js +4320 -0
  78. data/test/full_2_3_5_app_with_tests/public/robots.txt +5 -0
  79. data/test/full_2_3_5_app_with_tests/public/stylesheets/scaffold.css +54 -0
  80. data/test/full_2_3_5_app_with_tests/script/about +4 -0
  81. data/test/full_2_3_5_app_with_tests/script/console +3 -0
  82. data/test/full_2_3_5_app_with_tests/script/dbconsole +3 -0
  83. data/test/full_2_3_5_app_with_tests/script/destroy +3 -0
  84. data/test/full_2_3_5_app_with_tests/script/generate +3 -0
  85. data/test/full_2_3_5_app_with_tests/script/performance/benchmarker +3 -0
  86. data/test/full_2_3_5_app_with_tests/script/performance/profiler +3 -0
  87. data/test/full_2_3_5_app_with_tests/script/plugin +3 -0
  88. data/test/full_2_3_5_app_with_tests/script/runner +3 -0
  89. data/test/full_2_3_5_app_with_tests/script/server +3 -0
  90. data/test/full_2_3_5_app_with_tests/test/factories.rb +18 -0
  91. data/test/full_2_3_5_app_with_tests/test/functional/translations_controller_test.rb +66 -0
  92. data/test/full_2_3_5_app_with_tests/test/integration/translation_test.rb +72 -0
  93. data/test/full_2_3_5_app_with_tests/test/performance/browsing_test.rb +9 -0
  94. data/test/full_2_3_5_app_with_tests/test/selenium.rb +83 -0
  95. data/test/full_2_3_5_app_with_tests/test/test_helper.rb +86 -0
  96. data/test/full_2_3_5_app_with_tests/test/unit/helpers/translatables_helper_test.rb +37 -0
  97. data/test/full_2_3_5_app_with_tests/test/unit/helpers/translations_helper_test.rb +62 -0
  98. data/test/full_2_3_5_app_with_tests/test/unit/mongo_translatable_test.rb +342 -0
  99. data/test/full_2_3_5_app_with_tests/vendor/plugins/routing-filter/init.rb +1 -0
  100. data/test/full_2_3_5_app_with_tests/vendor/plugins/routing-filter/lib/routing_filter.rb +94 -0
  101. data/test/full_2_3_5_app_with_tests/vendor/plugins/routing-filter/lib/routing_filter/base.rb +31 -0
  102. data/test/full_2_3_5_app_with_tests/vendor/plugins/routing-filter/lib/routing_filter/force_extension.rb +57 -0
  103. data/test/full_2_3_5_app_with_tests/vendor/plugins/routing-filter/lib/routing_filter/locale.rb +70 -0
  104. data/test/full_2_3_5_app_with_tests/vendor/plugins/routing-filter/lib/routing_filter/pagination.rb +33 -0
  105. data/test/full_2_3_5_app_with_tests/vendor/plugins/routing-filter/lib/routing_filter/uuid_token.rb +78 -0
  106. data/test/full_2_3_5_app_with_tests/vendor/plugins/routing-filter/spec/force_extension_spec.rb +65 -0
  107. data/test/full_2_3_5_app_with_tests/vendor/plugins/routing-filter/spec/generation_spec.rb +367 -0
  108. data/test/full_2_3_5_app_with_tests/vendor/plugins/routing-filter/spec/pagination_extension_spec.rb +19 -0
  109. data/test/full_2_3_5_app_with_tests/vendor/plugins/routing-filter/spec/recognition_spec.rb +76 -0
  110. data/test/full_2_3_5_app_with_tests/vendor/plugins/routing-filter/spec/routing_filter_spec.rb +114 -0
  111. data/test/full_2_3_5_app_with_tests/vendor/plugins/routing-filter/spec/spec_helper.rb +108 -0
  112. metadata +309 -0
@@ -0,0 +1,22 @@
1
+ # SQLite version 3.x
2
+ # gem install sqlite3-ruby (not necessary on OS X Leopard)
3
+ development:
4
+ adapter: sqlite3
5
+ database: db/development.sqlite3
6
+ pool: 5
7
+ timeout: 5000
8
+
9
+ # Warning: The database defined as "test" will be erased and
10
+ # re-generated from your development database when you run "rake".
11
+ # Do not set this db to the same as development or production.
12
+ test:
13
+ adapter: sqlite3
14
+ database: db/test.sqlite3
15
+ pool: 5
16
+ timeout: 5000
17
+
18
+ production:
19
+ adapter: sqlite3
20
+ database: db/production.sqlite3
21
+ pool: 5
22
+ timeout: 5000
@@ -0,0 +1,54 @@
1
+ # Be sure to restart your server when you modify this file
2
+
3
+ # Specifies gem version of Rails to use when vendor/rails is not present
4
+ RAILS_GEM_VERSION = '2.3.5' unless defined? RAILS_GEM_VERSION
5
+
6
+ # Bootstrap the Rails environment, frameworks, and default configuration
7
+ require File.join(File.dirname(__FILE__), 'boot')
8
+
9
+ # thanks to http://www.justinball.com/2009/06/16/testing-rails-engine-gems/
10
+ class TestGemLocator < Rails::Plugin::Locator
11
+ def plugins
12
+ Rails::Plugin.new(File.join(File.dirname(__FILE__), *%w(.. .. ..)))
13
+ end
14
+ end
15
+
16
+ Rails::Initializer.run do |config|
17
+ # Settings in config/environments/* take precedence over those specified here.
18
+ # Application configuration should go into files in config/initializers
19
+ # -- all .rb files in that directory are automatically loaded.
20
+
21
+ # Add additional load paths for your own custom dirs
22
+ # config.load_paths += %W( #{RAILS_ROOT}/extras )
23
+
24
+ # Specify gems that this application depends on and have them installed with rake gems:install
25
+ # config.gem "bj"
26
+ # config.gem "hpricot", :version => '0.6', :source => "http://code.whytheluckystiff.net"
27
+ # config.gem "sqlite3-ruby", :lib => "sqlite3"
28
+ # config.gem "aws-s3", :lib => "aws/s3"
29
+ # this allows us to place locale in URL
30
+ # without messing with the rest of the rails routing mechanism
31
+ # config.gem "routing_filter" # using plugin for the moment
32
+ # config.gem "mongo_translatable"
33
+ config.plugin_locators << TestGemLocator
34
+
35
+ # Only load the plugins named here, in the order given (default is alphabetical).
36
+ # :all can be used as a placeholder for all plugins not explicitly named
37
+ # config.plugins = [ :exception_notification, :ssl_requirement, :all ]
38
+
39
+ # Skip frameworks you're not going to use. To use Rails without a database,
40
+ # you must remove the Active Record framework.
41
+ # config.frameworks -= [ :active_record, :active_resource, :action_mailer ]
42
+
43
+ # Activate observers that should always be running
44
+ # config.active_record.observers = :cacher, :garbage_collector, :forum_observer
45
+
46
+ # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
47
+ # Run "rake -D time" for a list of tasks for finding time zone names.
48
+ config.time_zone = 'UTC'
49
+
50
+ # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
51
+ # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}')]
52
+ # config.i18n.default_locale = :de
53
+ end
54
+ MongoMapper.database = 'mongo_translatable'
@@ -0,0 +1,17 @@
1
+ # Settings specified here will take precedence over those in config/environment.rb
2
+
3
+ # In the development environment your application's code is reloaded on
4
+ # every request. This slows down response time but is perfect for development
5
+ # since you don't have to restart the webserver when you make code changes.
6
+ config.cache_classes = false
7
+
8
+ # Log error messages when you accidentally call methods on nil.
9
+ config.whiny_nils = true
10
+
11
+ # Show full error reports and disable caching
12
+ config.action_controller.consider_all_requests_local = true
13
+ config.action_view.debug_rjs = 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
@@ -0,0 +1,28 @@
1
+ # Settings specified here will take precedence over those in config/environment.rb
2
+
3
+ # The production environment is meant for finished, "live" apps.
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.action_controller.consider_all_requests_local = false
9
+ config.action_controller.perform_caching = true
10
+ config.action_view.cache_template_loading = true
11
+
12
+ # See everything in the log (default is :info)
13
+ # config.log_level = :debug
14
+
15
+ # Use a different logger for distributed setups
16
+ # config.logger = SyslogLogger.new
17
+
18
+ # Use a different cache store in production
19
+ # config.cache_store = :mem_cache_store
20
+
21
+ # Enable serving of images, stylesheets, and javascripts from an asset server
22
+ # config.action_controller.asset_host = "http://assets.example.com"
23
+
24
+ # Disable delivery errors, bad email addresses will be ignored
25
+ # config.action_mailer.raise_delivery_errors = false
26
+
27
+ # Enable threaded mode
28
+ # config.threadsafe!
@@ -0,0 +1,28 @@
1
+ # Settings specified here will take precedence over those in config/environment.rb
2
+
3
+ # The test environment is used exclusively to run your application's
4
+ # test suite. You never need to work with it otherwise. Remember that
5
+ # your test database is "scratch space" for the test suite and is wiped
6
+ # and recreated between test runs. Don't rely on the data there!
7
+ config.cache_classes = true
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.action_controller.consider_all_requests_local = true
14
+ config.action_controller.perform_caching = false
15
+ config.action_view.cache_template_loading = true
16
+
17
+ # Disable request forgery protection in test environment
18
+ config.action_controller.allow_forgery_protection = false
19
+
20
+ # Tell Action Mailer not to deliver emails to the real world.
21
+ # The :test delivery method accumulates sent emails in the
22
+ # ActionMailer::Base.deliveries array.
23
+ config.action_mailer.delivery_method = :test
24
+
25
+ # Use SQL instead of Active Record's schema dumper when creating the test database.
26
+ # This is necessary if your schema can't be completely dumped by the schema dumper,
27
+ # like if you have constraints or database-specific column types
28
+ # config.active_record.schema_format = :sql
@@ -0,0 +1,7 @@
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 do debug a problem that might steem from framework code.
7
+ # Rails.backtrace_cleaner.remove_silencers!
@@ -0,0 +1,10 @@
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
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Add new mime types for use in respond_to blocks:
4
+ # Mime::Type.register "text/richtext", :rtf
5
+ # Mime::Type.register_alias "text/html", :iphone
@@ -0,0 +1,21 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # These settings change the behavior of Rails 2 apps and will be defaults
4
+ # for Rails 3. You can remove this initializer when Rails 3 is released.
5
+
6
+ if defined?(ActiveRecord)
7
+ # Include Active Record class name as root for JSON serialized output.
8
+ ActiveRecord::Base.include_root_in_json = true
9
+
10
+ # Store the full class name (including module namespace) in STI type column.
11
+ ActiveRecord::Base.store_full_sti_class = true
12
+ end
13
+
14
+ ActionController::Routing.generate_best_match = false
15
+
16
+ # Use ISO 8601 format for JSON serialized times and dates.
17
+ ActiveSupport.use_standard_json_time_format = true
18
+
19
+ # Don't escape HTML entities in JSON, leave that for the #json_escape helper.
20
+ # if you're including raw json in an HTML page.
21
+ ActiveSupport.escape_html_entities_in_json = false
@@ -0,0 +1,15 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Your secret key for verifying cookie session data integrity.
4
+ # If you change this key, all old sessions 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
+ ActionController::Base.session = {
8
+ :key => '_full_app_with_tests_session',
9
+ :secret => '84245bf4f5b4d6100713433610c7b5e86727f63957f37c639d30e90b2578b8149188c00c8a790e56df19f0dc615dfa4a5d7681e7e3cd82eaa8b4fdf43772cede'
10
+ }
11
+
12
+ # Use the database for sessions instead of the cookie-based default,
13
+ # which shouldn't be used to store highly confidential information
14
+ # (create the session table with "rake db:sessions:create")
15
+ # ActionController::Base.session_store = :active_record_store
@@ -0,0 +1,5 @@
1
+ en: English
2
+ fr: Français
3
+ fi: Suomi
4
+ ar: العربية
5
+ zh: 中文
@@ -0,0 +1,4 @@
1
+ en:
2
+ items:
3
+ form:
4
+ label: Label
@@ -0,0 +1,4 @@
1
+ fr:
2
+ items:
3
+ form:
4
+ label: Étiquette
@@ -0,0 +1,4 @@
1
+ zh:
2
+ items:
3
+ form:
4
+ label: 標籤
@@ -0,0 +1,4 @@
1
+ ActionController::Routing::Routes.draw do |map|
2
+ map.filter 'locale' # see routing-filter gem
3
+ map.resources :items, :has_many => :translations
4
+ end
@@ -0,0 +1,14 @@
1
+ class CreateItems < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :items do |t|
4
+ t.string :label, :null => false
5
+ t.string :value, :locale, :original_locale, :description
6
+ t.integer :person_id, :references => :people
7
+ t.timestamps
8
+ end
9
+ end
10
+
11
+ def self.down
12
+ drop_table :items
13
+ end
14
+ end
@@ -0,0 +1,15 @@
1
+ class CreateNotSwappedInRecords < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :not_swapped_in_records do |t|
4
+ t.string :name, :null => false
5
+ t.string :locale, :original_locale
6
+
7
+ t.timestamps
8
+ end
9
+
10
+ end
11
+
12
+ def self.down
13
+ drop_table :not_swapped_in_records
14
+ end
15
+ end
@@ -0,0 +1,13 @@
1
+ class CreatePeople < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :people do |t|
4
+ t.string :name
5
+
6
+ t.timestamps
7
+ end
8
+ end
9
+
10
+ def self.down
11
+ drop_table :people
12
+ end
13
+ end
@@ -0,0 +1,14 @@
1
+ class CreateComments < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :comments do |t|
4
+ t.string :subject
5
+ t.integer :item_id, :references => :items
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+
11
+ def self.down
12
+ drop_table :comments
13
+ end
14
+ end
@@ -0,0 +1,14 @@
1
+ class CreateRecipes < ActiveRecord::Migration
2
+ def self.up
3
+ create_table :recipes do |t|
4
+ t.string :name, :locale, :original_locale, :null => false
5
+ t.text :ingredients, :steps, :null => false
6
+
7
+ t.timestamps
8
+ end
9
+ end
10
+
11
+ def self.down
12
+ drop_table :recipes
13
+ end
14
+ end
@@ -0,0 +1,56 @@
1
+ # This file is auto-generated from the current state of the database. Instead of editing this file,
2
+ # please use the migrations feature of Active Record to incrementally modify your database, and
3
+ # then regenerate this schema definition.
4
+ #
5
+ # Note that this schema.rb definition is the authoritative source for your database schema. If you need
6
+ # to create the application database on another system, you should be using db:schema:load, not running
7
+ # all the migrations from scratch. The latter is a flawed and unsustainable approach (the more migrations
8
+ # you'll amass, the slower it'll run and the greater likelihood for issues).
9
+ #
10
+ # It's strongly recommended to check this file into your version control system.
11
+
12
+ ActiveRecord::Schema.define(:version => 20110112023516) do
13
+
14
+ create_table "comments", :force => true do |t|
15
+ t.string "subject"
16
+ t.integer "item_id"
17
+ t.datetime "created_at"
18
+ t.datetime "updated_at"
19
+ end
20
+
21
+ create_table "items", :force => true do |t|
22
+ t.string "label", :null => false
23
+ t.string "value"
24
+ t.string "locale"
25
+ t.string "original_locale"
26
+ t.string "description"
27
+ t.integer "person_id"
28
+ t.datetime "created_at"
29
+ t.datetime "updated_at"
30
+ end
31
+
32
+ create_table "not_swapped_in_records", :force => true do |t|
33
+ t.string "name", :null => false
34
+ t.string "locale"
35
+ t.string "original_locale"
36
+ t.datetime "created_at"
37
+ t.datetime "updated_at"
38
+ end
39
+
40
+ create_table "people", :force => true do |t|
41
+ t.string "name"
42
+ t.datetime "created_at"
43
+ t.datetime "updated_at"
44
+ end
45
+
46
+ create_table "recipes", :force => true do |t|
47
+ t.string "name", :null => false
48
+ t.string "locale", :null => false
49
+ t.string "original_locale", :null => false
50
+ t.text "ingredients", :null => false
51
+ t.text "steps", :null => false
52
+ t.datetime "created_at"
53
+ t.datetime "updated_at"
54
+ end
55
+
56
+ end
@@ -0,0 +1,7 @@
1
+ # This file should contain all the record creation needed to seed the database with its default values.
2
+ # The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
3
+ #
4
+ # Examples:
5
+ #
6
+ # cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
7
+ # Major.create(:name => 'Daley', :city => cities.first)
@@ -0,0 +1,2 @@
1
+ Use this README file to introduce your application and point to useful places in the API for learning more.
2
+ Run "rake doc:app" to generate API documentation for your models, controllers, helpers, and libraries.
@@ -0,0 +1,30 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+
6
+ <head>
7
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
8
+ <title>The page you were looking for doesn't exist (404)</title>
9
+ <style type="text/css">
10
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
11
+ div.dialog {
12
+ width: 25em;
13
+ padding: 0 4em;
14
+ margin: 4em auto 0 auto;
15
+ border: 1px solid #ccc;
16
+ border-right-color: #999;
17
+ border-bottom-color: #999;
18
+ }
19
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
20
+ </style>
21
+ </head>
22
+
23
+ <body>
24
+ <!-- This file lives in public/404.html -->
25
+ <div class="dialog">
26
+ <h1>The page you were looking for doesn't exist.</h1>
27
+ <p>You may have mistyped the address or the page may have moved.</p>
28
+ </div>
29
+ </body>
30
+ </html>
@@ -0,0 +1,30 @@
1
+ <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
2
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
3
+
4
+ <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
+
6
+ <head>
7
+ <meta http-equiv="content-type" content="text/html; charset=UTF-8" />
8
+ <title>The change you wanted was rejected (422)</title>
9
+ <style type="text/css">
10
+ body { background-color: #fff; color: #666; text-align: center; font-family: arial, sans-serif; }
11
+ div.dialog {
12
+ width: 25em;
13
+ padding: 0 4em;
14
+ margin: 4em auto 0 auto;
15
+ border: 1px solid #ccc;
16
+ border-right-color: #999;
17
+ border-bottom-color: #999;
18
+ }
19
+ h1 { font-size: 100%; color: #f00; line-height: 1.5em; }
20
+ </style>
21
+ </head>
22
+
23
+ <body>
24
+ <!-- This file lives in public/422.html -->
25
+ <div class="dialog">
26
+ <h1>The change you wanted was rejected.</h1>
27
+ <p>Maybe you tried to change something you didn't have access to.</p>
28
+ </div>
29
+ </body>
30
+ </html>