Module: ProjectsHelper

Included in:
ApplicationController
Defined in:
app/helpers/projects_helper.rb

Overview

A controller include, need to split out session methods versus those that aren't

Instance Method Summary (collapse)

Instance Method Details



15
16
17
18
19
20
21
# File 'app/helpers/projects_helper.rb', line 15

def project_link(project)
  return nil if project.nil?
  l = link_to(project.name, select_project_path(project))
  project.id == sessions_current_project_id ?
    (:mark, l) :
    l
end

- (Object) project_tag(project)



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

def project_tag(project)
  return nil if project.nil?
  project.name
end

- (Object) projects_list(projects)



23
24
25
# File 'app/helpers/projects_helper.rb', line 23

def projects_list(projects)
  projects.collect { |p| (:li, project_link(p)) }.join.html_safe
end

- (Object) projects_search_form



11
12
13
# File 'app/helpers/projects_helper.rb', line 11

def projects_search_form
  render('/projects/quick_search_form')
end