20 lines
408 B
Ruby
20 lines
408 B
Ruby
module Suppliers
|
|
class PagesController < Suppliers::ApplicationController
|
|
prepend_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
|