sun-sword 0.0.8 → 0.0.9

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
  SHA256:
3
- metadata.gz: 57ff7c155c265ffc5fc09eeaf83bb95117fd84784be22e3848800b02698a1361
4
- data.tar.gz: f7b68f4db59ea7fe20e2ff23e4ac293d6abc1ccda395bd991141646b535672cd
3
+ metadata.gz: ac608a5b50200fae69d551c25b6abddc5355da222a1a8da739a7aba7c27fac03
4
+ data.tar.gz: 2d9fab48ea8cc5560198a23801e3424683b7a0c236df9b3b13a12bdde468cc29
5
5
  SHA512:
6
- metadata.gz: eecc700498bed3cecda88d6efb27314786c63e437f2cd25879ed1d9390bfd3d360eece0964f5e8c78b962042f9ab4a1043eacdedc58bc9b90ed136a6e3b70e38
7
- data.tar.gz: 21ca6c2fa65a0a2dff3b67ae8027ca0b5ec4b64595281347cc1c0f113155d4a871fdb8cbcbd59f1e520d00d3ebd26fd4467f8b70459f72212a5350461ee0bbdb
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 => "#{ENV['BASE_URL']}"
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
- <%%= link_to new_<%= [@route_scope_path, @scope_path.singularize].reject { |c| c.empty? }.join("_") %>_path do %>
13
- <button type="button" class="block class-button">Add <%= @subject_class %></button>
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"]]}%>.each do |title, attr_class| %>
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>
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module SunSword
4
- VERSION = '0.0.8'
4
+ VERSION = '0.0.9'
5
5
  public_constant :VERSION
6
6
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sun-sword
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - kotarominami