-
Notifications
You must be signed in to change notification settings - Fork 0
fix for class caching #1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -13,7 +13,7 @@ def self.reset | |
|
|
||
| if file | ||
| config = YAML.load_file(file) | ||
| self.locales = config['locales'] | ||
| self.locales = config['locales'] rescue ['en'] | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Avoid using |
||
| else | ||
| self.locales = ['en'] | ||
| end | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -4,6 +4,7 @@ module Ar | |
| module Model | ||
| class << self | ||
| def names | ||
| Rails.application.eager_load! if Rails.env == 'development' rescue true | ||
|
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Line is too long. [83/80] |
||
| ActiveRecord::Base.descendants.map(&:name) | ||
| end | ||
|
|
||
|
|
@@ -36,4 +37,4 @@ def final_hash lang | |
| end | ||
| end | ||
| end | ||
| end | ||
| end | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Line is too long. [83/80]
Avoid using
rescuein its modifier form.Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.