I have a code that performs an action if the user is Developer_External and another one if he is not, I am using this expression to know if he is:
@developerExternal = User.current.roles_for_project(@issue.project).include?(Role.find(:first, :conditions => "name='Developer_External'"))
But it returns this error:
Couldn't find all Roles with 'id': (first, {:conditions=>"name='Developer_External'"}) (found 0 results, but was looking for 2).
I have a code that performs an action if the user is Developer_External and another one if he is not, I am using this expression to know if he is: @developerExternal = User.current.roles_for_project(@issue.project).include?(Role.find(:first, :conditions => "name='Developer_External'"))
But it returns this error: Couldn't find all Roles with 'id': (first, {:conditions=>"name='Developer_External'"}) (found 0 results, but was looking for 2).
And I don't know what could be wrong