Class: ActiveRecordPatchFirstOrCreate::ArelQueryCreator

Inherits:
Struct
  • Object
show all
Defined in:
lib/active_record_patch_first_or_create/arel_query_creator.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#attributesObject

Returns the value of attribute attributes

Returns:

  • (Object)

    the current value of attributes



2
3
4
# File 'lib/active_record_patch_first_or_create/arel_query_creator.rb', line 2

def attributes
  @attributes
end

#relationObject

Returns the value of attribute relation

Returns:

  • (Object)

    the current value of relation



2
3
4
# File 'lib/active_record_patch_first_or_create/arel_query_creator.rb', line 2

def relation
  @relation
end

Instance Method Details

#to_sqlObject



3
4
5
# File 'lib/active_record_patch_first_or_create/arel_query_creator.rb', line 3

def to_sql
  insert_query.to_sql
end