Sha256: ef88a7008fd8359f75be3a3e3833963242fac354edaf386ca60bf790fe9c6c8e

Contents?: true

Size: 382 Bytes

Versions: 3

Compression:

Stored size: 382 Bytes

Contents

module Almanac
  class ApplicationController < ActionController::Base
    protect_from_forgery

    before_filter :set_current_author
    before_filter :set_blog

    before_filter do |controller|
      @kramdown_parser = KramdownParser.new
    end

    def set_current_author
      current_user ||= nil
    end

    def set_blog
      @blog = Almanac::Blog.first
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
almanac-0.9.2 app/controllers/almanac/application_controller.rb
almanac-0.9.1 app/controllers/almanac/application_controller.rb
almanac-0.9.0 app/controllers/almanac/application_controller.rb