Browse Source

Remove required argument on prefix

Matt Scriven 8 năm trước cách đây
mục cha
commit
bf30a216d0
1 tập tin đã thay đổi với 1 bổ sung1 xóa
  1. 1 1
      lib/active_resource/disable_prefix_check.rb

+ 1 - 1
lib/active_resource/disable_prefix_check.rb

@@ -12,7 +12,7 @@ module DisablePrefixCheck
 
       init_prefix_explicit resource_type, resource_id
 
-      define_singleton_method :prefix do |options|
+      define_singleton_method :prefix do |options = {}|
         resource_type =  options[resource] if flexible
 
         options[resource_id].nil? ? "/admin/" : "/admin/#{resource_type}/#{options[resource_id]}/"