This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Let's say we have a blog app. A blog post has several child resources (comments, tags, | |
# etc.). The controllers for each of these resources share the same layout. Here's one | |
# way we could do it: | |
class BasePostsController < ApplicationController | |
include Heimdallr::Resource | |
load_and_authorize_resource :resource => :post | |
# We could have a before_filter here that sets some instance variables for the layout |