Sha256: 6df957b131ff710f199ecfc0fb6ec7e70c1e140544c8b5948edfac8c7c417a68

Contents?: true

Size: 549 Bytes

Versions: 10

Compression:

Stored size: 549 Bytes

Contents

require 'iord/controller'
require 'iord/json'

class ProductsController < ApplicationController
  include Iord::Controller
  include Iord::Json
  include Iord::Sort
  include Iord::Paginate
  include Iord::Search
  include Iord::Iterable

  def index_attrs
    show_attrs
  end

  def show_attrs
    %i(name reference quantity) + [
      {category: :name}
    ]
  end

  def form_attrs
    %i(name reference) + [
      [:number_field, :quantity],
      {
        attr: :category,
        fields: [
          :name
        ]
      }
    ]
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
iord-1.2.2 test/dummy/app/controllers/products_controller.rb
iord-1.2.1 test/dummy/app/controllers/products_controller.rb
iord-1.2.0 test/dummy/app/controllers/products_controller.rb
iord-1.1.3 test/dummy/app/controllers/products_controller.rb
iord-1.1.2 test/dummy/app/controllers/products_controller.rb
iord-1.1.1 test/dummy/app/controllers/products_controller.rb
iord-1.1.0 test/dummy/app/controllers/products_controller.rb
iord-1.0.3 test/dummy/app/controllers/products_controller.rb
iord-1.0.2 test/dummy/app/controllers/products_controller.rb
iord-1.0.1 test/dummy/app/controllers/products_controller.rb