Project

General

Profile

Download (965 Bytes) Statistics
| Branch: | Tag: | Revision:
b689e231 Marc Dequènes (Duck)
# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.

require 'gettext/rails'
require 'exif'
require 'utils'
require 'mycyma'

#Mime::Type.register "image/svg+xml", :svg

class ApplicationController < ActionController::Base
helper :all # include all helpers, all the time

rescue_from RestfulSupport::ResourceNotFound, :with => :render_404
rescue_from RestfulSupport::UnrelatedResources, :with => :render_404

# See ActionController::RequestForgeryProtection for details
# Uncomment the :secret if you're not using the cookie session store
protect_from_forgery # :secret => '86f01f14fc184c81bf152965a2bccb88'

init_gettext MyCyma::Info::app_name

def initialize
super

@config = MyCyma::Config.instance
end

def render_404
render :template => "common/404", :layout => ! request.xhr?, :status => :not_found
return false
end
end