Class: Workflow::User::ProjectsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/workflow/user/projects_controller.rb

Instance Method Summary collapse

Instance Method Details

#showObject



2
3
4
5
6
7
8
9
10
11
12
13
14
15
# File 'app/controllers/workflow/user/projects_controller.rb', line 2

def show
  @project = Project.friendly.find(params[:id])
  
  product = if @project.product 
    @project.product
  else
    value = ::Product.new
    value.id = 'no-name'
    value
  end
  
  @stories = product.stories_for_user(current_user).
  where(project_id: @project.try(:id)).paginate(page: params[:page])
end