39 lines
423 B
Ruby
39 lines
423 B
Ruby
class Admin::NeedsController < ApplicationController
|
|
layout "admin"
|
|
before_filter :auth_admin
|
|
before_action :build_category_tree, only:[:new, :update, :create, :edit, :index]
|
|
|
|
def index
|
|
|
|
end
|
|
|
|
def new
|
|
|
|
|
|
def create
|
|
|
|
end
|
|
|
|
def edit
|
|
|
|
|
|
end
|
|
|
|
def update
|
|
|
|
end
|
|
|
|
def destroy
|
|
|
|
end
|
|
|
|
|
|
|
|
private
|
|
|
|
def order_params
|
|
params.require(:order).permit(:title, :description, :category_id, :author_id)
|
|
end
|
|
|
|
end
|