Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' of github.com:mikel/rails
- Loading branch information
Showing
59 changed files
with
1,214 additions
and
914 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
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
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
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
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
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
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
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
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
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
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,3 +1,5 @@ | ||
module Fun::GamesHelper | ||
def stratego() "Iz guuut!" end | ||
module Fun | ||
module GamesHelper | ||
def stratego() "Iz guuut!" end | ||
end | ||
end |
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,3 +1,5 @@ | ||
module Fun::PdfHelper | ||
def foobar() 'baz' end | ||
module Fun | ||
module PdfHelper | ||
def foobar() 'baz' end | ||
end | ||
end |
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
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
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,60 @@ | ||
require "active_support" | ||
require "rails" | ||
|
||
module I18n | ||
class Railtie < Rails::Railtie | ||
railtie_name :i18n | ||
|
||
# Initialize I18n load paths to an array | ||
config.i18n.load_path = [] | ||
|
||
initializer :initialize_i18n do | ||
require 'active_support/i18n' | ||
|
||
ActionDispatch::Callbacks.to_prepare do | ||
I18n.reload! | ||
end | ||
end | ||
|
||
# Set the i18n configuration from config.i18n but special-case for | ||
# the load_path which should be appended to what's already set instead of overwritten. | ||
config.after_initialize do |app| | ||
app.config.i18n.each do |setting, value| | ||
if setting == :load_path | ||
I18n.load_path += value | ||
else | ||
I18n.send("#{setting}=", value) | ||
end | ||
end | ||
|
||
I18n.reload! | ||
end | ||
end | ||
end | ||
|
||
module ActiveSupport | ||
class Railtie < Rails::Railtie | ||
railtie_name :active_support | ||
|
||
# Loads support for "whiny nil" (noisy warnings when methods are invoked | ||
# on +nil+ values) if Configuration#whiny_nils is true. | ||
initializer :initialize_whiny_nils do |app| | ||
require 'active_support/whiny_nil' if app.config.whiny_nils | ||
end | ||
|
||
# Sets the default value for Time.zone | ||
# If assigned value cannot be matched to a TimeZone, an exception will be raised. | ||
initializer :initialize_time_zone do |app| | ||
require 'active_support/core_ext/time/zones' | ||
zone_default = Time.__send__(:get_zone, app.config.time_zone) | ||
|
||
unless zone_default | ||
raise \ | ||
'Value assigned to config.time_zone not recognized.' + | ||
'Run "rake -D time" for a list of tasks for finding appropriate time zone names.' | ||
end | ||
|
||
Time.zone_default = zone_default | ||
end | ||
end | ||
end |
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
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
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
Oops, something went wrong.