Skip to content

Commit

Permalink
using entity_attribute nil instead
Browse files Browse the repository at this point in the history
  • Loading branch information
doublestranded committed Feb 10, 2017
1 parent 99ce17d commit b70aa41
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/entity_with_issues.rb
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class EntityWithIssues < ActiveRecord::Base
validate :entity_attribute_exists?

def entity_attribute_exists?
unless entity.attributes.include?(entity_attribute) || entity_attribute.empty?
unless entity.attributes.include?(entity_attribute) || entity_attribute.nil?
errors.add(:entity_attribute, "#{entity_attribute} does not exist")
end
end
Expand Down

0 comments on commit b70aa41

Please sign in to comment.