Sha256: 8b11410aa94796b3ef95a57a50da87a19242fc54ff3684e992457829d09b99aa

Contents?: true

Size: 335 Bytes

Versions: 3

Compression:

Stored size: 335 Bytes

Contents

module Qbrick
  module Api
    class PagesController < ActionController::Base
      layout :false
      respond_to :json

      def index
        I18n.locale = params[:locale]
        @pages = Qbrick::Page.unscoped.published.content_page.translated.order(position: :asc)
        render json: @pages.as_json
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
qbrick-2.5.2 app/controllers/qbrick/api/pages_controller.rb
qbrick-2.5.1 app/controllers/qbrick/api/pages_controller.rb
qbrick-2.5.0 app/controllers/qbrick/api/pages_controller.rb