module Suppliers class PagesController < Suppliers::ApplicationController before_action :find_page, only: [:show] def index @pages = Page.all_for_suppliers(locale: params[:locale]) render json: @pages end def show render json: @page end private def find_page @page = Page.suppliers_page(params[:id], locale: params[:locale]) end end end