Skip to content

Commit

Permalink
chore: Removed from turbo response as does not need to be there
Browse files Browse the repository at this point in the history
  • Loading branch information
joshsadam committed Jan 23, 2024
1 parent 1a20b43 commit 6e569a6
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 8 deletions.
5 changes: 2 additions & 3 deletions app/controllers/projects/samples_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,12 @@ def index

@q = load_samples.ransack(params[:q])
set_default_sort
@pagy, @samples = pagy(@q.result)
respond_to do |format|
format.html do
@has_samples = @q.result.count.positive?
end
format.turbo_stream do
@pagy, @samples = pagy(@q.result)
end
format.turbo_stream
end
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/projects/samples/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
</div>
<% end %>
<%= turbo_frame_tag "project_samples_sort_dropdown" %>
<%= turbo_frame_tag "metadata_fields_toggle" %>
<%= render MetadataFieldsToggleComponent.new(pagy_url_for(@pagy, @pagy.page).gsub(".turbo_stream", ""), params[:metadata].to_i == 1) %>
</div>
</div>
<%= turbo_frame_tag "project_samples_list",
Expand Down
4 changes: 0 additions & 4 deletions app/views/projects/samples/index.turbo_stream.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,6 @@
pagy: @pagy
} %>

<%= turbo_stream.update "metadata_fields_toggle" do %>
<%= render MetadataFieldsToggleComponent.new(pagy_url_for(@pagy, @pagy.page).gsub(".turbo_stream", ""), params[:metadata].to_i == 1) %>
<% end %>

<%= turbo_stream.update "project_samples_hidden_values" do %>
<%= render Ransack::HiddenSortFieldComponent.new(@q) %>
<%= hidden_field_tag "template", params[:template] %>
Expand Down

0 comments on commit 6e569a6

Please sign in to comment.