Use new requires_attribute method in poll

This commit is contained in:
Martin Lensment 2015-01-27 15:34:01 +02:00
parent 857ab488b8
commit 365e27086f
5 changed files with 5 additions and 10 deletions

View file

@ -38,9 +38,6 @@ class Epp::PollsController < EppController
private
def validate_poll
op = params[:parsed_frame].css('poll').first[:op]
return true if %w(ack req).include?(op)
epp_errors << { code: '2306', msg: I18n.t('errors.messages.attribute_op_is_invalid') }
false
requires_attribute 'poll', 'op', values: %(ack req)
end
end