mirror of
https://github.com/anteo/redmine_custom_workflows.git
synced 2026-01-26 00:04:20 +00:00
NameError: uninitialized constant #122
This commit is contained in:
parent
bf014a4b23
commit
1ba81a33a2
@ -50,7 +50,7 @@ class CustomWorkflowsController < ApplicationController
|
||||
end
|
||||
|
||||
def index
|
||||
@workflows = CustomWorkflow.includes(:projects).all
|
||||
@workflows = CustomWorkflow.includes(:projects).order(:position => :asc)
|
||||
respond_to do |format|
|
||||
format.html
|
||||
end
|
||||
|
||||
@ -33,8 +33,7 @@ class CustomWorkflow < ActiveRecord::Base
|
||||
validates_uniqueness_of :name, :case_sensitive => false
|
||||
validates_format_of :author, :with => /\A([^@\s]+)@((?:[-a-z0-9]+\.)+[a-z]{2,})\z/i, :allow_blank => true
|
||||
validate :validate_syntax, :validate_scripts_presence, :if => Proc.new {|workflow| workflow.respond_to?(:observable) and workflow.active?}
|
||||
|
||||
default_scope { order(:position => :asc) }
|
||||
|
||||
scope :active, lambda { where(:active => true) }
|
||||
scope :for_project, (lambda do |project|
|
||||
where("is_for_all=? OR EXISTS (SELECT * FROM #{reflect_on_association(:projects).join_table} WHERE project_id=? AND custom_workflow_id=id)",
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user