Sha256: 4a3acf9af67e257982d1ccf34b48f29a5625493d169a5414ada7987f4d8530c3
Contents?: true
Size: 431 Bytes
Versions: 1
Compression:
Stored size: 431 Bytes
Contents
class PostsController < ApplicationController before_action :find_category before_action :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
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
meta_manager-0.3.0 | test/dummy/app/controllers/posts_controller.rb |