Sha256: d2de2453e30980811595d25fcea629948c4e9950807227030d9545b7dee56b43

Contents?: true

Size: 504 Bytes

Versions: 7

Compression:

Stored size: 504 Bytes

Contents

module Outpost
  class PeopleController < Outpost::ResourceController
    outpost_controller model: Person

    define_list do |l|
      l.default_order_attribute   = "name"
      l.default_order_direction   = DESCENDING
      l.per_page                  = 25

      l.column :name
      l.column :email
      l.column :location
      l.column :age
    end

    private

    def form_params
      params.require(model.singular_route_key)
        .permit(:name, :email, :location, :age)
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
outpost-cms-0.1.4 spec/internal/app/controllers/outpost/people_controller.rb
outpost-cms-0.1.3 spec/internal/app/controllers/outpost/people_controller.rb
outpost-cms-0.1.2 spec/internal/app/controllers/outpost/people_controller.rb
outpost-cms-0.1.1 spec/internal/app/controllers/outpost/people_controller.rb
outpost-cms-0.1.0 spec/internal/app/controllers/outpost/people_controller.rb
outpost-cms-0.0.5 spec/internal/app/controllers/outpost/people_controller.rb
outpost-cms-0.0.4 spec/internal/app/controllers/outpost/people_controller.rb