sun-sword 0.0.8 → 0.0.9
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: ac608a5b50200fae69d551c25b6abddc5355da222a1a8da739a7aba7c27fac03
|
|
4
|
+
data.tar.gz: 2d9fab48ea8cc5560198a23801e3424683b7a0c236df9b3b13a12bdde468cc29
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1ad02d8c6f6f1f92e2244754dc4fee44d2073af1f071dcb96b67ced1625a432aa4e142b8f06139aef3f491b5b48fee1b7bb3d3f064827e5998b6cae54211958c
|
|
7
|
+
data.tar.gz: 400165a8e6d7df364e0ea8ab835cef59cdcdf4ed2b1e707d6084605f2c17df99c5e93b948b47668ee48264bf90ef979ee8e203e8ab3494a0d268722df1057a7f
|
|
@@ -102,7 +102,7 @@ module SunSword
|
|
|
102
102
|
template 'controllers/application_controller.rb.tt', File.join('app/controllers/application_controller.rb')
|
|
103
103
|
site_route = <<-RUBY
|
|
104
104
|
|
|
105
|
-
default_url_options :host => "
|
|
105
|
+
default_url_options :host => "ENV['BASE_URL']"
|
|
106
106
|
root "site#stimulus"
|
|
107
107
|
get "site/jadi_a"
|
|
108
108
|
get "site/jadi_b"
|
|
@@ -104,9 +104,9 @@ class <%= [@route_scope_class, @scope_class].reject { |c| c.empty? }.join("::")
|
|
|
104
104
|
def set_<%= @variable_subject %>
|
|
105
105
|
<% if @resource_owner_id.present? -%>
|
|
106
106
|
@<%= @variable_subject %> = <%= @model_class %>.find_by(id: params[:id], <%=@resource_owner_id%>: <%=@resource_owner_id%>)
|
|
107
|
-
<%else
|
|
107
|
+
<%else -%>
|
|
108
108
|
@<%= @variable_subject %> = <%= @model_class %>.find_by(id: params[:id])
|
|
109
|
-
<%end
|
|
109
|
+
<%end -%>
|
|
110
110
|
redirect_to <%= [@route_scope_path, @scope_path].reject { |c| c.empty? }.join("_") %>_url, error: '<%= @subject_class %> not found.' if @<%= @variable_subject %>.nil?
|
|
111
111
|
end
|
|
112
112
|
|
|
@@ -9,8 +9,10 @@
|
|
|
9
9
|
<p class="mt-2 text-sm text-gray-700">A list of all the <%= @subject_class %>.</p>
|
|
10
10
|
</div>
|
|
11
11
|
<div class="mt-4 sm:ml-16 sm:mt-0 sm:flex-none">
|
|
12
|
-
|
|
13
|
-
|
|
12
|
+
<%% if Rails.application.routes.url_helpers.respond_to?(:new_<%= [@route_scope_path, @scope_path.singularize].reject { |c| c.empty? }.join("_") %>_path) %>
|
|
13
|
+
<%%= link_to new_<%= [@route_scope_path, @scope_path.singularize].reject { |c| c.empty? }.join("_") %>_path do %>
|
|
14
|
+
<button type="button" class="block class-button">Add <%= @subject_class %></button>
|
|
15
|
+
<%% end %>
|
|
14
16
|
<%% end %>
|
|
15
17
|
</div>
|
|
16
18
|
</div>
|
|
@@ -19,7 +21,7 @@
|
|
|
19
21
|
<table class="min-w-full divide-y divide-gray-300">
|
|
20
22
|
<thead>
|
|
21
23
|
<tr>
|
|
22
|
-
<%% <%= @controllers.list_fields.map { |tc| [tc.titleize.to_s, ''] + [["Action", "text-center"]]
|
|
24
|
+
<%% <%= @controllers.list_fields.map { |tc| [tc.titleize.to_s, '']} + [["Action", "text-center"]]%>.each do |title, attr_class| %>
|
|
23
25
|
<th scope="col" class="class-tr attr-class"><%%= title %></th>
|
|
24
26
|
<%% end %>
|
|
25
27
|
</th>
|
data/lib/sun_sword/version.rb
CHANGED