DG IZ; removed views and controller associated with friend object
This commit is contained in:
parent
ebfc55ff28
commit
3ff32e4905
8 changed files with 0 additions and 82 deletions
|
|
@ -1,39 +0,0 @@
|
||||||
class FriendsController < ApplicationController
|
|
||||||
before_filter :authenticate_user!
|
|
||||||
|
|
||||||
def index
|
|
||||||
@friends = Friend.paginate :page => params[:page], :order => 'created_at DESC'
|
|
||||||
end
|
|
||||||
|
|
||||||
def show
|
|
||||||
@friend = Friend.where(:id => params[:id]).first
|
|
||||||
@friend_profile = @friend.profile
|
|
||||||
@friend_posts = Post.where(:person_id => @friend.id).sort(:created_at.desc)
|
|
||||||
end
|
|
||||||
|
|
||||||
def destroy
|
|
||||||
@friend = Friend.where(:id => params[:id]).first
|
|
||||||
@friend.destroy
|
|
||||||
flash[:notice] = "Successfully destroyed friend."
|
|
||||||
redirect_to friends_url
|
|
||||||
end
|
|
||||||
|
|
||||||
def new
|
|
||||||
@friend = Friend.new
|
|
||||||
@profile = Profile.new
|
|
||||||
end
|
|
||||||
|
|
||||||
def create
|
|
||||||
|
|
||||||
puts params.inspect
|
|
||||||
@friend = Friend.new(params[:friend])
|
|
||||||
|
|
||||||
|
|
||||||
if @friend.save
|
|
||||||
flash[:notice] = "Successfully created friend."
|
|
||||||
redirect_to @friend
|
|
||||||
else
|
|
||||||
render :action => 'new'
|
|
||||||
end
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
= form_for @friend_request do |f|
|
|
||||||
= f.error_messages
|
|
||||||
|
|
||||||
%p
|
|
||||||
f.submit
|
|
||||||
|
|
@ -1,3 +0,0 @@
|
||||||
%li.message{:id => friend_request.id}
|
|
||||||
|
|
||||||
= friend_request.inspect
|
|
||||||
|
|
@ -1,4 +0,0 @@
|
||||||
= form_for @friend_request, :remote => true do |f|
|
|
||||||
= f.error_messages
|
|
||||||
%p
|
|
||||||
= f.submit
|
|
||||||
|
|
@ -1,8 +0,0 @@
|
||||||
- title "Edit Bookmark"
|
|
||||||
|
|
||||||
= render 'form'
|
|
||||||
|
|
||||||
%p
|
|
||||||
= link_to "Show", bookmark_path(@bookmark)
|
|
||||||
|
|
|
||||||
= link_to "View All", bookmarks_path
|
|
||||||
|
|
@ -1,7 +0,0 @@
|
||||||
%h1 friend requests
|
|
||||||
= render "friend_requests/new_friend_request", :friend_request => @friend_request
|
|
||||||
%ul#stream
|
|
||||||
- for friend_request in @friend_requests
|
|
||||||
= render "friend_request", :friend_request => friend_request
|
|
||||||
#pagination
|
|
||||||
= will_paginate @friend_requests
|
|
||||||
|
|
@ -1,5 +0,0 @@
|
||||||
- title "New Friend Request"
|
|
||||||
|
|
||||||
= render 'form'
|
|
||||||
|
|
||||||
%p= link_to "Back to List", friend_requests_path
|
|
||||||
|
|
@ -1,11 +0,0 @@
|
||||||
- title "Friend Request"
|
|
||||||
|
|
||||||
%p
|
|
||||||
= friend_request.inspect
|
|
||||||
|
|
||||||
%p
|
|
||||||
= link_to "Edit", edit_friend_request_path(@bookmark)
|
|
||||||
|
|
|
||||||
= link_to "Destroy", @friend_request, :confirm => 'Are you sure?', :method => :delete
|
|
||||||
|
|
|
||||||
= link_to "View All", friend_requests_path
|
|
||||||
Loading…
Reference in a new issue