[refs #194] fix accessible list
This commit is contained in:
parent
319fcdad86
commit
7cd3e40efc
|
@ -34,17 +34,16 @@ class IssuesController < ApplicationController
|
|||
end
|
||||
|
||||
def new
|
||||
@issue = Issue.new(:project => @project)
|
||||
@issue = @project.issues.new
|
||||
end
|
||||
|
||||
def create
|
||||
@user_id = params[:user_id]
|
||||
@user_uname = params[:user_uname]
|
||||
|
||||
@issue = Issue.new(params[:issue])
|
||||
@issue = @project.issues.new(params[:issue])
|
||||
@issue.creator_id = current_user.id
|
||||
@issue.user_id = @user_id
|
||||
@issue.project_id = @project.id
|
||||
|
||||
if @issue.save
|
||||
@issue.subscribe_creator(current_user.id)
|
||||
|
|
|
@ -23,7 +23,7 @@ class Issue < ActiveRecord::Base
|
|||
after_update :deliver_issue_assign_notification
|
||||
after_update :subscribe_issue_assigned_user
|
||||
|
||||
attr_accessible :labelings_attributes, :title, :body, :project, :project_id, :closed_at, :closed_by
|
||||
attr_accessible :labelings_attributes, :title, :body
|
||||
accepts_nested_attributes_for :labelings, :allow_destroy => true
|
||||
|
||||
scope :opened, where(:status => 'open', :closed_by => nil, :closed_at => nil)
|
||||
|
|
|
@ -16,5 +16,5 @@
|
|||
=tracker_search_field(:search_issue, t('layout.issues.search'))
|
||||
.bordered.nopadding
|
||||
%h3.bmargin10=t('layout.issues.new')
|
||||
= link_to t("layout.add"), new_project_issue_path(@project), :class => 'button' if can? :new, Issue.new(:project_id => @project.id)
|
||||
= link_to t("layout.add"), new_project_issue_path(@project), :class => 'button' if can? :new, @project.issues.new
|
||||
=render :partial => 'labels'
|
||||
|
|
Loading…
Reference in New Issue