upgrade refactor
This commit is contained in:
@@ -12,7 +12,7 @@ module Suppliers
|
||||
rescue_from CanCan::AccessDenied do |exception|
|
||||
respond_to do |format|
|
||||
format.html { redirect_to root_path, alert: 'Action forbidden'}
|
||||
format.json { render json: {}, status: :forbidden }
|
||||
format.json { render json: {errors: "403 Forbidden"}, status: :forbidden }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
module Suppliers
|
||||
class PagesController < Suppliers::ApplicationController
|
||||
prepend_before_action :find_page, only: [:show]
|
||||
before_action :find_page, only: [:show]
|
||||
def index
|
||||
@pages = Page.all_for_suppliers(locale: params[:locale])
|
||||
render json: @pages
|
||||
|
||||
Reference in New Issue
Block a user