Sha256: 5af3ad220282b778fd21ccd7f92b52e260f1e988b9492e96cac1d80bfd5e4734

Contents?: true

Size: 917 Bytes

Versions: 1

Compression:

Stored size: 917 Bytes

Contents

require 'active_support/railtie'
require 'r3_plugin_toolbox'

require_all File.dirname(__FILE__) + '/after_init'

Rails3::Plugin::Extender.new do
  # extend action_controller with methods from some modules

  extend_rails :controller do
    extend_from_module Cream, :role
    extend_from_module Cream::Controller, :ability
    extend_from_module Cream::Helper, :role, :host 
  end  

  # extend action_view with methods from some modules
  extend_rails :view do
    extend_from_module Cream::View, :role, :host, :user_action_menu
    extend_from_module Cream::Helper, :role
  end  
  
  after :initialize do    
    load File.dirname(__FILE__) + '/after_init/role_config.rb'

    if defined? Cream::UserControl
      # puts "Extending ApplicationController with UserControl"
      ApplicationController.class_eval "include Cream::UserControl"
    else
      puts "Cream::UserControl not defined!"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
cream-0.8.9.2 lib/cream/configure/rails.rb