Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: SeanRoberts/kick-a-pubby
base: dd75f2aa80
...
head fork: SeanRoberts/kick-a-pubby
compare: a5eb6e2960
  • 2 commits
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 4 additions and 5 deletions.
  1. +4 −5 app/controllers/friends_controller.rb
View
9 app/controllers/friends_controller.rb
@@ -13,7 +13,7 @@ def update
@friend = current_user.friend(params[:id])
if @friend.update_attributes(params[:friend])
flash[:notice] = "Friend updated!"
- redirect_to edit_friend_path(@friend)
+ redirect_to friends_path
else
render action: :edit
end
@@ -23,7 +23,7 @@ def create
@friend = current_user.add_friend(params[:friend])
if @friend.valid?
flash[:notice] = "Welcome to the friend zone!"
- redirect_to edit_friend_path(@friend)
+ redirect_to friends_path
else
render action: :new
end
@@ -32,8 +32,7 @@ def create
def destroy
@friend = current_user.friend(params[:id])
@friend.destroy
- flash[:notice] = "Sorry it didn't work out."
+ flash[:notice] = "Sorry it didn't work out with #{@friend.name}."
redirect_to friends_path
end
-
-end
+end

No commit comments for this range

Something went wrong with that request. Please try again.