Skip to content

Commit

Permalink
Merge branch 'main' into revert-webpacker-container
Browse files Browse the repository at this point in the history
  • Loading branch information
nabeta committed Aug 18, 2024
2 parents 6c9afe2 + e9e446c commit 108b0aa
Show file tree
Hide file tree
Showing 8 changed files with 40 additions and 57 deletions.
7 changes: 3 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" }
ruby "3.2.5"

# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main"
gem "rails", "~> 7.1.3"
gem "rails", "~> 7.1.3", ">= 7.1.3.4"

# The original asset pipeline for Rails [https://github.com/rails/sprockets-rails]
gem "sprockets-rails"
Expand All @@ -13,7 +13,7 @@ gem "sprockets-rails"
gem "pg", "~> 1.1"

# Use the Puma web server [https://github.com/puma/puma]
gem "puma", "~> 5.0"
gem "puma", ">= 5.0"

# Use JavaScript with ESM import maps [https://github.com/rails/importmap-rails]
# gem "importmap-rails"
Expand All @@ -28,7 +28,7 @@ gem "puma", "~> 5.0"
gem "jbuilder"

# Use Redis adapter to run Action Cable in production
gem "redis", "~> 4.0"
gem "redis", ">= 4.0.1"

# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis]
# gem "kredis"
Expand Down Expand Up @@ -68,7 +68,6 @@ group :test do
# Use system testing [https://guides.rubyonrails.org/testing.html#system-testing]
gem "capybara"
gem "selenium-webdriver"

end

gem 'devise'
Expand Down
13 changes: 8 additions & 5 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -301,7 +301,7 @@ GEM
psych (5.1.2)
stringio
public_suffix (6.0.1)
puma (5.6.8)
puma (6.4.2)
nio4r (~> 2.0)
pundit (2.3.2)
activesupport (>= 3.0.0)
Expand Down Expand Up @@ -371,7 +371,10 @@ GEM
rdf (~> 3.3)
rdoc (6.7.0)
psych (>= 4.0.0)
redis (4.8.1)
redis (5.2.0)
redis-client (>= 0.22.0)
redis-client (0.22.2)
connection_pool
regexp_parser (2.9.2)
reline (0.5.9)
io-console (~> 0.5)
Expand Down Expand Up @@ -557,15 +560,15 @@ DEPENDENCIES
pg (~> 1.1)
pretender
progress_bar
puma (~> 5.0)
puma (>= 5.0)
pundit
rails (~> 7.1.3)
rails (~> 7.1.3, >= 7.1.3.4)
rails-controller-testing
rails-i18n (~> 7.0)
rails_autolink
rdf-turtle
rdf-vocab
redis (~> 4.0)
redis (>= 4.0.1)
resync
rspec-rails
rspec_junit_formatter
Expand Down
2 changes: 1 addition & 1 deletion app/views/carrier_types/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
</div>
<div class="field">
<%= f.label t('page.file') -%>
<%= f.file_field :attachment -%>
<%= f.file_field :attachment, accept: 'image/*' -%>
</div>

<% if f.object.attachment.present? %>
Expand Down
2 changes: 1 addition & 1 deletion app/views/library_groups/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

<div class="field">
<%= f.label :header_logo -%><br />
<%= f.file_field :header_logo -%>
<%= f.file_field :header_logo, accept: 'image/*' -%>
<br />
<%= f.check_box :delete_header_logo -%>
<%= t('page.destroy') %>
Expand Down
21 changes: 21 additions & 0 deletions app/views/picture_files/_form.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
<%= form_with(model: picture_file) do |f| -%>
<%= error_messages(picture_file) -%>

<div class="field">
<%= f.label t('page.file') -%><br />
<%= f.file_field :attachment, accept: 'image/*', required: true -%>
</div>

<% if picture_file.attachment.attached? %>
<div class="field">
<%= render 'picture_files/link', picture_file: picture_file %>
</div>
<% end %>

<%= f.hidden_field :picture_attachable_id -%>
<%= f.hidden_field :picture_attachable_type -%>

<div class="actions">
<%= f.submit %>
</div>
<%- end -%>
19 changes: 1 addition & 18 deletions app/views/picture_files/edit.html.erb
Original file line number Diff line number Diff line change
@@ -1,24 +1,7 @@
<div id="content_detail" class="ui-corner-all ui-widget-content">
<h1 class="title"><%= t('page.editing', model: t('activerecord.models.picture_file')) -%></h1>
<div id="content_list">

<%= form_with(model: @picture_file) do |f| -%>
<%= error_messages(@picture_file) -%>

<div class="field">
<%= f.label t('page.file') -%><br />
<%= f.file_field :attachment -%>
</div>

<div class="field">
<%= render 'picture_files/link', picture_file: @picture_file %>
</div>

<div class="actions">
<%= f.submit %>
</div>
<%- end -%>

<%= render 'form', picture_file: @picture_file %>
</div>
</div>

Expand Down
27 changes: 3 additions & 24 deletions app/views/picture_files/new.html.erb
Original file line number Diff line number Diff line change
@@ -1,29 +1,8 @@
<div id="content_detail" class="ui-corner-all ui-widget-content">
<h1 class="title"><%= t('page.new', model: t('activerecord.models.picture_file')) -%></h1>
<div id="content_list">

<%= form_with(model: @picture_file) do |f| -%>
<% if @picture_file.errors.any? %>
<div id="error_explanation">
<ul>
<li><%= t('picture_file.invalid_file') %></li>
</ul>
</div>
<% end %>

<%= f.hidden_field :picture_attachable_id -%>
<%= f.hidden_field :picture_attachable_type -%>

<div class="field">
<%= f.label t('page.file') -%><br />
<%= f.file_field :attachment -%>
<h1 class="title"><%= t('page.new', model: t('activerecord.models.picture_file')) -%></h1>
<div id="content_list">
<%= render 'form', picture_file: @picture_file %>
</div>

<div class="actions">
<%= f.submit %>
</div>
<%- end -%>
</div>
</div>

<div id="submenu" class="ui-corner-all ui-widget-content">
Expand Down
6 changes: 2 additions & 4 deletions config/cable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,7 @@ development:
adapter: async

test:
adapter: async
adapter: test

production:
adapter: redis
url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
channel_prefix: enju_leaf_production
adapter: postgresql

0 comments on commit 108b0aa

Please sign in to comment.