Dynamic pages, language switcher and fix schedule drag drop time mismatch bug
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
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, each_serializer: Suppliers::PageSerializer
|
||||
end
|
||||
|
||||
def show
|
||||
render json: @page, serializer: Suppliers::PageSerializer
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def find_page
|
||||
@page = Page.suppliers_page(params[:id], locale: params[:locale])
|
||||
end
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user