Sha256: cc8b2516b9ff35c0404121c91d7efec3a2a32e4eca24b79ca86fda6523c25c67

Contents?: true

Size: 435 Bytes

Versions: 23

Compression:

Stored size: 435 Bytes

Contents

module TypeStation
  module Admin
    class PagesController < ::TypeStation::AdminController

      def index
        @pages = TypeStation::Page.in(status: [:draft, :published])
        @pages = @pages.where(title: /#{params[:title]}/i) if params[:title]
        @pages = @pages.where(path: /#{params[:path]}/i) if params[:path]
  
        render json: { status: :success, pages: @pages }, status: :ok
      end
    
    end
  end
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
type_station-0.7.0 app/controllers/type_station/admin/pages_controller.rb
type_station-0.6.0 app/controllers/type_station/admin/pages_controller.rb
type_station-0.5.4 app/controllers/type_station/admin/pages_controller.rb
type_station-0.5.3 app/controllers/type_station/admin/pages_controller.rb
type_station-0.5.2 app/controllers/type_station/admin/pages_controller.rb
type_station-0.5.1 app/controllers/type_station/admin/pages_controller.rb
type_station-0.4.7 app/controllers/type_station/admin/pages_controller.rb
type_station-0.4.6 app/controllers/type_station/admin/pages_controller.rb
type_station-0.4.5 app/controllers/type_station/admin/pages_controller.rb
type_station-0.4.4 app/controllers/type_station/admin/pages_controller.rb
type_station-0.4.3 app/controllers/type_station/admin/pages_controller.rb
type_station-0.4.2 app/controllers/type_station/admin/pages_controller.rb
type_station-0.4.1 app/controllers/type_station/admin/pages_controller.rb
type_station-0.4.0 app/controllers/type_station/admin/pages_controller.rb
type_station-0.3.4 app/controllers/type_station/admin/pages_controller.rb
type_station-0.3.3 app/controllers/type_station/admin/pages_controller.rb
type_station-0.3.2 app/controllers/type_station/admin/pages_controller.rb
type_station-0.3.1 app/controllers/type_station/admin/pages_controller.rb
type_station-0.3.0 app/controllers/type_station/admin/pages_controller.rb
type_station-0.2.3 app/controllers/type_station/admin/pages_controller.rb