Module: GettingStartedHelper

Defined in:
app/helpers/getting_started_helper.rb

Overview

Copyright © 2010-2011, Diaspora Inc. This file is

licensed under the Affero General Public License version 3 or later.  See
the COPYRIGHT file.

Instance Method Summary collapse

Instance Method Details

#has_completed_getting_started?Boolean



7
8
9
# File 'app/helpers/getting_started_helper.rb', line 7

def has_completed_getting_started?
  current_user.getting_started == false
end

#tag_followed?(tag_name) ⇒ Boolean



19
20
21
# File 'app/helpers/getting_started_helper.rb', line 19

def tag_followed?(tag_name)
  tags.detect{|t| t.name == tag_name}
end


11
12
13
14
15
16
17
# File 'app/helpers/getting_started_helper.rb', line 11

def tag_link(tag_name)
  if tag_followed?(tag_name)
    link_to "##{tag_name}", tag_followings_path(tag_name), :method => :delete, :class => "featured_tag followed"
  else
    link_to "##{tag_name}", tag_tag_followings_path(tag_name), :method => :post, :class => "featured_tag"
  end
end