Last active
August 29, 2015 14:21
-
-
Save skuroki/5f63d8b18ea3660e6309 to your computer and use it in GitHub Desktop.
ActiveAdminで各ページ共通でレイアウトの構成要素をいじる ref: http://qiita.com/skuroki@github/items/c5fce4b45a2d1a4a4bca
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
module ActiveAdmin | |
module Views | |
module Pages | |
class Base | |
def build_main_content_wrapper | |
div id: "main_content_wrapper" do | |
div id: "main_content" do | |
para <<-'EOS'.html_safe | |
<a href="https://twitter.com/share" class="twitter-share-button">Tweet</a> | |
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+'://platform.twitter.com/widgets.js';fjs.parentNode.insertBefore(js,fjs);}}(document, 'script', 'twitter-wjs');</script> | |
EOS | |
main_content | |
end | |
end | |
end | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment