upgrade refactor

This commit is contained in:
2016-06-02 14:40:30 +02:00
parent 1acd200408
commit eb368a31ca
25 changed files with 36 additions and 30 deletions
@@ -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