Content
You are here:
Unknown column 'roles.type' in 'where clause' in version 3
Added by Denis Lamotte almost 11 years ago
(Mysql2::Error: Unknown column ‘roles.type’ in ‘where clause’: SELECT `roles`.* FROM `roles` WHERE `roles`.`builtin` = 0 AND `roles`.`type` = ‘Role’ ORDER BY position):
<% roles = Role.find_all_givable %>
role.rb, no STI so this is strange :(
# Find all the roles that can be given to a project member
def self.find_all_givable
find(:all, :conditions => {:builtin => 0}, :order => ‘position’)
end
the schema.rb for role is:
create_table “roles”, :force => true do |t|
t.string “name”, :limit => 30, :default => “”, :null => false
t.integer “position”, :default => 1
t.boolean “assignable”, :default => true
t.integer “builtin”, :default => 0, :null => false
t.text “permissions”
end
Replies (1)
Answered in https://www.openproject.org/topics/275