rao-resources_controller 0.0.19.pre → 0.0.20.pre

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 6971e8f7410943ff27128f8d28a9b7ff829196959aca1d6de546763f5abbf444
4
- data.tar.gz: 613e3ecb7380ce692160dad41cd9471d5f33d79394d3a4a9459b9634e56d1503
3
+ metadata.gz: d8b24e64f50651b8f40503a327de474ae205eecd5dde8022023b4d0444f3572a
4
+ data.tar.gz: c038ab4f63071bbce826fdbcf74e5dc66d387c63e250c84159dc6ed241d7787e
5
5
  SHA512:
6
- metadata.gz: 828554b76ecc0061aa4fcfaabfe272e9016b88bd09b6c84491fa421b40036b6cfb1264467e0956793d4cb43d1b855bf01ca88c6f009947eebe8fa887f11682b6
7
- data.tar.gz: 5fa8ef7962f682feb5695b6363336e3174b35ff23b092a62c81e12291cb0a6480827163838ba886774c0d95f6215b7ea8b540c59468f3ca65f47b71e0b57a790
6
+ metadata.gz: fffbb39a441f766179e1f6f8bd4ea08761d2883fb00fbb7b556ed0978dfc0e76a2ad0725b68cbdd7cb24de2838c0d5b348a82b0547b79f98a69e8506840e7d3e
7
+ data.tar.gz: bee3484473909a8953ed7c14fb42966239551382d4982b34dc32cc10146e62587c1fe673d23b54be56c802e631b40095abed01206b48eaadd49881034130c0bb
@@ -0,0 +1,24 @@
1
+ module Rao
2
+ module ResourcesController
3
+ module Routing
4
+ # Example:
5
+ #
6
+ # Rails.application.routes.draw do
7
+ # resources :posts do
8
+ # acts_as_list
9
+ # end
10
+ # end
11
+ #
12
+ # This will give you:
13
+ #
14
+ # Prefix Verb URI Pattern
15
+ # reposition_post POST /posts/:id/reposition(.:format) posts#reposition
16
+ #
17
+ module ActsAsListConcern
18
+ def acts_as_list
19
+ post :reposition, on: :member
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,24 @@
1
+ module Rao
2
+ module ResourcesController
3
+ module Routing
4
+ # Example:
5
+ #
6
+ # Rails.application.routes.draw do
7
+ # resources :posts do
8
+ # acts_as_published
9
+ # end
10
+ # end
11
+ #
12
+ # This will give you:
13
+ #
14
+ # Prefix Verb URI Pattern
15
+ # toggle_published_post POST /posts/:id/toggle_published(.:format) posts#toggle_published
16
+ #
17
+ module ActsAsPublishedConcern
18
+ def acts_as_published
19
+ post :toggle_published, on: :member
20
+ end
21
+ end
22
+ end
23
+ end
24
+ end
@@ -0,0 +1,3 @@
1
+ ActionDispatch::Routing::Mapper.send(:include, Rao::ResourcesController::Routing::ActsAsListConcern)
2
+ ActionDispatch::Routing::Mapper.send(:include, Rao::ResourcesController::Routing::ActsAsPublishedConcern)
3
+
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rao-resources_controller
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.19.pre
4
+ version: 0.0.20.pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Roberto Vasquez Angel
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-04-15 00:00:00.000000000 Z
11
+ date: 2019-04-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -159,6 +159,8 @@ files:
159
159
  - app/concerns/rao/resources_controller/resources_concern.rb
160
160
  - app/concerns/rao/resources_controller/rest_actions_concern.rb
161
161
  - app/concerns/rao/resources_controller/rest_resource_urls_concern.rb
162
+ - app/concerns/rao/resources_controller/routing/acts_as_list_concern.rb
163
+ - app/concerns/rao/resources_controller/routing/acts_as_published_concern.rb
162
164
  - app/concerns/rao/resources_controller/sorting_concern.rb
163
165
  - app/concerns/rao/resources_controller/will_paginate_concern.rb
164
166
  - app/controllers/rao/resources_controller/base.rb
@@ -177,6 +179,7 @@ files:
177
179
  - app/views/rao/resources_controller/base/index.haml
178
180
  - app/views/rao/resources_controller/base/new.haml
179
181
  - app/views/rao/resources_controller/base/show.haml
182
+ - config/initializers/include_routing_concerns.rb
180
183
  - config/locales/de.yml
181
184
  - config/locales/en.yml
182
185
  - lib/generators/rao/resources_controller/install_generator.rb