Module: ActiveRecordExtended::QueryMethods::Select

Defined in:
lib/active_record_extended/query_methods/select.rb

Defined Under Namespace

Classes: SelectHelper

Instance Method Summary collapse

Instance Method Details

#_foster_select!(*args) ⇒ Object



110
111
112
113
# File 'lib/active_record_extended/query_methods/select.rb', line 110

def _foster_select!(*args)
  SelectHelper.new(self).build_foster_select(*args)
  self
end

#foster_select(*args) ⇒ Object

Raises:

  • (ArgumentError)


104
105
106
107
108
# File 'lib/active_record_extended/query_methods/select.rb', line 104

def foster_select(*args)
  raise ArgumentError.new("Call `.forster_select' with at least one field") if args.empty?

  spawn._foster_select!(*args)
end