Sha256: 60c92188cf5d2d816005a66ad61b5d26dd397a264e84d3799f6a1d3ca0b742e2

Contents?: true

Size: 334 Bytes

Versions: 8

Compression:

Stored size: 334 Bytes

Contents

class ProductsController < ::ApplicationController
  include ::Trax::Controller
  include ::Trax::Controller::Collection::Pageable

  defaults :resource_class => ::Product

  has_scope :by_id

  actions :index, :show, :create, :update, :destroy

  def product_params
    params.require(:product).permit(:name, :category_id)
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
trax_controller-1.0.0 spec/internal/app/controllers/products_controller.rb
trax_controller-0.1.4 spec/internal/app/controllers/products_controller.rb
trax_controller-0.1.3 spec/internal/app/controllers/products_controller.rb
trax_controller-0.1.2 spec/internal/app/controllers/products_controller.rb
trax_controller-0.1.1 spec/internal/app/controllers/products_controller.rb
trax_controller-0.1.0 spec/internal/app/controllers/products_controller.rb
trax_controller-0.0.4 spec/internal/app/controllers/products_controller.rb
trax_controller-0.0.3 spec/internal/app/controllers/products_controller.rb