Sha256: 02a6f305f13b9769f5dbddc93d19b0d756fb8bc75a8ac079bbf4855f3f2f9503

Contents?: true

Size: 732 Bytes

Versions: 12

Compression:

Stored size: 732 Bytes

Contents

module FatFreeCRM
  module Cloudfuji
    class Engine < Rails::Engine
      config.before_initialize do
        # Register observers to fire Cloudfuji events
        (config.active_record.observers ||= []) << :cloudfuji_lead_observer
      end
    
      config.to_prepare do
        require 'fat_free_crm/cloudfuji/view_hooks'

        # Add Event Rules tab
        begin
          unless FatFreeCRM::Tabs.admin.any? {|t| t[:text] == "Event Rules" }
            FatFreeCRM::Tabs.admin << {
            :text => "Event Rules",
            :url => { :controller => "admin/event_rules" }
          }
          end
        rescue TypeError
          puts "You must migrate your settings table."
        end
      end
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ffcrm_cloudfuji-0.3.1 lib/ffcrm_cloudfuji/engine.rb
ffcrm_cloudfuji-0.3.0 lib/ffcrm_cloudfuji/engine.rb
ffcrm_cloudfuji-0.2.11 lib/ffcrm_cloudfuji/engine.rb
ffcrm_cloudfuji-0.2.10 lib/ffcrm_cloudfuji/engine.rb
ffcrm_cloudfuji-0.2.9 lib/ffcrm_cloudfuji/engine.rb
ffcrm_cloudfuji-0.2.8 lib/ffcrm_cloudfuji/engine.rb
ffcrm_cloudfuji-0.2.7 lib/ffcrm_cloudfuji/engine.rb
ffcrm_cloudfuji-0.2.6 lib/ffcrm_cloudfuji/engine.rb
ffcrm_cloudfuji-0.2.5 lib/ffcrm_cloudfuji/engine.rb
ffcrm_cloudfuji-0.2.4 lib/ffcrm_cloudfuji/engine.rb
ffcrm_cloudfuji-0.2.3 lib/ffcrm_cloudfuji/engine.rb
ffcrm_cloudfuji-0.2.2 lib/ffcrm_cloudfuji/engine.rb