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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8f84b64c4077599bcc8a4e7a30006a66db0b0e30
4
- data.tar.gz: 67777c6f4970bd444ad38b19ddc7f87fd3003f18
3
+ metadata.gz: 9b0181454422e1d041868f0d61e4c65076914e2d
4
+ data.tar.gz: af3fe1feec855b0a6f09dc25d83babd6bcde1c24
5
5
  SHA512:
6
- metadata.gz: 41be3dc0c67883387b6d41d01ce1e4dcaaa8c7feab0cf0d664c0a1da45c0febc3f9674fb2625ef5da01fa717224b99e218585b74c670ce138c4860238cf4e58d
7
- data.tar.gz: 5113e604cbde77b1042d9177a516613bcb6e444465e425a42206d37a4aff1c6866dd17db70acc0c21993f5d7190ce1e16cdc3c00939b7d5ca5a40ba99a2b5225
6
+ metadata.gz: 447fa20f039f1b9bb828543abcbc4ce8c8bf15d54fb900e26a1aa4a038abc945a1cd40ccb7cd2eb6a99b08217c9f93a3a12073845e27e49bc532059ea6370af5
7
+ data.tar.gz: fed1e4926853cd29181b58a94d0d5127af63b8b9207d2212aeeb0fc52b4ea1521d4c1801a221fc398b8fb6de760d1a02eb75342fd1edfd32a3835b983b96e74e
@@ -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
- 'index'.freeze => DefaultVerbs::ReadAll,
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 => DefaultVerbs::Create,
81
- 'update'.freeze => DefaultVerbs::Update
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] || SkinnyControllers.action_map['default']
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
@@ -1,3 +1,3 @@
1
1
  module SkinnyControllers
2
- VERSION = '0.8.4'.freeze
2
+ VERSION = '0.8.5'.freeze
3
3
  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
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-01 00:00:00.000000000 Z
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.4
237
+ summary: SkinnyControllers-0.8.5
238
238
  test_files: []
239
239
  has_rdoc: