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
| <script> | |
| FB.init({ | |
| appId : '<%= FACEBOOK_ID %>', | |
| status : true, // check login status | |
| cookie : true, // enable cookies to allow the server to access the session | |
| xfbml : true // parse XFBML | |
| }); | |
| </script> | |
| </body> | |
| </html> |
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
| initialize_with_facebook: -> | |
| #FB.init @facebook_settings | |
| FB.getLoginStatus (response) => | |
| exports.session = response.session | |
| @user = new User(response.session, @userCreatedCallback) |
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
| __hasProp = Object.prototype.hasOwnProperty, | |
| __extends = function(child, parent) { | |
| for (var key in parent) { | |
| if (__hasProp.call(parent, key)) | |
| child[key] = parent[key]; | |
| } | |
| function ctor() { | |
| this.constructor = child; | |
| } | |
| ctor.prototype = parent.prototype; |
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
| tr { | |
| th { | |
| .orange_table_header; | |
| } | |
| td:first-child{ | |
| width:10px; | |
| cursor: pointer; | |
| span.xfire_tooltip_body{ | |
| display: none; | |
| color: white; |
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
| # Replay of errors and other awesomeness | |
| gem 'better_errors' | |
| gem 'binding_of_caller' |
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
| <% cache(:action_suffix => "game_card.#{I18n.locale}", :expires_in => 1.hour) do %> | |
| <%= render :partial => 'game_card', :locals => { :game_product => @game.product } %> | |
| <% end %> |
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
| <% cache({:action_suffix => "game_card.#{I18n.locale}"}, :expires_in => 1.hour) do %> | |
| <%= render :partial => 'game_card', :locals => { :game_product => @game.product } %> | |
| <% end %> |
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
| Rails.cache.delete("views/#{fully_qualified_domain}/#{url}?action_suffix=#{whatever I named the suffix}&expires_in=3600") |
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
| class Photo < ActiveRecord::Base | |
| belongs_to :user | |
| has_many :notifications | |
| has_attached :picture | |
| after_create :notify_users | |
| def notified_users | |
| User.where("id in (?)", self.notifications.map(&:user_id)) |
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 Notifiable | |
| def self.included(klass) | |
| klass.has_many :notifications | |
| end | |
| def notified_users | |
| User.where("id in (?)", self.notifications.map(&:user_id) | |
| end | |
| end |
OlderNewer