correctly validate name,filter in query

fixes #3404

validate the presence of name, filters using the rails3 way.
was: validate_presence_of :name
now: validate :name, presence: true
pull/954/head
Philipp Tessenow 11 years ago
parent 5641323e0d
commit ce2948aa51
  1. 4
      app/models/query.rb

@ -44,11 +44,11 @@ class Query < ActiveRecord::Base
attr_protected :project_id #, :user_id
validates_presence_of :name, on: :save
validates :name, presence: true
validates_length_of :name, :maximum => 255
validate :validate_work_package_filters
validates_presence_of :filters
validates :filters, presence: true
after_initialize :remember_project_scope

Loading…
Cancel
Save