Skip to content

Commit

Permalink
Read FB information from a config file. Move Stripe key settings into…
Browse files Browse the repository at this point in the history
… the layout
  • Loading branch information
erikogan committed Jan 26, 2014
1 parent efd3583 commit 4b1b139
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 4 deletions.
4 changes: 2 additions & 2 deletions app/assets/javascripts/facebook.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ $(document).ready(function() {

window.fbAsyncInit = function() {
FB.init({
appId: "197205760473992",
appId: $fb_app_id,
status: true,
xfbml: true,
cookie: true
Expand All @@ -42,7 +42,7 @@ window.fbAsyncInit = function() {
if(logged_in == false) {
connected();
}
});
});
});

};
Expand Down
2 changes: 0 additions & 2 deletions app/views/home/index.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -205,5 +205,3 @@
Be a Leader.
%a{href:'http://ub-counseling.buffalo.edu/fighting.shtml'} Learn Even More.
:javascript
$stripe_key = "#{STRIPE[:publish]}";
4 changes: 4 additions & 0 deletions app/views/layouts/application.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@
© 2014 Lead and Pledge


:javascript
$fb_app_id = '#{FACEBOOK_APP_ID}'
$stripe_key = "#{STRIPE[:publish]}";

= typekit_include_tag 'zdl6skz'
= javascript_include_tag "application"
= javascript_include_tag 'foundation'
Expand Down
3 changes: 3 additions & 0 deletions config/initializers/facebook.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
fb = Ladder::Application.config_for(:facebook)
FACEBOOK_APP_ID=fb[:id]
FACEBOOK_APP_SECRET=fb[:secret]

0 comments on commit 4b1b139

Please sign in to comment.