Skip to content

Commit

Permalink
Use modern Ruby style
Browse files Browse the repository at this point in the history
  • Loading branch information
dce committed Sep 13, 2017
1 parent 5ee777c commit f8633bd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/models/humanitarian_scope.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ class HumanitarianScope < ActiveRecord::Base
:code,
presence: true

validates :vocabulary_uri, :presence => {
:if => lambda do |scope|
validates :vocabulary_uri, presence: {
if: -> (scope) do
scope.humanitarian_scope_vocabulary &&
scope.humanitarian_scope_vocabulary.url.blank?
end
Expand Down

0 comments on commit f8633bd

Please sign in to comment.