Skip to content

Commit

Permalink
Merge pull request waynehoover#147 from ThinkNear/master
Browse files Browse the repository at this point in the history
add option to specify bucket in form helper
  • Loading branch information
waynehoover committed Feb 16, 2014
2 parents 156e5ab + 1cb32de commit a069078
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ Optionally, you can also place this template in the same view for the progress b
* `id:` Optional html id for the form, its recommended that you give the form an id so you can reference with the jQuery plugin.
* `class:` Optional html class for the form.
* `data:` Optional html data attribute hash.
* `bucket:` Optional (defaults to bucket used in config).

### Example with all options
```ruby
Expand Down
2 changes: 1 addition & 1 deletion lib/s3_direct_upload/form_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ def initialize(options)
@options = options.reverse_merge(
aws_access_key_id: S3DirectUpload.config.access_key_id,
aws_secret_access_key: S3DirectUpload.config.secret_access_key,
bucket: S3DirectUpload.config.bucket,
bucket: options[:bucket] || S3DirectUpload.config.bucket,
region: S3DirectUpload.config.region || "s3",
url: S3DirectUpload.config.url,
ssl: true,
Expand Down

0 comments on commit a069078

Please sign in to comment.