module RailsDbLocalize
Constants
- VERSION
Attributes
schema[R]
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
Public Class Methods
add_to_schema(model, field)
click to toggle source
# File lib/rails_db_localize.rb, line 11 def add_to_schema model, field @schema ||= {} arr = (@schema[model.to_s] ||= []) arr << field unless arr.index(field) end
gem_path()
click to toggle source
# File lib/rails_db_localize.rb, line 26 def gem_path @gem_path ||= File.expand_path("..", File.dirname(__FILE__)) end
load!()
click to toggle source
# File lib/rails_db_localize.rb, line 17 def load! %w(app/models).each do |dir| path = File.join(File.expand_path('../..', __FILE__), dir ) $LOAD_PATH << path ActiveSupport::Dependencies.autoload_paths << path ActiveSupport::Dependencies.autoload_once_paths.delete(path) end end