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
| Error: | |
| NoMethodError (You have a nil object when you didn't expect it! | |
| You might have expected an instance of Array. | |
| The error occurred while evaluating nil.[]): | |
| Code: | |
| @fb_friends = @graph.get_connections("me", "friends") | |
| @returned_friends = @fb_friends.select { |k,v| v["name"] == "#{params[:term]}" } |
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
| https://github.com/arsduo/koala |
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
| '((actor_type = \'User\' AND actor_id IN (SELECT followed_id FROM relationships WHERE follower_id = #{id})) AND ((secondary_subject_type = \'Video\' AND subject_type <> \'Profile\' AND secondary_subject_id NOT IN (SELECT id FROM videos WHERE user_id = #{id})) OR (secondary_subject_type = \'User\' AND secondary_subject_id <> #{id}) OR (secondary_subject_type = \'nil\') OR (subject_type = \'Profile\' AND secondary_subject_id NOT IN (SELECT id FROM videos WHERE user_id = #{id}) AND subject_id NOT IN (SELECT id FROM profiles WHERE user_id = #{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
| def read | |
| self.read = true if self.read == false | |
| 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
| belongs_to :actor, :polymorphic => true | |
| belongs_to :subject, :polymorphic => true | |
| belongs_to :secondary_subject, :polymorphic => true |
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
| def heard | |
| if params[:state] == 'yes' | |
| @heard = true | |
| elsif params[:state] == 'no' | |
| @heard = false | |
| end | |
| respond_to do |format| | |
| if ShowableVideo.find_by_id(params[:showable_video_id]).update_attributes(:heard => @heard) |
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
| http://stackoverflow.com/questions/6075910/why-is-rails-not-recognizing-that-i-want-an-ajax-request |
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
| 53: <div id="showable_video_div"> | |
| 54: <%= form_for [@video, @video.showable_videos.new ], :url => showable_videos_path, :remote => true do |f| %> | |
| 55: <%= f.hidden_field :video_id, :value => @video.id, :id => "video_id_field" %> | |
| 56: <%= f.text_field :user, :class => "showable_field" %> | |
| 57: <% end %> | |
| </div> |
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
| ActiveRecord::StatementInvalid in ProfilesController#fetch_fb_picture | |
| SQLite3::SQLException: unrecognized token: "'ÿØÿà": UPDATE "profiles" SET "photo_file_size" = 2634, "photo_file_name" = 'ÿØÿàJFIFÿþ;CREATOR: gd-jpeg v1.0 (using IJG JPEG v62), quality = 95 | |
| ÿÛC | |
| ÿÀ22"ÿÄ | |
| ÿĵ}!1AQa"q2‘¡#B±ÁRÑð$3br‚ | |
| %&''()*456789:CDEFGHIJSTUVWXYZcdefghijstuvwxyzƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚáâãäåæçèéêñòóôõö÷øùúÿÄ | |
| ÿĵw!1AQaq"2B‘¡±Á #3RðbrÑ | |
| $4á%ñ&''()*56789:CDEFGHIJSTUVWXYZcdefghijstuvwxyz‚ƒ„…†‡ˆ‰Š’“”•–—˜™š¢£¤¥¦§¨©ª²³´µ¶·¸¹ºÂÃÄÅÆÇÈÉÊÒÓÔÕÖרÙÚâãäåæçèéêòóôõö÷øùúÿÚ?øþ Íÿ‹øëÿµ¼ñ?…ì–ÇÃúEÀ³šúîê8ÄÅÇËs“´,vàm’q_l|ÿƒt~üøiçˆ><išv¥q¼¨\—ŽIZ-’Ĥ´LG™±Ð€Jƒ´îêy?ø!ÿÄ~øãƒ_üs¦ÇgkÅ«Á”j°],å—ƒ<R¼q§—µá&.To\6M¬ô[oŽ?|mñîâÂö]9d·’Ö7‚"bhe;™Cm…öœž¸çȬêÊ »ßNÞWü¶É2&#/…yA8ÛÞ¾÷½¼–§ó%ã_Ùßâ߆<o¬ø*o\Ïu¢xŽ=öh°P]̲´–ÎÜÈJÊ{„4²þÌŸá#Îð |
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
| @profile contains this: https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc4/157351_567412775_2309291_q.jpg | |
| r = open(@picture) | |
| image_data = r.read | |
| file_size = r.length | |
| mime_type = "image/jpeg" |