File tree 1 file changed +4
-4
lines changed 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -28,23 +28,23 @@ module ClassMethods
28
28
#
29
29
def version ( *args , &block )
30
30
if args . any?
31
- args . flatten!
32
31
options = args . extract_options!
33
32
options = options . reverse_merge ( using : :path )
33
+ requested_versions = args . flatten
34
34
35
35
raise Grape ::Exceptions ::MissingVendorOption . new if options [ :using ] == :header && !options . key? ( :vendor )
36
36
37
- @versions = versions | args
37
+ @versions = versions | requested_versions
38
38
39
39
if block_given?
40
40
within_namespace do
41
- namespace_inheritable ( :version , args )
41
+ namespace_inheritable ( :version , requested_versions )
42
42
namespace_inheritable ( :version_options , options )
43
43
44
44
instance_eval ( &block )
45
45
end
46
46
else
47
- namespace_inheritable ( :version , args )
47
+ namespace_inheritable ( :version , requested_versions )
48
48
namespace_inheritable ( :version_options , options )
49
49
end
50
50
end
You can’t perform that action at this time.
0 commit comments