effective_resources 1.4.10 → 1.4.11

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: aabe6bb10943b7f4fd917281fc6ef5899b40df909f4d3030353fcad02dffcdb9
4
- data.tar.gz: e74f56ac701875012fdc23768a1897ab4d2799f5ea2f2e623c44d8b222f458de
3
+ metadata.gz: 32323055f3cf20452972cf11e64f696a64eb240bee54990e71a41a0179db8ce8
4
+ data.tar.gz: 0f3612b1b220e6011c2d7094be638886a6689ab8273555cefc94552afb285361
5
5
  SHA512:
6
- metadata.gz: 18e727245b1522a36e61dc1f139d463d97503110d437a6b9f00e98bfed75c1d0370e3a12d085d510e579479ef912dc6b565efc24aa2176a8b95a546020752f63
7
- data.tar.gz: 0161a561455a9417aac613797a666b36226154ac1c2c363e209bb4f9fbda639ffdeb4d06d87e8edf30807f025cb024f3856f2d45ff0657ee030bbb8fe363ef0e
6
+ metadata.gz: a8b4bfa9a2a682de256222b9e2961be1ba178f44731acba3860e41cd7a030dea93bcc920b863351335f35f05ab473ef613982c4182319e42b73fe9b699e43854
7
+ data.tar.gz: 939a5f4e51b5865c4d70c0627edd747c0d2c7c5477d97b9b75ee05e60b3a0a3b304c6890892898302e70d96e860a4e986e3ebe53ff60f8817c3a68a4d5fee88c
@@ -79,54 +79,6 @@ module Effective
79
79
  end
80
80
  end
81
81
 
82
- # def respond_with_error(resource, action)
83
- # return if response.body.present?
84
-
85
- # flash.delete(:success)
86
- # flash.now[:danger] ||= resource_flash(:danger, resource, action)
87
-
88
- # respond_to do |format|
89
- # case action.to_sym
90
- # when :create
91
- # format.html { render :new }
92
- # when :update
93
- # format.html { render :edit }
94
- # when :destroy
95
- # format.html do
96
- # redirect_flash
97
- # redirect_to(resource_redirect_path(action))
98
- # end
99
- # else # member action
100
- # from_path = referer_redirect_path.to_s
101
-
102
- # format.html do
103
- # if resource_edit_path && from_path.end_with?(resource_edit_path)
104
- # @page_title ||= "Edit #{resource}"
105
- # render :edit
106
- # elsif resource_new_path && from_path.end_with?(resource_new_path)
107
- # @page_title ||= "New #{resource_name.titleize}"
108
- # render :new
109
- # elsif resource_action_path(action) && from_path.end_with?(resource_action_path(action)) && template_present?(action)
110
- # @page_title ||= "#{action.to_s.titleize} #{resource}"
111
- # render(action, locals: { action: action })
112
- # elsif resource_show_path && from_path.end_with?(resource_show_path)
113
- # @page_title ||= resource_name.titleize
114
- # render :show
115
- # else
116
- # @page_title ||= resource.to_s
117
- # redirect_flash
118
- # redirect_to(from_path.presence || resource_redirect_path(action))
119
- # end
120
- # end
121
- # end
122
-
123
- # format.js do
124
- # view = template_present?(action) ? action : :member_action
125
- # render(view, locals: { action: action }) # action.js.erb
126
- # end
127
- # end
128
- # end
129
-
130
82
  private
131
83
 
132
84
  def redirect_flash
@@ -4,7 +4,9 @@ module Effective
4
4
 
5
5
  # Based on the incoming params[:commit] or passed action. Merges all options.
6
6
  def commit_action(action = nil)
7
- config = (['create', 'update'].include?(params[:action]) ? self.class.submits : self.class.buttons)
7
+ #config = (['create', 'update'].include?(params[:action]) ? self.class.submits : self.class.buttons)
8
+
9
+ config = self.class.submits
8
10
  ons = self.class.ons
9
11
 
10
12
  commit = config[params[:commit].to_s]
@@ -9,7 +9,7 @@ module ActsAsStatused
9
9
  extend ActiveSupport::Concern
10
10
 
11
11
  module Base
12
- # acts_as_statuses :pending, :approved, :declined, option_key: :option_value
12
+ # acts_as_statused :pending, :approved, :declined, option_key: :option_value
13
13
  def acts_as_statused(*args)
14
14
  options = args.extract_options!
15
15
  statuses = Array(args).compact
@@ -1,3 +1,3 @@
1
1
  module EffectiveResources
2
- VERSION = '1.4.10'.freeze
2
+ VERSION = '1.4.11'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_resources
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.10
4
+ version: 1.4.11
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-04-17 00:00:00.000000000 Z
11
+ date: 2020-05-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails