Module: RailsDbLocalize
- Defined in:
- lib/rails_db_localize.rb,
lib/rails_db_localize/version.rb
Defined Under Namespace
Classes: Translation, TranslationCache
Constant Summary collapse
- VERSION =
"0.0.1"
Class Attribute Summary collapse
-
.schema ⇒ Object
readonly
This is the schematics of fields Useful for rake tasks after, to know: - Which rows are not used anymore (because the field name has changed for example) - Which models are not yet translated.
Class Method Summary collapse
Class Attribute Details
.schema ⇒ Object (readonly)
This is the schematics of fields Useful for rake tasks after, to know:
- Which rows are not used anymore (because the field name has changed for example)
- Which models are not yet translated
9 10 11 |
# File 'lib/rails_db_localize.rb', line 9 def schema @schema end |
Class Method Details
.add_to_schema(model, field) ⇒ Object
11 12 13 14 15 |
# File 'lib/rails_db_localize.rb', line 11 def add_to_schema model, field @schema ||= {} @schema[model.to_s] ||= [] @schema[model.to_s] << field end |
.load! ⇒ Object
17 18 19 20 21 22 23 24 |
# File 'lib/rails_db_localize.rb', line 17 def load! %w(app/models).each do |dir| path = File.join(File.('../..', __FILE__), dir ) $LOAD_PATH << path ActiveSupport::Dependencies.autoload_paths << path ActiveSupport::Dependencies.autoload_once_paths.delete(path) end end |