Use "is_a?" because it is more readable than checking the "type" field.

This commit is contained in:
Adam Niedzielski 2016-08-09 17:45:22 +02:00
parent 23c1f9f4cd
commit 08ecf0e78e

View file

@ -80,7 +80,7 @@
= form_for member, remote: true do |f|
.prepend-top-10
= f.select :access_level, options_for_select(member.class.access_level_roles, member.access_level), {}, class: 'form-control'
- if member.type == 'ProjectMember'
- if member.is_a?(ProjectMember)
.prepend-top-10
= f.text_field :expires_at, class: 'form-control js-access-expiration-date', placeholder: 'Access expiration date', id: "member_expires_at_#{member.id}"
.prepend-top-10