I think I found a bug in team_member.rb
In models/team_member.rb we have this:
# Cast roles to/from booleans ROLES.each do |role| define_method(:"#{role}=") { |value| super ActiveRecord::Type::Boolean.new.deserialize(value) } define_method(:"#{role}") { ActiveRecord::Type::Boolean.new.deserialize super() } define_method(:"#{role}?") { role == true } end
How can role? ever return something other than false? Unless you have a role named true ;-)
Shouldnt it be something like ?
define_method(:"#{role}?") { self.roles.fetch(role.to_s, false) }
Notifications
You’re not receiving notifications from this thread.