Sha256: 477009e6d6433fd09620e27025d53b3f30fa8757d52946195f790e1f8753c44a
Contents?: true
Size: 761 Bytes
Versions: 2
Compression:
Stored size: 761 Bytes
Contents
class Monologue::ApplicationController < ApplicationController layout Monologue.layout if Monologue.layout # TODO: find a way to test that. It was asked in issue #54 (https://github.com/jipiboily/monologue/issues/54) 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
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
monologue-0.1.3 | app/controllers/monologue/application_controller.rb |
monologue-0.1.2 | app/controllers/monologue/application_controller.rb |