More resource tweaks

This commit is contained in:
2014-02-09 04:32:45 -07:00
parent 23dcb0715c
commit a2cbcac798
9 changed files with 119 additions and 57 deletions

View File

@@ -2,6 +2,10 @@ class ResourcesController < ApplicationController
load_and_authorize_resource
before_filter :authenticate_user!, :load_users
def index
@featured_resource = @resources.where("picture_file_name IS NOT NULL").sample
end
def create
authorize! :create, @resource