Created
March 6, 2014 02:33
-
-
Save brentsowers1/9381127 to your computer and use it in GitHub Desktop.
/lib/facebooker/rails/helpers.rb
This file contains hidden or 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 Facebooker | |
def self.api_key | |
unless @_api_key | |
config = (YAML.load(ERB.new(File.read(File.join(::Rails.root,"config","facebooker.yml"))).result)[::Rails.env]) | |
@_api_key = config["api_key"] | |
end | |
@_api_key | |
end | |
... | |
# Return the URL for the about page of the application | |
def fb_about_url | |
"http://www.facebook.com/apps/application.php?api_key=#{Facebooker.api_key}" | |
end | |
... | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment