hot-glue 0.5.15 → 0.5.17

Sign up to get free protection for your applications and to get access to all the features.
@@ -125,11 +125,11 @@ class <%= controller_class_name %> < <%= controller_descends_from %>
125
125
  }.join("/n") %><% end %><%= controller_attachment_orig_filename_pickup_syntax %>
126
126
  if @<%= singular_name %>.update(modified_params)
127
127
  <% if @display_list_after_update %> load_all_<%= plural %><% end %>
128
- flash[:notice] = (flash[:notice] || "") << "Saved #{@<%= singular %>.<%= display_class %>}"
128
+ flash[:notice] = "#{flash[:notice]} Saved \#{@<%= singular %>.<%= display_class %>}"
129
129
  flash[:alert] = @hawk_alarm if @hawk_alarm
130
130
  render :update
131
131
  else
132
- flash[:alert] = (flash[:alert] || "") << "<%= singular_name.titlecase %> could not be saved. #{@hawk_alarm}"
132
+ flash[:alert] = "#{flash[:notice]} <%= singular_name.titlecase %> could not be saved. #{@hawk_alarm}"
133
133
  render :update, status: :unprocessable_entity
134
134
  end
135
135
  end
@@ -6,7 +6,7 @@
6
6
 
7
7
  <h2>Editing <\%= @<%= @singular %>.<%= display_class %> %></h2>
8
8
  <\%= form_with model: <%= "@" + singular %>, url: <%= form_path_edit_helper %> do |f| %>
9
- <\%= render partial: "form", locals: {:<%= singular %> => <%= "@" + singular%>, f: f}<%= @nested_set.collect{|arg| ".merge(@#{arg[:singular]} ? {#{arg[:singular]}: @#{arg[:singular]}} : {})" }.join %> \%>
9
+ <\%= render partial: "<%= namespace_with_trailing_dash + @controller_build_folder + "/" %>form", locals: {:<%= singular %> => <%= "@" + singular%>, f: f}<%= @nested_set.collect{|arg| ".merge(@#{arg[:singular]} ? {#{arg[:singular]}: @#{arg[:singular]}} : {})" }.join %> \%>
10
10
  <\% end %>
11
11
  </div>
12
12
  <\% end %>
@@ -0,0 +1,3 @@
1
+ <ul class='nav nav-tabs'>
2
+
3
+ </ul>
@@ -91,7 +91,7 @@ describe 'interaction for <%= controller_class_name %>' do
91
91
  it "should destroy" do
92
92
  visit <%= path_helper_plural %>
93
93
  accept_alert do
94
- find("form[action='<%= namespace_with_dash %>/<%= plural %>/#{<%= singular %>1.id}'] > input.delete-<%= singular %>-button").click
94
+ find("form[action='<%= namespace_with_dash %>/<%= nested_path %><%= plural %>/#{<%= singular %>1.id}'] > input.delete-<%= singular %>-button").click
95
95
  end
96
96
  expect(page).to_not have_content(<%= singular %>1.<%= @display_class %>)
97
97
  expect(<%= singular_class %>.where(id: <%= singular %>1.id).count).to eq(0)
@@ -1,5 +1,5 @@
1
1
  module HotGlue
2
2
  class Version
3
- CURRENT = '0.5.15'
3
+ CURRENT = '0.5.17'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hot-glue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.15
4
+ version: 0.5.17
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jason Fleetwood-Boldt
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-08-11 00:00:00.000000000 Z
11
+ date: 2023-08-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -104,6 +104,7 @@ files:
104
104
  - lib/generators/hot_glue/layout_strategy/tailwind.rb
105
105
  - lib/generators/hot_glue/markup_templates/base.rb
106
106
  - lib/generators/hot_glue/markup_templates/erb.rb
107
+ - lib/generators/hot_glue/nav_template_generator.rb
107
108
  - lib/generators/hot_glue/scaffold_generator.rb
108
109
  - lib/generators/hot_glue/templates/base_controller.rb.erb
109
110
  - lib/generators/hot_glue/templates/capybara_login.rb
@@ -114,6 +115,7 @@ files:
114
115
  - lib/generators/hot_glue/templates/erb/_form.erb
115
116
  - lib/generators/hot_glue/templates/erb/_line.erb
116
117
  - lib/generators/hot_glue/templates/erb/_list.erb
118
+ - lib/generators/hot_glue/templates/erb/_nav.html.erb
117
119
  - lib/generators/hot_glue/templates/erb/_new_button.erb
118
120
  - lib/generators/hot_glue/templates/erb/_new_form.erb
119
121
  - lib/generators/hot_glue/templates/erb/_show.erb