Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions lib/proffer.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand All @@ -31,8 +32,11 @@ def self.included(base)
# proffer :model => Model.new
# # => render ..., :locals => { :model => Model.new }
#
# proffer
# # => { :model => #<Model#123534234234 > }
#
# Returns nothing.
def proffer(variables)
def proffer(variables = {})
proffered.merge!(variables)
end

Expand Down