app/controllers/goldencobra/application_controller.rb in goldencobra-1.0.9.3 vs app/controllers/goldencobra/application_controller.rb in goldencobra-1.1.0
- old
+ new
@@ -1,7 +1,7 @@
module Goldencobra
- class ApplicationController < ActionController::Base
+ class ApplicationController < ::ApplicationController
before_filter :set_locale
def set_locale
unless Rails.env == "test"
@@ -15,11 +15,10 @@
def after_sign_in_path_for(resource_or_scope)
request.referrer
end
-
rescue_from CanCan::AccessDenied do |exception|
if can?(:read, Goldencobra::Article)
redirect_to root_url, :alert => exception.message
else
redirect_to "/admin", :alert => exception.message
@@ -29,10 +28,9 @@
def s(name)
if name.present?
Goldencobra::Setting.for_key(name)
end
end
-
def initialize_article(current_article)
Goldencobra::Article::LiquidParser["current_article"] = @article
set_meta_tags :site => s("goldencobra.page.default_title_tag"),
:title => current_article.metatag("Title Tag"),