Sha256: 0132e6990ea8b7c36cb949eb76dc4a793d275b5ceec3f84fef0b5396657d0a13
Contents?: true
Size: 704 Bytes
Versions: 8
Compression:
Stored size: 704 Bytes
Contents
require_dependency "application_controller" module <%= project_class %> class AdminController < ApplicationController inherit_resources # Use inherited_resources helper ::ExpressAdmin::AdminHelper before_filter :authenticate_user! if defined?(Devise) layout "<%= project_name %>/admin" before_filter :load_collection, only: [:show] before_filter :build_new_resource, only: [:index] def show show! do |format| format.html { render :index } end end private def load_collection collection # from InheritedResources end def build_new_resource @resource_params = {} build_resource end end end
Version data entries
8 entries across 8 versions & 1 rubygems