Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Partially addresses #97 by checking for a current user

  • Loading branch information...
commit 5127cf1424aab7665cb7b51db72bfb16595f7cbe 1 parent 0bbb073
August augustf authored
Showing with 3 additions and 2 deletions.
  1. +3 −2 app/controllers/groups_controller.rb
5 app/controllers/groups_controller.rb
View
@@ -15,8 +15,9 @@ def index
# GET /groups/1.xml
def show
@group = Group.find(params[:id])
- @membership = Membership.where(:group_id => @group.id, :user_id => current_user.id).first
-
+ if current_user
+ @membership = Membership.where(:group_id => @group.id, :user_id => current_user.id).first
+ end
respond_to do |format|
format.html # show.html.erb
format.xml { render :xml => @group }
Please sign in to comment.
Something went wrong with that request. Please try again.