action_link 1.1.5 → 1.1.6
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:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 87ccffe4e257ac57fe56cfa39224f7efa3063f12d9059beb95ccf077cdb2d32f
|
|
4
|
+
data.tar.gz: a3af6adddd9a0fb2abd527692734dcf572f7e2aec93d03a1e59afdb277f6a9a5
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: c9c9feea903c594cd03977e819f6c41706b14529513567b3fde8e93250134717908d6398e64c061526df13a6dc1df286d4d0ad8fc00a3dff2eb5c7532151d7f7
|
|
7
|
+
data.tar.gz: dfe6eb37e120abae0d0e75544ecf7a3fbff08a81186ba6fb438e1bf120782843bffe5a53cf8b512506fd8875189b6d0d1e409eca3de100731daf137f1f2815a3
|
data/CHANGELOG.md
CHANGED
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
module ActionLink
|
|
4
|
+
# An action link that creates a record right away.
|
|
5
|
+
class Create < Base
|
|
6
|
+
ICON = 'plus-circle'
|
|
7
|
+
|
|
8
|
+
erb_template <<~ERB.gsub("\n", '')
|
|
9
|
+
<% if permission? %>
|
|
10
|
+
<%= link_to(url, **options) do %>
|
|
11
|
+
<%= content %>
|
|
12
|
+
<% if icon? %><%= ' ' %><%= icon_tag ::ActionLink::Create::ICON %><% end %>
|
|
13
|
+
<% end %>
|
|
14
|
+
<% else %>
|
|
15
|
+
<%= content %>
|
|
16
|
+
<% end %>
|
|
17
|
+
ERB
|
|
18
|
+
|
|
19
|
+
option :url
|
|
20
|
+
|
|
21
|
+
def http_method
|
|
22
|
+
:post
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
end
|
data/lib/action_link/engine.rb
CHANGED
|
@@ -39,6 +39,7 @@ module ActionLink
|
|
|
39
39
|
require_relative '../../app/components/action_link/application_component'
|
|
40
40
|
require_relative '../../app/components/action_link/base'
|
|
41
41
|
require_relative '../../app/components/action_link/custom'
|
|
42
|
+
require_relative '../../app/components/action_link/create'
|
|
42
43
|
require_relative '../../app/components/action_link/destroy'
|
|
43
44
|
require_relative '../../app/components/action_link/edit'
|
|
44
45
|
require_relative '../../app/components/action_link/new'
|
data/lib/action_link/version.rb
CHANGED
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: action_link
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 1.1.
|
|
4
|
+
version: 1.1.6
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- halo
|
|
@@ -91,6 +91,7 @@ files:
|
|
|
91
91
|
- app/assets/stylesheets/action_link/variables.scss
|
|
92
92
|
- app/components/action_link/application_component.rb
|
|
93
93
|
- app/components/action_link/base.rb
|
|
94
|
+
- app/components/action_link/create.rb
|
|
94
95
|
- app/components/action_link/custom.rb
|
|
95
96
|
- app/components/action_link/destroy.rb
|
|
96
97
|
- app/components/action_link/download.rb
|