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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8b24e64f50651b8f40503a327de474ae205eecd5dde8022023b4d0444f3572a
|
4
|
+
data.tar.gz: c038ab4f63071bbce826fdbcf74e5dc66d387c63e250c84159dc6ed241d7787e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
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.
|
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-
|
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
|