Sha256: 4235d7d8b7ac25acad26263df9801dc635968af0394b241d7343088f41933d61
Contents?: true
Size: 640 Bytes
Versions: 9
Compression:
Stored size: 640 Bytes
Contents
class Admin::ReportsController < ApplicationController respond_to :json authorize_resource :admin, :support find_resource :report, namespace: :admin, except: [:index, :new, :create] def index @reports = Admin::Report.all respond_with @reports end def create @report = Admin::Report.create(report_params) respond_with @report end def show respond_with @report end def update @report.update report_params respond_with @report end def destroy @report.destroy respond_with @report end protected def report_params params.require(:report).permit(:title) end end
Version data entries
9 entries across 9 versions & 1 rubygems