Sha256: 4ac644d579d8b3abdd2ab83e45855d7c2ef4ee5b96c13ac1c077606bf5e3242c

Contents?: true

Size: 604 Bytes

Versions: 1

Compression:

Stored size: 604 Bytes

Contents

class Monologue::ApplicationController < ApplicationController
  
  def not_found
    # fallback to the default 404.html page from main_app.
    file = Rails.root.join('public', '404.html')
    if file.exist?
      render :file => file.cleanpath.to_s.gsub(%r{#{file.extname}$}, ''),
         :layout => false, :status => 404, :formats => [:html]
    else
      render :action => "404", :status => 404, :formats => [:html]
    end
  end
  
  
  private

    def current_user
      @current_user ||= Monologue::User.find(session[:user_id]) if session[:user_id]
    end
  
  helper_method :current_user
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
monologue-0.1.0 app/controllers/monologue/application_controller.rb