Module: Utusemi::Core::ActiveRecord::QueryMethods

Includes:
Base
Defined in:
lib/utusemi/core.rb

Instance Method Summary collapse

Methods included from Base

#utusemi, #utusemi!, #utusemi_values

Instance Method Details

#build_where(opts = :chain, *rest) ⇒ Object



178
179
180
181
182
183
184
185
# File 'lib/utusemi/core.rb', line 178

def build_where(opts = :chain, *rest)
  return super unless utusemi_values[:flag]
  if utusemi_values[:options][:times]
    opts_with_times(opts, utusemi_values[:options][:times]) { |opts_with_mapped| super(opts_with_mapped, *rest) }
  else
    super(opts_with_mapped_column_name(opts), *rest)
  end
end

#order(opts = nil, *rest) ⇒ Object



187
188
189
190
# File 'lib/utusemi/core.rb', line 187

def order(opts = nil, *rest)
  opts = opts_with_mapped_column_name(opts) if utusemi_values[:flag]
  super
end