Sha256: 3ad4408890b404ee8dc93dfa17205ca0af82c361570431bb538fc21dced20d2e

Contents?: true

Size: 379 Bytes

Versions: 1

Compression:

Stored size: 379 Bytes

Contents

module PandaCms
  class PostsController < ApplicationController
    def index
    end

    def show
      post = PandaCms::Post.find_by(slug: "/" + params[:slug])

      # TODO: Make this much nicer in future
      globals = {
        post: post,
        title: post.title
      }

      render inline: "", assigns: globals, status: :ok, layout: "layouts/post"
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
panda_cms-0.5.5 app/controllers/panda_cms/posts_controller.rb