diff --git a/lib/proffer.rb b/lib/proffer.rb index 645b981..3dd38fa 100644 --- a/lib/proffer.rb +++ b/lib/proffer.rb @@ -21,7 +21,8 @@ def self.included(base) base.hide_action :proffer, :proffered end - # Public: Make the given values available to the view as local variables. + # Public: Make the given values available to the view as local variables or + # (if no arguments given) dumps the view assignment hash # # variables - The Hash of values keyed by the local variable name to be used # in the view. @@ -31,8 +32,11 @@ def self.included(base) # proffer :model => Model.new # # => render ..., :locals => { :model => Model.new } # + # proffer + # # => { :model => # } + # # Returns nothing. - def proffer(variables) + def proffer(variables = {}) proffered.merge!(variables) end