Sha256: e8ce0c6367dcfd37bae62665bfa1174f25974227609a03dd22c2b32a5fb941d8

Contents?: true

Size: 432 Bytes

Versions: 13

Compression:

Stored size: 432 Bytes

Contents

module CanTango
  class Configuration
    class Models
      class ActiveRecord < Generic
        def models
          ::ActiveRecord::Base.descendants
        rescue
          table_models
        end
        
        protected
        
        def table_models
          ActiveRecord::Base.connection.tables do |t| 
            t.classify.constantize 
            nil
          end.compact
        end
      end
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
cantango-config-0.2.1 lib/cantango/config/models/active_record.rb
cantango-config-0.2.0 lib/cantango/config/models/active_record.rb
cantango-config-0.1.9.2 lib/cantango/configuration/models/active_record.rb
cantango-config-0.1.8.1 lib/cantango/configuration/models/active_record.rb
cantango-config-0.1.8 lib/cantango/configuration/models/active_record.rb
cantango-config-0.1.7 lib/cantango/configuration/models/active_record.rb
cantango-config-0.1.6 lib/cantango/configuration/models/active_record.rb
cantango-config-0.1.5 lib/cantango/configuration/models/active_record.rb
cantango-config-0.1.4 lib/cantango/configuration/models/active_record.rb
cantango-config-0.1.3 lib/cantango/configuration/models/active_record.rb
cantango-config-0.1.2 lib/cantango/configuration/models/active_record.rb
cantango-config-0.1.1 lib/cantango/configuration/models/active_record.rb
cantango-config-0.1.0 lib/cantango/configuration/models/active_record.rb