-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinit.rb
27 lines (22 loc) · 973 Bytes
/
init.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
require 'stakr/i18n_helpers/controller'
require 'stakr/i18n_helpers/helper'
require 'stakr/i18n_helpers/models/human_attribute_description'
require 'stakr/i18n_helpers/models/human_attribute_example'
require 'stakr/i18n_helpers/models/human_message'
require 'stakr/i18n_helpers/models/human_value'
require 'stakr/i18n_helpers/models/model_translation'
ActionController::Base.class_eval do
include Stakr::I18nHelpers::Controller
end
ActionView::Helpers.module_eval do
include Stakr::I18nHelpers::Helper
alias :t :translate
alias :human :translate # alternative alias is required as long as AllInOne overrides the "t" and "translate" methods
end
ActiveRecord::Base.class_eval do
include Stakr::I18nHelpers::Models::HumanAttributeDescription
include Stakr::I18nHelpers::Models::HumanAttributeExample
include Stakr::I18nHelpers::Models::HumanMessage
include Stakr::I18nHelpers::Models::HumanValue
include Stakr::I18nHelpers::Models::ModelTranslation
end