README.md in lockbox-0.6.6 vs README.md in lockbox-0.6.7

- old
+ new

@@ -14,11 +14,11 @@ ## Installation Add this line to your application’s Gemfile: ```ruby -gem 'lockbox' +gem "lockbox" ``` ## Key Generation Generate a key @@ -85,10 +85,12 @@ class User < ApplicationRecord encrypts :email end ``` +**Note:** With Rails 7, use `lockbox_encrypts` instead of `encrypts` + You can use `email` just like any other attribute. ```ruby User.create!(email: "hi@example.org") ``` @@ -334,10 +336,12 @@ user = User.find(params[:id]) send_data user.license.download, type: user.license.content_type end ``` +Use `filename` to specify a filename or `disposition: "inline"` to show inline. + #### Migrating Existing Files Lockbox makes it easy to encrypt existing files without downtime. Add to your model: @@ -399,10 +403,12 @@ user = User.find(params[:id]) send_data user.license.read, type: user.license.content_type end ``` +Use `filename` to specify a filename or `disposition: "inline"` to show inline. + #### Migrating Existing Files Encrypt existing files without downtime. Create a new encrypted uploader: ```ruby @@ -474,10 +480,12 @@ lockbox = Lockbox.new(key: Lockbox.attribute_key(table: "users", attribute: "license")) send_data lockbox.decrypt(user.license.read), type: user.license.mime_type end ``` +Use `filename` to specify a filename or `disposition: "inline"` to show inline. + #### Non-Models Generate a key ```ruby @@ -709,10 +717,10 @@ ``` And add to your Gemfile: ```ruby -gem 'rbnacl' +gem "rbnacl" ``` Then add to your model: