Sha256: c77b91e883346515be12deabe9da79302449b2f1ca73847f775ae40facb3f5a1

Contents?: true

Size: 409 Bytes

Versions: 3

Compression:

Stored size: 409 Bytes

Contents

class Search::Task < Railstar::SearchBase
  TARGET_COLUMN = %w(name like_name status project_id from_price to_price)
  attr_accessor *TARGET_COLUMN

  private
  def create_conditions
    eq(:project_id)
    eq(:name)
    like(:like_name, column: :name)
    inc(:status)
    compare(:from_price, ">=", column: :price)
    compare(:to_price, "<=", column: :price)
  end

  def target_model
    ::Task
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
railstar-0.0.12 test/dummy/app/models/search/task.rb
railstar-0.0.11 test/dummy/app/models/search/task.rb
railstar-0.0.10 test/dummy/app/models/search/task.rb