Skip to content

Commit

Permalink
refs #94 Allow product specific version of task view.
Browse files Browse the repository at this point in the history
  • Loading branch information
volontarian committed Oct 28, 2015
1 parent bcd1e2b commit 68849e8
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion app/controllers/tasks_controller.rb
Expand Up @@ -12,12 +12,21 @@ def index
@story = Story.find(params[:story_id])
@project = @story.project
@tasks = @story.custom_tasks
@tasks = @tasks.paginate(page: params[:page], per_page: 1)
@tasks = @tasks.paginate(page: params[:page], per_page: 25)
@twitter_sidenav_level = 5
end

def show
@comments = @task.comments
@hide_sidebar = true

begin
raise NotImplementedError if @project.product_id.blank?

render "products/types/#{@project.product.class.name.split('Product::').last.tableize.singularize}/tasks/show"
rescue NotImplementedError, ActionView::MissingTemplate
render 'show'
end
end

def new
Expand Down

0 comments on commit 68849e8

Please sign in to comment.