Sha256: c56fd800ab1803fbe2061471633b5ca9e1c2b6739d45fe7ebd81853683abe9df

Contents?: true

Size: 798 Bytes

Versions: 5

Compression:

Stored size: 798 Bytes

Contents

module Refinery
  module Pods
    class PodsController < ::ApplicationController

      before_filter :find_all_pods
      before_filter :find_page

      def index
        # you can use meta fields from your model instead (e.g. browser_title)
        # by swapping @page for @pod in the line below:
        present(@page)
      end

      def show
        @pod = Pod.find(params[:id])

        # you can use meta fields from your model instead (e.g. browser_title)
        # by swapping @page for @pod in the line below:
        present(@page)
      end

    protected

      def find_all_pods
        @pods = Pod.order('position ASC')
      end

      def find_page
        @page = ::Refinery::Page.where(:link_url => "/pods").first
      end

    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
refinerycms-pods-2.1.1 app/controllers/refinery/pods/pods_controller.rb
refinerycms-pods-2.1.0 app/controllers/refinery/pods/pods_controller.rb
refinerycms-pods-2.0.3 app/controllers/refinery/pods/pods_controller.rb
refinerycms-pods-2.0.2 app/controllers/refinery/pods/pods_controller.rb
refinerycms-pods-2.0.1 app/controllers/refinery/pods/pods_controller.rb