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)
-
- (Boolean) has_completed_getting_started?
The user has completed all steps in getting started.
- - (Boolean) tag_followed?(tag_name)
- - (Object) tag_link(tag_name)
Instance Method Details
- (Boolean) has_completed_getting_started?
The user has completed all steps in getting started
7 8 9 |
# File 'app/helpers/getting_started_helper.rb', line 7 def has_completed_getting_started? current_user.getting_started == false end |
- (Boolean) tag_followed?(tag_name)
19 20 21 |
# File 'app/helpers/getting_started_helper.rb', line 19 def tag_followed?(tag_name) .detect{|t| t.name == tag_name} end |
- (Object) tag_link(tag_name)
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 |