Thank you to anyone who has already donated - your generous donations helped make three months of treatment possible.
My brother Nate continues to fight stage IV Hodgkin's lymphoma. He's just 31, with a wife and baby girl. They have no active income (since he's been unable to return to work), no insurance, and cannot afford the treatment he needs. Nate and his family need your help. Please consider a donation, every dollar helps. Thanks.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 |
<table class="profile" summary="Profile information"> <tr> <td class="main"> <h1><%= @user.name %></h1> <%= render 'follow_form' if user_signed_in? %> <% unless @user.posts.empty? %> <table class="posts" summary="User posts"> <%= render @posts %> # I heard that this passes the object to /posts/_post which </table> # allows the local var in post.content (its no defined anywhere else) <%= will_paginate @posts %> <% end %> </td> <td class="sidebar round"> <%= link_to avatar_for(@user), @user.avatar.url %><br /> <strong>Name</strong> <%= @user.name %><br /> <strong>URL</strong> <%= link_to user_path(@user), user_path(@user) %> <strong>Posts</strong> <%= @user.posts.count %> <%= render 'shared/stats' %> </td> </tr> </table> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 |
<tr> <td class="post"> <span class="title"><strong><%= link_to post.title, post %></strong></span><br /> <span class="image"><strong>Image: </strong><%= image_tag post.image_url.to_s %></span><br /> <span class="a_name"><strong>Artist: </strong><%= post.a_name %></span><br /> <span class="item_name"><strong>Title: </strong><%= post.item_name %></span><br /> <span class="a_twitter"><strong>Twitter: </strong><%= post.a_twitter %></span><br /> <span class="g_from"><strong>Gotten From: </strong><%= post.g_from %></span><br /> <span class="content"><strong>Plot: </strong><%= post.content %></span><br /> <%= render(:partial => 'users/like_form') if user_signed_in? %> <span class="timestamp"> Posted <%= time_ago_in_words(post.created_at) %> ago. </span> <a href="<%= likers_post_path(@post) %>">Likers</a><span id="likers"><br /> </span> </td> <% if current_user?(post.user)%> <td> <%= link_to "delete", post, :method => :delete, :confirm => "You sure?", :title => post.content %> </td> <%end%> </tr> |
1 2 3 4 5 6 7 8 9 10 |
<% unless current_user?(@user) %> <div id="like_form"> <% if current_user.likes?(@post) %> <%=render(:partial => 'users/unlike') %> <% else %> <%=render(:partial => 'users/unlike') %> <% end %> </div> <% end %> |
1 2 3 4 5 6 |
<%= form_for(current_user.appreciations.find_by_liked_id(@user), :html => {:method => :delete }, :remote => true) do |f| %> <div class="actions"><%= f.submit "Unlike" %></div> <% end %> |
1 2 3 4 5 6 7 |
<%= form_for(current_user.appreciations. build(:liked_id => @post.id), :remote => true) do |f| %> <div><%= f.hidden_field :liked_id %></div> <div class="actions"><%= f.submit "Like" %></div> <% end %> |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 |
end |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 |
end |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
end |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
|
1 2 3 4 5 6 7 8 9 |
belongs_to :user has_many :reverse_relationships, :dependent => :destroy, :foreign_key => "liked_id", :class_name => "Appreciations" has_many :likers, :through => :reverse_relationships, :source => :liker |
1 2 3 4 5 6 7 8 9 10 11 |
end |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
Gp2011::Application.routes.draw do match 'auth/:provider/callback' => 'authentications#create' resources :authentications devise_for :users, :controllers => {:registrations => 'registrations'} resources :posts do member do get :likers end end resources :relationships, :only => [:create, :destroy] resources :appreciations, :only => [:create, :destroy] root :to => "pages#home" match '/contact', :to => 'pages#contact' match '/about', :to => 'pages#about' match '/help', :to => 'pages#help' match '/blog', :to => 'pages#blog' resources :users do member do get :following, :followers, :likes end end |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
end |