Sha256: 1a7515107ac329ef5f57454a2fcb260dafe80e9cb499dce40944a275001cc9ba

Contents?: true

Size: 727 Bytes

Versions: 5

Compression:

Stored size: 727 Bytes

Contents

module BookytProjects
  module Navigation
    def setup_bookyt_projects(navigation)
      navigation.item :projects, t_model(Project), projects_path, :if => Proc.new { user_signed_in? } do |projects|
        projects.item :project_index, t_title(:index, Project), projects_path, :highlights_on => /\/projects($|\/[0-9]*($|\/.*))/
        projects.item :capture_hours, t_title(:new, Task), new_task_path
        projects.item :new_project, t_title(:new, Project), new_project_path
        projects.item :project_states, t_model(ProjectState), project_states_path, :highlights_on => /\/project_states($|\/([0-9]*|new)($|\/.*))/ 
      end
      navigation.item :capture_hours, t_title(:new, Task), new_task_path
    end
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
bookyt_projects-0.3.0 lib/bookyt_projects/navigation.rb
bookyt_projects-0.2.3 lib/bookyt_projects/navigation.rb
bookyt_projects-0.2.2 lib/bookyt_projects/navigation.rb
bookyt_projects-0.2.1 lib/bookyt_projects/navigation.rb
bookyt_projects-0.2.0 lib/bookyt_projects/navigation.rb