Sha256: 206336ef444e5e02222fdc5619e428103fde2a3784f31005b75bfd51bd637745

Contents?: true

Size: 730 Bytes

Versions: 4

Compression:

Stored size: 730 Bytes

Contents

# frozen_string_literal: true

require 'ditty/controllers/component'
require 'ditty/models/audit_log'
require 'ditty/policies/audit_log_policy'

module Ditty
  class AuditLogs < Ditty::Component
    set model_class: AuditLog

    def find_template(views, name, engine, &block)
      super(views, name, engine, &block) # Root
      super(::Ditty::App.view_folder, name, engine, &block) # Ditty
    end

    def list
      super.order(:created_at).reverse
    end

    get '/new' do
      halt 404
    end

    post '/' do
      halt 404
    end

    get '/:id' do
      halt 404
    end

    get '/:id/edit' do
      halt 404
    end

    put '/:id' do
      halt 404
    end

    delete '/:id' do
      halt 404
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
ditty-0.3.0 lib/ditty/controllers/audit_logs.rb
ditty-0.2.2 lib/ditty/controllers/audit_logs.rb
ditty-0.2.1 lib/ditty/controllers/audit_logs.rb
ditty-0.2.0 lib/ditty/controllers/audit_logs.rb