You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -10,7 +10,7 @@ Plugin for ActiveAdmin. Provides batch Update and Delete for scoped_collection (
10
10
11
11
# Description
12
12
13
-
This gem give you ability to perform various batch actions on any filtered(or scoped) resource. Action applies to all elements across all pages. It is similar to ActiveAdmin batch action, but affects not only checked records. Usefull if you want to delete or update a lot of records in one click.
13
+
This gem give you ability to perform various batch actions on any filtered(or scoped) resource. Action applies to all records across all pages. It is similar to ActiveAdmin batch action, but affects not only checked records. Usefull if you want to delete or update a lot of records in one click.
14
14
15
15
# Install
16
16
@@ -108,7 +108,7 @@ ActiveAdmin.register Phone do
108
108
end
109
109
```
110
110
111
-
This simple code will create new button in sidebari "Erase date". After clicking on this button, user will see confirm message "Are you sure?". After confirming all filtered records will be updated.
111
+
This simple code will create new button "Erase date" in sidebar. After clicking this button, user will see confirm message "Are you sure?". After confirming all filtered records will be updated.
You can pass block to default actions update and delete.
151
-
And do custom redirect after it. Use render(location: 'somethin') instead of redirect_to().
151
+
And do custom redirect after it. Use render(location: 'something') instead of redirect_to().
152
152
153
153
This example renders form which allows to change "name" field. And after it do redirect to dashboard page.
154
154
@@ -178,7 +178,7 @@ Example:
178
178
179
179
### How can I modify modal dialog title?
180
180
181
-
Similar to button title. User option :confirm
181
+
Similar to button title. Use option :confirm
182
182
183
183
```ruby
184
184
scoped_collection_action :scoped_collection_destroy, confirm:'Delete all phones?'
@@ -200,7 +200,7 @@ Now in HTML page, you have button:
200
200
<buttonclass="my_popup"data="{"auth_token":"2a+KLu5u9McQENspCiep0DGZI6D09fCVXAN9inrwRG0=","batch_action":"my_pop_action","confirm":"Are you sure?"}">My pop action</button>
201
201
```
202
202
203
-
But without handler. Click on the button do nothing.
203
+
But without handler. Clicking on the button does nothing.
204
204
205
205
You can render form in any way you want.
206
206
It can be some popup(Fancybox, Simplemodal, etc.), or some inline collapsible form.
@@ -252,7 +252,7 @@ Example in JavaScript
252
252
253
253
We recommend to use Rails Flash messages.
254
254
255
-
Example with erasing phone diagonal. In this case you Phone-model has validation:
255
+
Example with updating phone diagonal attribute. In this case model Phone has validation:
256
256
257
257
```ruby
258
258
classPhone < ActiveRecord::Base
@@ -281,7 +281,7 @@ When you try to update diagonal with "5.6" you will see flash error:
281
281
Diagonal must be an integer.
282
282
```
283
283
284
-
But if you use you custom popup, you can show messages with JS.
284
+
But if you use your custom popup, you can show messages with JS.
0 commit comments