Sha256: 248bee796984dfd8c0988acd8b25a95567a40b7b732e487b8a0c7fd4a07d67d5

Contents?: true

Size: 497 Bytes

Versions: 53

Compression:

Stored size: 497 Bytes

Contents

module ActiveRecord
  class Relation
    class FromClause # :nodoc:
      attr_reader :value, :name

      def initialize(value, name)
        @value = value
        @name = name
      end

      def binds
        if value.is_a?(Relation)
          value.bound_attributes
        else
          []
        end
      end

      def merge(other)
        self
      end

      def empty?
        value.nil?
      end

      def self.empty
        @empty ||= new(nil, nil)
      end
    end
  end
end

Version data entries

53 entries across 53 versions & 4 rubygems

Version Path
autocompl-0.0.1 test/dummy/vendor/bundle/ruby/2.3.0/gems/activerecord-5.0.1/lib/active_record/relation/from_clause.rb
abaci-0.3.0 vendor/bundle/gems/activerecord-5.0.0/lib/active_record/relation/from_clause.rb
activerecord-5.0.1 lib/active_record/relation/from_clause.rb
activerecord-5.0.1.rc2 lib/active_record/relation/from_clause.rb
activerecord-5.0.1.rc1 lib/active_record/relation/from_clause.rb
activerecord-5.0.0.1 lib/active_record/relation/from_clause.rb
activerecord-5.0.0 lib/active_record/relation/from_clause.rb
activerecord-5.0.0.rc2 lib/active_record/relation/from_clause.rb
activerecord-5.0.0.racecar1 lib/active_record/relation/from_clause.rb
activerecord-5.0.0.rc1 lib/active_record/relation/from_clause.rb
activerecord-5.0.0.beta4 lib/active_record/relation/from_clause.rb
activerecord-5.0.0.beta3 lib/active_record/relation/from_clause.rb
activerecord-5.0.0.beta2 lib/active_record/relation/from_clause.rb