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
| >> rand(20..30) | |
| TypeError: can't convert Range into Integer | |
| from (irb):6:in `rand' | |
| from (irb):6 | |
| from :0 |
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 SignedUsersHelper | |
| def create_invitation(user) | |
| @invitation_url = "http://dreamstill.com/?id=" + rand(10000000000).to_s | |
| user.invitation.create(:invitation_url => @invitation_url) | |
| 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
| before_create :generate_url | |
| def generate_url | |
| self.invitation_url = "http://www.dreamstill.com/?id=" + self.sender_id.to_s | |
| 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 |
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
| 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_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
| 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
| 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
| <%= current_user.profiles_shown_video.where("video_id = ?", params[:id]).each do |p| %> | |
| <ul> | |
| <li><%= p.user.name %></li> | |
| </ul> | |
| <% end %> |