skinny_controllers 0.8.4 → 0.8.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/skinny_controllers.rb +12 -3
- data/lib/skinny_controllers/diet.rb +4 -1
- data/lib/skinny_controllers/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9b0181454422e1d041868f0d61e4c65076914e2d
|
4
|
+
data.tar.gz: af3fe1feec855b0a6f09dc25d83babd6bcde1c24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 447fa20f039f1b9bb828543abcbc4ce8c8bf15d54fb900e26a1aa4a038abc945a1cd40ccb7cd2eb6a99b08217c9f93a3a12073845e27e49bc532059ea6370af5
|
7
|
+
data.tar.gz: fed1e4926853cd29181b58a94d0d5127af63b8b9207d2212aeeb0fc52b4ea1521d4c1801a221fc398b8fb6de760d1a02eb75342fd1edfd32a3835b983b96e74e
|
data/lib/skinny_controllers.rb
CHANGED
@@ -70,15 +70,24 @@ module SkinnyControllers
|
|
70
70
|
# manipulated to fit the verb naming convention.
|
71
71
|
#
|
72
72
|
# @example POST controller#send_receipt will use 'SendReceipt' for the verb
|
73
|
+
#
|
74
|
+
# @note Deleting the action map will make the default CRUD operation classes be
|
75
|
+
# - Index
|
76
|
+
# - Show
|
77
|
+
# - Destroy
|
78
|
+
# - Create
|
79
|
+
# - Update
|
73
80
|
cattr_accessor :action_map do
|
74
81
|
{
|
82
|
+
# @note the only way default will get called, is if action_name is nil
|
75
83
|
'default'.freeze => DefaultVerbs::Read,
|
76
|
-
'
|
84
|
+
'show'.freeze => DefaultVerbs::Read,
|
85
|
+
'index'.freeze => DefaultVerbs::ReadAll,
|
77
86
|
'destroy'.freeze => DefaultVerbs::Delete,
|
78
87
|
# these two are redundant, as the action will be
|
79
88
|
# converted to a verb via inflection
|
80
|
-
'create'.freeze
|
81
|
-
'update'.freeze
|
89
|
+
'create'.freeze => DefaultVerbs::Create,
|
90
|
+
'update'.freeze => DefaultVerbs::Update
|
82
91
|
}
|
83
92
|
end
|
84
93
|
end
|
@@ -78,8 +78,11 @@ module SkinnyControllers
|
|
78
78
|
|
79
79
|
# action name is inherited from ActionController::Base
|
80
80
|
# http://www.rubydoc.info/docs/rails/2.3.8/ActionController%2FBase%3Aaction_name
|
81
|
+
|
81
82
|
def verb_for_action
|
82
|
-
SkinnyControllers.action_map[action_name] ||
|
83
|
+
SkinnyControllers.action_map[action_name] ||
|
84
|
+
(action_name && action_name.classify) ||
|
85
|
+
SkinnyControllers.action_map['default']
|
83
86
|
end
|
84
87
|
end
|
85
88
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: skinny_controllers
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- L. Preston Sego III
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-07-
|
11
|
+
date: 2016-07-04 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -234,6 +234,6 @@ rubyforge_project:
|
|
234
234
|
rubygems_version: 2.5.1
|
235
235
|
signing_key:
|
236
236
|
specification_version: 4
|
237
|
-
summary: SkinnyControllers-0.8.
|
237
|
+
summary: SkinnyControllers-0.8.5
|
238
238
|
test_files: []
|
239
239
|
has_rdoc:
|