clog 0.2.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +4 -0
- data/Rakefile +0 -17
- data/clog.gemspec +16 -199
- data/lib/clog.rb +2 -5
- data/test/rails_root/Gemfile +42 -0
- data/test/rails_root/Gemfile.lock +120 -0
- data/test/{rails3x_root/README → rails_root/README.rdoc} +13 -8
- data/test/{rails3x_root → rails_root}/Rakefile +2 -2
- data/test/{rails2x_root/public → rails_root/app/assets}/images/rails.png +0 -0
- data/test/rails_root/app/assets/javascripts/application.js +15 -0
- data/test/rails_root/app/assets/javascripts/welcome.js.coffee +3 -0
- data/test/rails_root/app/assets/stylesheets/application.css +13 -0
- data/test/rails_root/app/assets/stylesheets/welcome.css.scss +3 -0
- data/test/{rails3x_root → rails_root}/app/controllers/application_controller.rb +0 -0
- data/test/{rails3x_root/app/controllers/public_controller.rb → rails_root/app/controllers/welcome_controller.rb} +4 -2
- data/test/{rails3x_root → rails_root}/app/helpers/application_helper.rb +0 -0
- data/test/rails_root/app/helpers/welcome_helper.rb +2 -0
- data/test/rails_root/app/views/layouts/application.html.erb +14 -0
- data/test/{rails3x_root → rails_root}/config.ru +1 -1
- data/test/{rails3x_root → rails_root}/config/application.rb +27 -7
- data/test/rails_root/config/boot.rb +6 -0
- data/test/{rails2x_root → rails_root}/config/database.yml +4 -1
- data/test/{rails3x_root → rails_root}/config/environment.rb +1 -1
- data/test/rails_root/config/environments/development.rb +37 -0
- data/test/rails_root/config/environments/production.rb +67 -0
- data/test/{rails3x_root → rails_root}/config/environments/test.rb +11 -9
- data/test/{rails3x_root → rails_root}/config/initializers/backtrace_silencers.rb +0 -0
- data/test/{rails3x_root → rails_root}/config/initializers/inflections.rb +5 -0
- data/test/{rails2x_root → rails_root}/config/initializers/mime_types.rb +0 -0
- data/test/{rails3x_root → rails_root}/config/initializers/secret_token.rb +1 -1
- data/test/rails_root/config/initializers/session_store.rb +8 -0
- data/test/rails_root/config/initializers/wrap_parameters.rb +14 -0
- data/test/{rails3x_root → rails_root}/config/locales/en.yml +1 -1
- data/test/{rails3x_root → rails_root}/config/routes.rb +7 -7
- data/test/{rails2x_root/public/favicon.ico → rails_root/db/development.sqlite3} +0 -0
- data/test/{rails3x_root → rails_root}/db/seeds.rb +2 -2
- data/test/rails_root/doc/README_FOR_APP +2 -0
- data/test/rails_root/log/development.log +212 -0
- data/test/{rails3x_root → rails_root}/public/404.html +0 -0
- data/test/{rails3x_root → rails_root}/public/422.html +0 -0
- data/test/{rails3x_root → rails_root}/public/500.html +0 -1
- data/test/{rails3x_root → rails_root}/public/favicon.ico +0 -0
- data/test/{rails2x_root → rails_root}/public/robots.txt +0 -0
- data/test/{rails3x_root → rails_root}/script/rails +0 -0
- data/test/rails_root/test/functional/welcome_controller_test.rb +7 -0
- data/test/rails_root/test/performance/browsing_test.rb +12 -0
- data/test/{rails3x_root → rails_root}/test/test_helper.rb +0 -0
- data/test/rails_root/test/unit/helpers/welcome_helper_test.rb +4 -0
- data/test/rails_root/tmp/cache/assets/CF0/DA0/sprockets%2Fd7d5b37686831d37c4dd75e645f5e016 +0 -0
- data/test/rails_root/tmp/cache/assets/E25/4C0/sprockets%2Fde2fd9fd11c04a582cdbbe3d84a35ae6 +0 -0
- data/test/rails_root/tmp/pids/server.pid +1 -0
- data/test/test_clog.rb +16 -6
- metadata +86 -212
- data/.document +0 -5
- data/.gitignore +0 -23
- data/VERSION +0 -1
- data/created.rid +0 -1
- data/init.rb +0 -5
- data/test/common/functional/public_controller_test.rb +0 -11
- data/test/common/migrate/20100821014956_create_users.rb +0 -13
- data/test/common/public_controller.rb +0 -11
- data/test/common/unit/helpers/public_helper_test.rb +0 -4
- data/test/common/unit/user_test.rb +0 -17
- data/test/common/user.rb +0 -2
- data/test/helper.rb +0 -9
- data/test/rails2x_root.tar.gz +0 -0
- data/test/rails2x_root/README +0 -243
- data/test/rails2x_root/Rakefile +0 -10
- data/test/rails2x_root/app/controllers/application_controller.rb +0 -10
- data/test/rails2x_root/app/controllers/public_controller.rb +0 -11
- data/test/rails2x_root/app/helpers/application_helper.rb +0 -3
- data/test/rails2x_root/app/helpers/public_helper.rb +0 -2
- data/test/rails2x_root/app/models/user.rb +0 -2
- data/test/rails2x_root/config/boot.rb +0 -110
- data/test/rails2x_root/config/environment.rb +0 -23
- data/test/rails2x_root/config/environments/development.rb +0 -17
- data/test/rails2x_root/config/environments/production.rb +0 -28
- data/test/rails2x_root/config/environments/test.rb +0 -28
- data/test/rails2x_root/config/initializers/backtrace_silencers.rb +0 -7
- data/test/rails2x_root/config/initializers/cookie_verification_secret.rb +0 -7
- data/test/rails2x_root/config/initializers/inflections.rb +0 -10
- data/test/rails2x_root/config/initializers/new_rails_defaults.rb +0 -21
- data/test/rails2x_root/config/initializers/session_store.rb +0 -15
- data/test/rails2x_root/config/locales/en.yml +0 -5
- data/test/rails2x_root/config/routes.rb +0 -43
- data/test/rails2x_root/db/schema.rb +0 -21
- data/test/rails2x_root/db/seeds.rb +0 -7
- data/test/rails2x_root/public/404.html +0 -30
- data/test/rails2x_root/public/422.html +0 -30
- data/test/rails2x_root/public/500.html +0 -30
- data/test/rails2x_root/public/javascripts/application.js +0 -2
- data/test/rails2x_root/public/javascripts/controls.js +0 -963
- data/test/rails2x_root/public/javascripts/dragdrop.js +0 -973
- data/test/rails2x_root/public/javascripts/effects.js +0 -1128
- data/test/rails2x_root/public/javascripts/prototype.js +0 -4320
- data/test/rails2x_root/script/about +0 -4
- data/test/rails2x_root/script/console +0 -3
- data/test/rails2x_root/script/dbconsole +0 -3
- data/test/rails2x_root/script/destroy +0 -3
- data/test/rails2x_root/script/generate +0 -3
- data/test/rails2x_root/script/performance/benchmarker +0 -3
- data/test/rails2x_root/script/performance/profiler +0 -3
- data/test/rails2x_root/script/plugin +0 -3
- data/test/rails2x_root/script/runner +0 -3
- data/test/rails2x_root/script/server +0 -3
- data/test/rails2x_root/test/fixtures/users.yml +0 -11
- data/test/rails2x_root/test/performance/browsing_test.rb +0 -9
- data/test/rails2x_root/test/test_helper.rb +0 -39
- data/test/rails3x_root/.gitignore +0 -4
- data/test/rails3x_root/Gemfile +0 -32
- data/test/rails3x_root/Gemfile.lock +0 -81
- data/test/rails3x_root/app/helpers/public_helper.rb +0 -2
- data/test/rails3x_root/app/models/user.rb +0 -2
- data/test/rails3x_root/app/views/layouts/application.html.erb +0 -14
- data/test/rails3x_root/config/boot.rb +0 -13
- data/test/rails3x_root/config/database.yml +0 -22
- data/test/rails3x_root/config/environments/development.rb +0 -22
- data/test/rails3x_root/config/environments/production.rb +0 -49
- data/test/rails3x_root/config/initializers/mime_types.rb +0 -5
- data/test/rails3x_root/config/initializers/session_store.rb +0 -8
- data/test/rails3x_root/db/schema.rb +0 -22
- data/test/rails3x_root/lib/tasks/.gitkeep +0 -0
- data/test/rails3x_root/public/images/rails.png +0 -0
- data/test/rails3x_root/public/javascripts/application.js +0 -2
- data/test/rails3x_root/public/javascripts/controls.js +0 -965
- data/test/rails3x_root/public/javascripts/dragdrop.js +0 -974
- data/test/rails3x_root/public/javascripts/effects.js +0 -1123
- data/test/rails3x_root/public/javascripts/prototype.js +0 -6001
- data/test/rails3x_root/public/javascripts/rails.js +0 -175
- data/test/rails3x_root/public/robots.txt +0 -5
- data/test/rails3x_root/public/stylesheets/.gitkeep +0 -0
- data/test/rails3x_root/test/fixtures/users.yml +0 -11
- data/test/rails3x_root/test/functional.tar.gz +0 -0
- data/test/rails3x_root/test/performance/browsing_test.rb +0 -9
- data/test/rails3x_root/test/unit.tar.gz +0 -0
@@ -1,7 +1,7 @@
|
|
1
|
+
#!/usr/bin/env rake
|
1
2
|
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
2
3
|
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
3
4
|
|
4
5
|
require File.expand_path('../config/application', __FILE__)
|
5
|
-
require 'rake'
|
6
6
|
|
7
|
-
|
7
|
+
RailsRoot::Application.load_tasks
|
File without changes
|
@@ -0,0 +1,15 @@
|
|
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_tree .
|
@@ -0,0 +1,13 @@
|
|
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_tree .
|
13
|
+
*/
|
File without changes
|
@@ -1,11 +1,13 @@
|
|
1
|
-
class
|
1
|
+
class WelcomeController < ApplicationController
|
2
|
+
|
2
3
|
|
3
4
|
def index
|
4
|
-
render :text => "
|
5
|
+
render :text => "What's up, just doing some loggin"
|
5
6
|
clog "Hello log!"
|
6
7
|
clog "Hello log! Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua"
|
7
8
|
clog :message, "hello log!"
|
8
9
|
clog Rails.root, Object.new, Kernel, RUBY_VERSION, :a_symbol
|
9
10
|
end
|
10
11
|
|
12
|
+
|
11
13
|
end
|
File without changes
|
@@ -0,0 +1,14 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html>
|
3
|
+
<head>
|
4
|
+
<title>RailsRoot</title>
|
5
|
+
<%= stylesheet_link_tag "application", :media => "all" %>
|
6
|
+
<%= javascript_include_tag "application" %>
|
7
|
+
<%= csrf_meta_tags %>
|
8
|
+
</head>
|
9
|
+
<body>
|
10
|
+
|
11
|
+
<%= yield %>
|
12
|
+
|
13
|
+
</body>
|
14
|
+
</html>
|
@@ -2,11 +2,14 @@ require File.expand_path('../boot', __FILE__)
|
|
2
2
|
|
3
3
|
require 'rails/all'
|
4
4
|
|
5
|
-
|
6
|
-
# you
|
7
|
-
Bundler.require(
|
5
|
+
if defined?(Bundler)
|
6
|
+
# If you precompile assets before deploying to production, use this line
|
7
|
+
Bundler.require(*Rails.groups(:assets => %w(development test)))
|
8
|
+
# If you want your assets lazily compiled in production, use this line
|
9
|
+
# Bundler.require(:default, :assets, Rails.env)
|
10
|
+
end
|
8
11
|
|
9
|
-
module
|
12
|
+
module RailsRoot
|
10
13
|
class Application < Rails::Application
|
11
14
|
# Settings in config/environments/* take precedence over those specified here.
|
12
15
|
# Application configuration should go into files in config/initializers
|
@@ -30,13 +33,30 @@ module Rails3xRoot
|
|
30
33
|
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
31
34
|
# config.i18n.default_locale = :de
|
32
35
|
|
33
|
-
# JavaScript files you want as :defaults (application.js is always included).
|
34
|
-
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
35
|
-
|
36
36
|
# Configure the default encoding used in templates for Ruby 1.9.
|
37
37
|
config.encoding = "utf-8"
|
38
38
|
|
39
39
|
# Configure sensitive parameters which will be filtered from the log file.
|
40
40
|
config.filter_parameters += [:password]
|
41
|
+
|
42
|
+
# Enable escaping HTML in JSON.
|
43
|
+
config.active_support.escape_html_entities_in_json = true
|
44
|
+
|
45
|
+
# Use SQL instead of Active Record's schema dumper when creating the database.
|
46
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
47
|
+
# like if you have constraints or database-specific column types
|
48
|
+
# config.active_record.schema_format = :sql
|
49
|
+
|
50
|
+
# Enforce whitelist mode for mass assignment.
|
51
|
+
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
52
|
+
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
53
|
+
# parameters by using an attr_accessible or attr_protected declaration.
|
54
|
+
config.active_record.whitelist_attributes = true
|
55
|
+
|
56
|
+
# Enable the asset pipeline
|
57
|
+
config.assets.enabled = true
|
58
|
+
|
59
|
+
# Version of your assets, change this if you want to expire all your assets
|
60
|
+
config.assets.version = '1.0'
|
41
61
|
end
|
42
62
|
end
|
@@ -0,0 +1,37 @@
|
|
1
|
+
RailsRoot::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
|
@@ -0,0 +1,67 @@
|
|
1
|
+
RailsRoot::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
|
@@ -1,13 +1,17 @@
|
|
1
|
-
|
2
|
-
# Settings specified here will take precedence over those in config/
|
1
|
+
RailsRoot::Application.configure do
|
2
|
+
# Settings specified here will take precedence over those in config/application.rb
|
3
3
|
|
4
4
|
# The test environment is used exclusively to run your application's
|
5
|
-
# test suite.
|
5
|
+
# test suite. You never need to work with it otherwise. Remember that
|
6
6
|
# your test database is "scratch space" for the test suite and is wiped
|
7
|
-
# and recreated between test runs.
|
7
|
+
# and recreated between test runs. Don't rely on the data there!
|
8
8
|
config.cache_classes = true
|
9
9
|
|
10
|
-
#
|
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
|
11
15
|
config.whiny_nils = true
|
12
16
|
|
13
17
|
# Show full error reports and disable caching
|
@@ -25,10 +29,8 @@ Rails3xRoot::Application.configure do
|
|
25
29
|
# ActionMailer::Base.deliveries array.
|
26
30
|
config.action_mailer.delivery_method = :test
|
27
31
|
|
28
|
-
#
|
29
|
-
|
30
|
-
# like if you have constraints or database-specific column types
|
31
|
-
# config.active_record.schema_format = :sql
|
32
|
+
# Raise exception on mass assignment protection for Active Record models
|
33
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
32
34
|
|
33
35
|
# Print deprecation notices to the stderr
|
34
36
|
config.active_support.deprecation = :stderr
|
File without changes
|
File without changes
|
@@ -4,4 +4,4 @@
|
|
4
4
|
# If you change this key, all old signed cookies will become invalid!
|
5
5
|
# Make sure the secret is at least 30 characters and all random,
|
6
6
|
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
-
|
7
|
+
RailsRoot::Application.config.secret_token = 'bc39325dd57be24f919be2165bd871a66c7c0c94bc74d7959f0c1df1f3ba05e53e786b645fb5a4ce7fc8ffb53ec2f99001d2aed8d58edc030642f922c735f158'
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# Be sure to restart your server when you modify this file.
|
2
|
+
|
3
|
+
RailsRoot::Application.config.session_store :cookie_store, key: '_rails_root_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
|
+
# RailsRoot::Application.config.session_store :active_record_store
|
@@ -0,0 +1,14 @@
|
|
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
|
@@ -1,5 +1,5 @@
|
|
1
1
|
# Sample localization file for English. Add more files in this directory for other locales.
|
2
|
-
# See
|
2
|
+
# See https://github.com/svenfuchs/rails-i18n/tree/master/rails%2Flocale for starting points.
|
3
3
|
|
4
4
|
en:
|
5
5
|
hello: "Hello world"
|
@@ -1,4 +1,4 @@
|
|
1
|
-
|
1
|
+
RailsRoot::Application.routes.draw do
|
2
2
|
# The priority is based upon order of creation:
|
3
3
|
# first created -> highest priority.
|
4
4
|
|
@@ -16,12 +16,12 @@ Rails3xRoot::Application.routes.draw do
|
|
16
16
|
# Sample resource route with options:
|
17
17
|
# resources :products do
|
18
18
|
# member do
|
19
|
-
# get
|
20
|
-
# post
|
19
|
+
# get 'short'
|
20
|
+
# post 'toggle'
|
21
21
|
# end
|
22
22
|
#
|
23
23
|
# collection do
|
24
|
-
# get
|
24
|
+
# get 'sold'
|
25
25
|
# end
|
26
26
|
# end
|
27
27
|
|
@@ -35,7 +35,7 @@ Rails3xRoot::Application.routes.draw do
|
|
35
35
|
# resources :products do
|
36
36
|
# resources :comments
|
37
37
|
# resources :sales do
|
38
|
-
# get
|
38
|
+
# get 'recent', :on => :collection
|
39
39
|
# end
|
40
40
|
# end
|
41
41
|
|
@@ -48,11 +48,11 @@ Rails3xRoot::Application.routes.draw do
|
|
48
48
|
|
49
49
|
# You can have the root of your site routed with "root"
|
50
50
|
# just remember to delete public/index.html.
|
51
|
-
root :to =>
|
51
|
+
root :to => 'welcome#index'
|
52
52
|
|
53
53
|
# See how all your routes lay out with "rake routes"
|
54
54
|
|
55
55
|
# This is a legacy wild controller route that's not recommended for RESTful applications.
|
56
56
|
# Note: This route will make all actions in every controller accessible via GET requests.
|
57
|
-
# match ':controller(/:action(/:id(.:format)
|
57
|
+
# match ':controller(/:action(/:id))(.:format)'
|
58
58
|
end
|
File without changes
|
@@ -3,5 +3,5 @@
|
|
3
3
|
#
|
4
4
|
# Examples:
|
5
5
|
#
|
6
|
-
# cities = City.create([{ :
|
7
|
-
# Mayor.create(:
|
6
|
+
# cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen' }])
|
7
|
+
# Mayor.create(name: 'Emanuel', city: cities.first)
|