This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class Cligest::DocumentsController < ApplicationController | |
| # ... | |
| def index | |
| @document_search = DocumentSearch.new(document_search_params) | |
| @documents = @document_search.perform | |
| # perhaps a few more initializations | |
| respond_to do |format| |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # build a form that posts a document (or whatever) and the form must have the starts_at and ends_at attributes | |
| # you might need to adjust the attributes | |
| @documents = Document.all | |
| # if we have the params | |
| @documents = @document.where(referenced_at: params[:document][:starts_at]..params[:document][:ends_at]) if ..... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <%= turbo_stream.update "panel" do %> | |
| <% if params[:position].to_i <= 5 %> | |
| <p>Less or equal to 5</p> | |
| <% else %> | |
| <p>more than 5</p> | |
| <% end %> | |
| <% end %> |
OlderNewer