Sha256: 29df7853f6b876de53ff6c86afc9844a0c1256452edf473bd867b359fc602160

Contents?: true

Size: 1.01 KB

Versions: 1

Compression:

Stored size: 1.01 KB

Contents

require 'active_support/railtie'
require 'r3_plugin_toolbox'

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, :auth_label
  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, :auth_label
  end  
  
  after :initialize do   
    require_all File.dirname(__FILE__) + '/after_init'

    # Rails3.with_configuration do
    #   autoload_paths += %W(#{Rails.root}/app/permits) 
    #    load_paths += %W( #{RAILS_ROOT}/extras ) 
    # end

    ActiveSupport::Dependencies.load_paths << %W(#{Rails.root}/app/permits)

    # set cream config object
    # Rails3.with_configuration do
    #   cream = Cream::Rails::Config.new :roles => Cream::Role.available
    # end
  end  
end

Version data entries

1 entries across 1 versions & 1 rubygems

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