This README would normally document whatever steps are necessary to get the application up and running.
Things you may want to cover:
-
Ruby version
-
System dependencies
-
Configuration
-
Database creation
-
Database initialization
-
How to run the test suite
-
Services (job queues, cache servers, search engines, etc.)
-
Deployment instructions
-
...
<% if post.created_at > 1.hour.ago %> <%= "[created " + time_ago_in_words(post.created_at) %> ago <%= post.created_at.strftime("[%m/%d/%Y (%I %M %P)]") %> <% else %> <%= post.created_at.strftime("[%m/%d/%Y (%I %M %P)]") %> <% end %>
<% if post.created_at > 1.hour.ago %> <%= time_ago_in_words(post.created_at) %> ago <%= post.created_at.strftime("[%H:%M | %m/%d/%Y]") %>
<% else %> <%= post.created_at.strftime("[%m/%d/%Y (%I %M %P)]") %> <% end %>
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
<%= javascript_importmap_tags %>
<%= notice %>
<%= alert %>
<%= yield %><body>
<header>
<main>
<p class="notice"><%= notice %></p>
<p class="alert"><%= alert %></p>
</header>
</main>
<%= yield %>
turbo_devise_controller.rb:
class TurboDeviseController < ApplicationController class Responder < ActionController::Responder def to_turbo_stream controller.render(options.merge(formats: :html)) rescue ActionView::MissingTemplate => e if get? raise e elsif has_errors? && default_action render rendering_options.merge(formats: :html, status: :unprocessable_entity) else redirect_to navigation_location end end end
self.responder = Responder
respond_to :html, :turbo_stream
end
appl:
<title>AdubbBlog</title> <%= csrf_meta_tags %> <%= csp_meta_tag %><%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
<link rel="stylesheet" href="https://cdn.simplecss.org/simple.min.css">
<%= javascript_importmap_tags %>
</header>
<%= yield %>
navbar: