sweet_actions 0.1.4 → 0.1.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/PITCHME.md +6 -3
- data/README.md +23 -1
- data/lib/generators/sweet_actions/templates/update_action.rb +5 -0
- data/lib/sweet_actions/create_action.rb +4 -0
- data/lib/sweet_actions/update_action.rb +5 -0
- data/lib/sweet_actions/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d876fa0a38c4362063893f5f103368cb66a0ef1
|
4
|
+
data.tar.gz: 76d1bcd450c832d38e708c34892ed17615efb569
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 549ae05b48cc2d281525898bfeaaa557a57399b41be1b42f6b944d29e948a2fdff43a1c1f32360740abbc112cc0ba05e0522433e52140cdba9c543b1b48fab59
|
7
|
+
data.tar.gz: 70ef12a7a56ea0b1a9651cfa9e67f54984cfe35a12f86c6d9a7de1768f51b31ee7900c69f512f4ad8d1a1b3ce6a85643cf95fcc500be79becc18c644ed27f47a
|
data/PITCHME.md
CHANGED
@@ -186,6 +186,7 @@ end
|
|
186
186
|
2. Generate resource (model, decanter, serializer, actions)
|
187
187
|
3. Add routes
|
188
188
|
|
189
|
+
Note: you may want to disable protect_from_forgery
|
189
190
|
---
|
190
191
|
|
191
192
|
## 1. Install Gem
|
@@ -200,6 +201,7 @@ Terminal:
|
|
200
201
|
|
201
202
|
```
|
202
203
|
bundle
|
204
|
+
bundle exec rails g sweet_actions:install
|
203
205
|
```
|
204
206
|
|
205
207
|
---
|
@@ -207,9 +209,10 @@ bundle
|
|
207
209
|
## 2. Generate Resource
|
208
210
|
|
209
211
|
```
|
210
|
-
rails g model Event
|
211
|
-
|
212
|
-
rails g
|
212
|
+
rails g model Event name:string start_date:date
|
213
|
+
bundle exec rake db:migrate
|
214
|
+
rails g decanter Event name:string start_date:date
|
215
|
+
rails g serializer Event name:string start_date:date
|
213
216
|
rails g actions Events
|
214
217
|
```
|
215
218
|
|
data/README.md
CHANGED
@@ -243,10 +243,14 @@ end
|
|
243
243
|
|
244
244
|
## Installation
|
245
245
|
|
246
|
+
### 1. Install Gem
|
247
|
+
|
246
248
|
Gemfile:
|
247
249
|
|
248
|
-
```
|
250
|
+
```ruby
|
249
251
|
gem 'sweet_actions'
|
252
|
+
gem 'active_model_serializers'
|
253
|
+
gem 'decanter'
|
250
254
|
```
|
251
255
|
|
252
256
|
Terminal:
|
@@ -254,4 +258,22 @@ Terminal:
|
|
254
258
|
```
|
255
259
|
bundle
|
256
260
|
bundle exec rails g sweet_actions:install
|
261
|
+
```
|
262
|
+
|
263
|
+
### 2. Generate Resource
|
264
|
+
|
265
|
+
```
|
266
|
+
rails g model Event title:name start_date:date
|
267
|
+
bundle exec rake db:migrate
|
268
|
+
rails g decanter Event title:name start_date:date
|
269
|
+
rails g serializer Event title:name start_date:date
|
270
|
+
rails g actions Events
|
271
|
+
```
|
272
|
+
|
273
|
+
### 3. Add Routes
|
274
|
+
|
275
|
+
```ruby
|
276
|
+
Rails.application.routes.draw do
|
277
|
+
create_sweet_actions(:events)
|
278
|
+
end
|
257
279
|
```
|