Sha256: c639bde815a0178ad3f77d209b4902a87516452385a419d6652a23fd40aa76f6

Contents?: true

Size: 630 Bytes

Versions: 28

Compression:

Stored size: 630 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

28 entries across 28 versions & 1 rubygems

Version Path
refinerycms-0.9.6.9 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.6.8 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.6.7 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.6.6 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.6.5 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.6.4 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.6.3 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.6.2 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.6.1 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.6 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.31 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.30 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.29 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.28 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.27 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.26 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.25 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.24 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.23 vendor/plugins/refinery/lib/refinery.rb
refinerycms-0.9.5.22 vendor/plugins/refinery/lib/refinery.rb