Forked from jocubeit/active_admin_views_pages_base.rb
Created
August 31, 2011 09:50
-
-
Save mimosz/1183197 to your computer and use it in GitHub Desktop.
Override footer content in Active Admin gem
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# encoding: utf-8 | |
ActiveAdmin::Views::Pages::Base.class_eval do | |
private | |
# Renders the content for the footer | |
def build_footer | |
div :id => "footer" do | |
para "Copyright © #{Date.today.year.to_s} #{link_to('Example.com', 'http://example.com')}. Powered by #{link_to('Active Admin', 'http://www.activeadmin.info')} #{ActiveAdmin::VERSION}".html_safe | |
end | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/controllers/application_controller.rb | |
class ApplicationController < ActionController::Base | |
protect_from_forgery | |
# Override build_footer method in ActiveAdmin::Views::Pages | |
require 'active_admin_views_pages_base.rb' | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment