Class: ProductType

Inherits:
ActiveRecord::Base
  • Object
show all
Defined in:
app/models/product_type.rb

Constant Summary

1

Class Method Summary (collapse)

Class Method Details

+ (Array[ProductType]) admin_grid(params = {})

paginated results from the admin ProductType grid

Parameters:

  • (Optional params)

Returns:



13
14
15
16
17
# File 'app/models/product_type.rb', line 13

def self.admin_grid(params = {})
  grid = ProductType
  grid = grid.where("product_types.name LIKE ?", "#{params[:name]}%")              if params[:name].present?
  grid
end