Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Use "options" instead of "hash" as argument name
"options" seems to be more descriptive in this case.
  • Loading branch information
dasch committed Aug 28, 2011
1 parent 827a0fe commit 45b9e0c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions actionpack/lib/action_dispatch/http/upload.rb
Expand Up @@ -3,11 +3,11 @@ module Http
class UploadedFile
attr_accessor :original_filename, :content_type, :tempfile, :headers

def initialize(hash)
@original_filename = encode_filename(hash[:filename])
@content_type = hash[:type]
@headers = hash[:head]
@tempfile = hash[:tempfile]
def initialize(options = {})
@original_filename = encode_filename(options[:filename])
@content_type = options[:type]
@headers = options[:head]
@tempfile = options[:tempfile]
raise(ArgumentError, ':tempfile is required') unless @tempfile
end

Expand Down

0 comments on commit 45b9e0c

Please sign in to comment.