Sha256: 285fe3be0f428293405db35faa5552ca7def597df48d4956f864f74277bf0a6b

Contents?: true

Size: 642 Bytes

Versions: 16

Compression:

Stored size: 642 Bytes

Contents

module Refinery
  
  def self.add_gems    
    ActiveRecord::Base.module_eval do  	  
      begin
        require 'friendly_id'
        require 'will_paginate'
        require 'aasm'
      rescue LoadError => load_error
        # this will stop us running rake gems:install which we don't really want so just trap this error.
      end
  		
      # Stub has_friendly_id. This will get overriden when/if included.
      # The config will still complain that the gem is missing but this allows it to do so.
    	def self.has_friendly_id(column, options = {}, &block)
    	  super if defined? super and table_exists?
  	  end
  	end
  end
  
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
refinerycms-0.9.5.13 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.12 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.11 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.10 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.9 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.8 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.7 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.6 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.5 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.4 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.3 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.2 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.1 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.4.5 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.4.4 vendor/plugins/refinery/lib/refinery.rb