View i18n_debug.rb
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
# Execute following in rails console after invoking i18n.t() on a known key to load the translations | |
def flatten_hash(hash) | |
hash.each_with_object({}) do |(k, v), h| | |
if v.is_a? Hash | |
flatten_hash(v).map do |h_k, h_v| | |
h["#{k}.#{h_k}".to_sym] = h_v | |
end | |
else | |
h[k] = v |
View gist:478500
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
DEPRECATION WARNING: Rake tasks in vendor/plugins/annotate_models/tasks are deprecated. Use lib/tasks instead. (called from /usr/local/lib/ruby/gems/1.8/gems/rails-2.3.8/lib/tasks/rails.rb:10) | |
** Invoke db:migrate (first_time) | |
** Invoke environment (first_time) | |
** Execute environment | |
rake aborted! | |
uninitialized constant Cms::AttachmentsController | |
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:440:in `load_missing_constant' | |
/usr/local/lib/ruby/gems/1.8/gems/activesupport-2.3.8/lib/active_support/dependencies.rb:80:in `const_missing' | |
/usr/local/lib/ruby/gems/1.8/gems/bcms_s3-0.2.1/lib/bcms_s3/s3_module.rb:140 | |
/usr/local/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' |