Skip to content

Commit

Permalink
fix added for #64
Browse files Browse the repository at this point in the history
  • Loading branch information
rtdp committed Jun 15, 2012
1 parent 48cd71e commit 79ad95a
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions app/helpers/ideas_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@ def display_categories(idea)
end

def participate_button(idea)
participant = idea.users.include?(current_user) ? 'Leave' : 'Participate'
link_to participant, participate_idea_path(idea), :class => 'participate btn btn-info', :remote => true
if user_signed_in?
participant = idea.users.include?(current_user) ? 'Leave' : 'Participate'
link_to participant, participate_idea_path(idea), :class => 'participate btn btn-info', :remote => true
else
link_to 'Participate', participate_idea_path(idea), :class => 'participate btn btn-info', onclick: "alert('You need to login with twitter to participate.'); return false;"
end
end

def display_participants(idea)
Expand Down

0 comments on commit 79ad95a

Please sign in to comment.