@@ -16582,4 +16582,65 @@ Close this window: Use ":q<Enter>".[7;37H[K[8;3H Get out of Vim: Use ":qa!<
1658216582 <h1><%= @user.username.humanize %></h1>
1658316583 <p><%= link_to @user.link, @user.link %></p>
1658416584 <p><%= @user.about %></p>
16585- <% unless @user == current_user %>[8;6H <% if current_user.watches.include? @user %>[9;8H <%= link_to "Stop watching #{@user.username}", watching_path(current_user.watchings.detect(@user).first), :mm[10;1Heth
16585+ <% unless @user == current_user %>[8;6H <% if current_user.watches.include? @user %>[9;8H <%= link_to "Stop watching #{@user.username}", watching_path(current_user.watchings.detect(@user).first), :mm[10;1Hethod => :delete %>[11;6H <% else %>[12;8H <%= link_to "Watch #{@user.username}", watchings_path(:watches_id => @user), :method => :post %>[13;6H <% end %>
16586+ <% else %>[15;6H <br />
16587+ <% end %>
16588+ </div>
16589+ </div>
16590+ <br />
16591+ <br />
16592+ <hr style="width:550px;" />
16593+ <div>
16594+ <p><%= @user.username.humanize %>'s programs:</p><br />
16595+ <ul>
16596+ <% @user.programs.each do |program| %>
16597+ <li><%= link_to program.name, program %> - <%= program.description %></li>
16598+ <% end %>
16599+ </ul>
16600+ <% if @user == current_user %>
16601+ <br style="clear:both" />
16602+ <%= link_to "Make a new program", new_program_path %>
16603+ <% end %>
16604+ </div>
16605+ <br style="clear:both" />
16606+ <hr style="width:550px;" />
16607+ <div>
16608+ <p><%= @user.username.humanize %> is watching:</p><br />
16609+ <% @user.watches.each_with_index do |watch, i| %>
16610+ <%= "<div>" if i % 6 == 0 %><%= link_to image_tag(watch.avatar_url, :style => "margin-right:1em;margin-bottom:1em;;[40;1H"), user_path(watch.username) %> <%= "</div>" if i % 6 == 5 %>
16611+ <% end %>
16612+ </div>
16613+ <%= "</div>" if @user.watches.count % 6 != 0 %>
16614+ [1m[34m~ [45;1H~ [46;1H~ [47;1H~ [48;1H~ [49;1H~ [50;1H~ [51;1H~ [52;1H~ [53;1H~ [54;1H~ [55;1H~ [0m[56;99H29,3[10CAll[30;3H[34h[?25h[?25l[56;99H[K[56;1H:[34h[?25hw[?25l[34h[?25hq[?25l[34h[?25h[?25l"app/views/users/show.html.erb" 41L, 1530C written
16615+ [?1l>[34h[?25h[?1049l]0;steve@deadreckoning:~/src/hackety-hack.com[steve@deadreckoning hackety-hack.com]$ git add .
16616+ ]0;steve@deadreckoning:~/src/hackety-hack.com[steve@deadreckoning hackety-hack.com]$ git commit -m "added delete programs"
16617+ [master 5e149b9] added delete programs
16618+ 6 files changed, 258 insertions(+), 31 deletions(-)
16619+ rewrite app/views/programs/edit.html.erb (75%)
16620+ ]0;steve@deadreckoning:~/src/hackety-hack.com[steve@deadreckoning hackety-hack.com]$ vim app/views/use[K[K[Kme[K[K[K[K[K[K[K[Kcontrollers/messages_controller.rb
16621+ [?1049h[?1h=[1;56r[34l[34h[?25h[23m[24m[0m[H[J[?25l[56;1H"app/controllers/messages_controller.rb" 47L, 930C[1;1Hclass MessagesController < ApplicationController
16622+ def index
16623+ @messages = Message.find(:all, :conditions => ["recipient_id == ?", current_user.id])
16624+ end
16625+
16626+ def show
16627+ @message = Message.find(params[:id])
16628+ end
16629+
16630+ def new
16631+ @message = Message.new
16632+ end
16633+
16634+ def edit
16635+ @message = Message.find(params[:id])
16636+ end
16637+
16638+ def create
16639+ @message = Message.new(params[:message])
16640+ @message.sender = current_user[22;4H if @message.save[23;6H flash[:notice] = 'Message was successfully created.'[24;6H redirect_to user_path(@message.recipient)
16641+ else[26;6H render :action => "new"
16642+ end
16643+ end
16644+
16645+ def update
16646+ @message = Message.find(params[:id])[33;4H if @messa
0 commit comments