Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
OutlawAndy committed Feb 10, 2023
1 parent 55aba37 commit ba3ecb5
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,20 @@ Turbo.setConfirmMethod(RoleModelConfirm.confirm)
RoleModelConfirm.init()
```

And then excersize it via button / link in an erb/slim template:

```RUBY
= button_to 'Delete ToDo', todo_path(todo),
class: 'btn btn--danger',
method: :delete,
data: { \
turbo_confirm: 'Are you sure?',
confirm_details: tag.h2('This action cannot be undone'),
}
```

HTML

### Configuration

RoleModel confirm is entirely configurable. Override default configuration by passing an object into `init()`.
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@rolemodel/turbo-confirm",
"type": "module",
"version": "0.1.2",
"version": "0.1.3",
"description": "Drop-in upgrade for Rails' data-turbo-confirm feature to support custom HTML dialogs.",
"main": "src/index.js",
"directories": {
Expand Down

0 comments on commit ba3ecb5

Please sign in to comment.