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
| has_many :recent_events, :class_name => "TimelineEvent", | |
| :finder_sql => 'SELECT timeline_events.* FROM timeline_events | |
| WHERE ' + RECENT_EVENTS_CONDITION + ' | |
| ORDER BY timeline_events.created_at DESC' |
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
| RECENT_EVENTS_CONDITION = '(actor_type = \'User\' AND actor_id IN (SELECT followed_id FROM relationships WHERE follower_id = #{id}))' | |
| has_many :recent_events, :class_name => "TimelineEvent", | |
| :conditions => :filter_event, | |
| :finder_sql => 'SELECT timeline_events.* FROM timeline_events | |
| WHERE ' + RECENT_EVENTS_CONDITION + ' | |
| ORDER BY timeline_events.created_at DESC', | |
| :counter_sql => 'SELECT COUNT(*) FROM timeline_events | |
| WHERE ' + RECENT_EVENTS_CONDITION |
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
| >> User.first.recent_events | |
| => [#<TimelineEvent id: 124, event_type: "vote_updated", subject_type: "VideoVote", actor_type: "User", secondary_subject_type: "Video", subject_id: 639, actor_id: 58, secondary_subject_id: 506, created_at: "2011-05-05 08:56:07", updated_at: "2011-05-05 08:56:07">, |
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
| <%= current_user.profiles_shown_video.where("video_id = ?", params[:id]).each do |p| %> | |
| <ul> | |
| <li><%= p.user.name %></li> | |
| </ul> | |
| <% 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
| ActionController::RoutingError in Videos#feed_display | |
| Showing /rubyprograms/dreamstill/app/views/timeline_events/_video_added.html.erb where line #4 raised: | |
| No route matches {:action=>"show", :controller=>"videos"} | |
| 4: added <%= link_to "a song.", video_path(event.subject), :class => "normal squeeze" %></p> |
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
| has_many :videos, :through => :showable_videos | |
| has_many :videos |
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 create | |
| @signed_user = SignedUser.find_or_initialize_by_email(params[:signed_user][:email]) | |
| if @signed_user.new_record? | |
| if @signed_user.save | |
| #UserMailer.registration_confirmation(@signed_user).deliver | |
| redirect_to signed_user_path(@signed_user) | |
| else | |
| render :action => 'new' | |
| end | |
| else |
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 create | |
| @signed_user = SignedUser.find_or_initialize_by_email(params[:signed_user][:email]) | |
| if @signed_user.new_record? | |
| if @signed_user.save | |
| #UserMailer.registration_confirmation(@signed_user).deliver | |
| redirect_to signed_user_path(@signed_user) | |
| end | |
| else | |
| render :action => 'new' | |
| 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
| def create | |
| @signed_user = SignedUser.find_or_create_by_email(params[:signed_user][:email]) | |
| if @signed_user.save | |
| UserMailer.registration_confirmation(@signed_user).deliver | |
| redirect_to signed_user_path(@signed_user) | |
| else | |
| render :action => 'new' | |
| end | |
| 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
| AREL (0.4ms) INSERT INTO "invitations" ("updated_at", "sender_id", "invitation_url", "created_at") VALUES ('2011-05-01 10:35:33.346784', NULL, 'http://www.dreamstill.com/?id=', '2011-05-01 10:35:33.346784') | |
| AREL (0.1ms) INSERT INTO "signed_users" ("invitation_id", "updated_at", "link", "email", "created_at") VALUES (26, '2011-05-01 10:35:33.348869', '', '[email protected]', '2011-05-01 10:35:33.348869') | |
| AREL (0.1ms) UPDATE "invitations" SET "updated_at" = '2011-05-01 10:35:33.350287', "sender_id" = 273 WHERE "invitations"."id" = 26 | |
| Redirected to http://localhost:3000/signed_users/273 | |
| Completed 302 Found in 36ms |