Sha256: 99eddb0c283e19a2e5fe55e44c1430a2ac8f9036e86d743a1e1a832b4b1215a1
Contents?: true
Size: 639 Bytes
Versions: 9
Compression:
Stored size: 639 Bytes
Contents
class PhotosController < AbstractResourcesController private def resource_params params.require(:photo).permit( :id, :image ) end # # # find all resources def find_all_resources options return false unless policy_scope(resource_class) policy_scope(resource_class) end # # # find queried resources collection - implement on each controller to customize def find_resources_queried options={} lot = parent? ? parent.send(resource_name) : resource_class res = case params[:subtype] when nil; Photo.search policy_scope(lot), params[:q] end end end
Version data entries
9 entries across 9 versions & 1 rubygems