Sha256: eacc66f7b60071c538929f85b536d626163cdeee549a9e008c84b075c5eff62e

Contents?: true

Size: 579 Bytes

Versions: 7

Compression:

Stored size: 579 Bytes

Contents

module MicroAdmin
  module Dashboard
    class Base < Cell::ViewModel
      include ::Cell::Erb

      self.view_paths = [
        File.join(__dir__, "..", ".."),
        __dir__
      ]

      def index(resources)
        @resources = resources
        render
      end
      
      def show(resource)
        @resource = resource
        render
      end

      def new(errors:)
        @errors = errors
        render
      end

      def edit(id:, values:, errors:)
        @id = id
        @values = values
        @errors = errors
        render
      end
    end
  end
end

Version data entries

7 entries across 7 versions & 1 rubygems

Version Path
micro_admin-0.1.6 lib/micro_admin/dashboard/base.rb
micro_admin-0.1.5 lib/micro_admin/dashboard/base.rb
micro_admin-0.1.4 lib/micro_admin/dashboard/base.rb
micro_admin-0.1.3 lib/micro_admin/dashboard/base.rb
micro_admin-0.1.2 lib/micro_admin/dashboard/base.rb
micro_admin-0.1.1 lib/micro_admin/dashboard/base.rb
micro_admin-0.1.0 lib/micro_admin/dashboard/base.rb