Skip to content

Instantly share code, notes, and snippets.

@jocubeit
Created May 22, 2011 03:57
Show Gist options
  • Star 8 You must be signed in to star a gist
  • Fork 6 You must be signed in to fork a gist
  • Save jocubeit/985168 to your computer and use it in GitHub Desktop.
Save jocubeit/985168 to your computer and use it in GitHub Desktop.
Override footer content in Active Admin gem
# lib/active_admin_views_pages_base.rb
class ActiveAdmin::Views::Pages::Base < Arbre::HTML::Document
private
# Renders the content for the footer
def build_footer
div :id => "footer" do
para "Copyright &copy; #{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
# 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
@jocubeit
Copy link
Author

@mimosz
Copy link

mimosz commented Aug 31, 2011

update ~

@poudelmadhav
Copy link

It worked for me. Thank you a lot!!!

@jnewman12
Copy link

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment