Skip to content

Commit 0ff858a

Browse files
author
Lester Celestial
committed
added Kyle S. Goodwin's fix from http://git.io/3zGd-Q
1 parent 8c8794c commit 0ff858a

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

lib/grape/api.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -386,6 +386,7 @@ def nest(*blocks, &block)
386386
instance_eval &block if block_given?
387387
blocks.each{|b| instance_eval &b}
388388
settings.pop # when finished, we pop the context
389+
reset_validations!
389390
else
390391
instance_eval &block
391392
end

spec/grape/validations/presence_spec.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ class API < Grape::API
88
default_format :json
99

1010
resource :bacons do
11-
get "/" do
11+
get do
1212
"All the bacon"
1313
end
1414
end

0 commit comments

Comments
 (0)