We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed05c3c commit a6f2eceCopy full SHA for a6f2ece
lib/gon.rb
@@ -66,10 +66,8 @@ def set_variable(name, value)
66
if options.first.is_a? String
67
warn "[DEPRECATION] view_path argument is now optional. If you need to specify it please use #{builder}(:template => 'path')"
68
options = options.extract_options!.merge(:template => options[0])
69
- elsif options.first.is_a? Hash
70
- options = options ? options.first : { }
71
else
72
- raise ArgumentError.new("You pass wrong argument type to template generator method: #{options.first.class.to_s}")
+ options = (options && options.first.is_a?(Hash)) ? options.first : { }
73
end
74
75
builder_module = get_builder(builder_name)
0 commit comments