forked from activescaffold/active_scaffold
-
Notifications
You must be signed in to change notification settings - Fork 0
/
environment.rb
17 lines (12 loc) · 893 Bytes
/
environment.rb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
require 'active_scaffold'
# TODO: clean up extensions. some could be organized for autoloading, and others could be removed entirely.
Dir["#{File.dirname __FILE__}/lib/extensions/*.rb"].each { |file| require file }
ActionController::Base.send(:include, ActiveScaffold)
ActionController::Base.send(:include, RespondsToParent)
ActionController::Base.send(:include, ActiveScaffold::Helpers::ControllerHelpers)
ActionView::Base.send(:include, ActiveScaffold::Helpers::ViewHelpers)
ActionController::Base.class_eval {include ActiveRecordPermissions::ModelUserAccess::Controller}
ActiveRecord::Base.class_eval {include ActiveRecordPermissions::ModelUserAccess::Model}
ActiveRecord::Base.class_eval {include ActiveRecordPermissions::Permissions}
require 'bridges/bridge.rb'
I18n.load_path.unshift *Dir[File.join(File.dirname(__FILE__), 'lib', 'active_scaffold', 'locale', '*.{rb,yml}')]