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