Sha256: 27b4e1a6bb139b7b861411f099b4e4b0c3b40d0e866c636406626f66718a237e
Contents?: true
Size: 737 Bytes
Versions: 22
Compression:
Stored size: 737 Bytes
Contents
if defined?(Rails) # Track all of the applicable locales to load locale_paths = [] StateMachine::Integrations.all.each do |integration| locale_paths << integration.locale_path if integration.available? && integration.locale_path end if defined?(Rails::Engine) # Rails 3.x class StateMachine::RailsEngine < Rails::Engine rake_tasks do load 'tasks/state_machine.rb' end end if Rails::VERSION::MAJOR == 3 && Rails::VERSION::MINOR == 0 StateMachine::RailsEngine.paths.config.locales = locale_paths else StateMachine::RailsEngine.paths['config/locales'] = locale_paths end elsif defined?(I18n) # Rails 2.x I18n.load_path.unshift(*locale_paths) end end
Version data entries
22 entries across 22 versions & 10 rubygems