query.rb.patch

Yuki Kita, 2010-09-23 07:34

Download (1020 Bytes)

View differences:

app/models/query.rb (working copy)
196 196
    @available_filters["assigned_to_id"] = { :type => :list_optional, :order => 4, :values => user_values } unless user_values.empty?
197 197
    @available_filters["author_id"] = { :type => :list, :order => 5, :values => user_values } unless user_values.empty?
198 198

  
199
    group_values = Group.all.collect {|g| [g.name, g.id] }
199
    group_values = Group.all.collect {|g| [g.name, g.id.to_s] }
200 200
    @available_filters["member_of_group"] = { :type => :list_optional, :order => 6, :values => group_values } unless group_values.empty?
201 201

  
202
    role_values = Role.givable.collect {|r| [r.name, r.id] }
202
    role_values = Role.givable.collect {|r| [r.name, r.id.to_s] }
203 203
    @available_filters["assigned_to_role"] = { :type => :list_optional, :order => 7, :values => role_values } unless role_values.empty?
204 204
    
205 205
    if User.current.logged?