Sha256: c842f07b605a07f7f0f439678443167df1e958f40070b625a21babcab6b6fd34

Contents?: true

Size: 449 Bytes

Versions: 25

Compression:

Stored size: 449 Bytes

Contents

class PostsController < ApplicationController
  before_filter :find_category
  before_filter :prepare_dynamic_page, :only => [:show]
  
  def index
    @posts = Post.order('id')
    respond_with(@posts)
  end
  
  def show
    @post = Post.find(params[:id])
    respond_with(@post)
  end
  
  protected
    
    def find_category
      @category = Category.first
    end
    
    def prepare_dynamic_page
      @meta_dynamic = true
    end
    
end

Version data entries

25 entries across 20 versions & 2 rubygems

Version Path
meta_manager-0.2.3 test/dummy/app/controllers/posts_controller.rb
meta_manager-0.2.2 test/dummy/app/controllers/posts_controller.rb
meta_manager-0.2.1 test/dummy/app/controllers/posts_controller.rb
meta_manager-0.2.0 test/dummy/app/controllers/posts_controller.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/meta_manager-0.1.1/test/dummy/app/controllers/posts_controller.rb
sunrise-cms-0.5.0.rc1 vendor/bundle/ruby/1.9.1/gems/meta_manager-0.0.8/test/dummy/app/controllers/posts_controller.rb
meta_manager-0.1.1 test/dummy/app/controllers/posts_controller.rb
meta_manager-0.1.0 test/dummy/app/controllers/posts_controller.rb
meta_manager-0.0.8 test/dummy/app/controllers/posts_controller.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/meta_manager-0.0.5/test/dummy/app/controllers/posts_controller.rb
sunrise-cms-0.3.3 vendor/bundle/ruby/1.9.1/gems/meta_manager-0.0.6/test/dummy/app/controllers/posts_controller.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/meta_manager-0.0.6/test/dummy/app/controllers/posts_controller.rb
sunrise-cms-0.3.2 vendor/bundle/ruby/1.9.1/gems/meta_manager-0.0.5/test/dummy/app/controllers/posts_controller.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/meta_manager-0.0.6/test/dummy/app/controllers/posts_controller.rb
sunrise-cms-0.3.1 vendor/bundle/ruby/1.9.1/gems/meta_manager-0.0.5/test/dummy/app/controllers/posts_controller.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/meta_manager-0.0.6/test/dummy/app/controllers/posts_controller.rb
sunrise-cms-0.3.0 vendor/bundle/ruby/1.9.1/gems/meta_manager-0.0.5/test/dummy/app/controllers/posts_controller.rb
meta_manager-0.0.7 test/dummy/app/controllers/posts_controller.rb
meta_manager-0.0.6 test/dummy/app/controllers/posts_controller.rb
sunrise-cms-0.3.0.rc vendor/bundle/ruby/1.9.1/gems/meta_manager-0.0.5/test/dummy/app/controllers/posts_controller.rb