David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
David Kimura PRO said over 3 years ago on Gathering Questionnaire Responses :
  Kam kara  I chose json format since the structure and format of the responses are not a consistent structure. Basically, it makes it more simple to store the data. A questionnaire could have a few questions and then many answers or many questions and just a few answers each. If you were to create a table-based response, then you would need to almost mimic the structure of the questionnaire where you have a responses table which has many question_responses and the question responses has many answer_responses (since it could me multiple choice). Then you need to worry about the type of response for the answer where the some of them may be a boolean, string, or text and picking the correct type when storing the response. 

David Kimura PRO said over 3 years ago on search and filter data with stimulus :
  someone checkout the Shopping Cart episode where we use turbo frame tags to do this. https://www.driftingruby.com/episodes/shopping-cart-with-turbo

David Kimura PRO said over 3 years ago on Hotwire Question and Answer Feature :
The template is really geared to just set up some basic things. I have a repo https://github.com/driftingruby/template with the template that I use.

I also use a .railsrc file which will set a few defaults whenever I create a new Rails app.

# ~/.railsrc
--skip-jbuilder
--javascript esbuild
--css bootstrap

The basic devise install is another template that I have an alias for to apply to an existing template application.

gem 'devise'
run 'bundle install'
generate('devise:install')
generate(:devise, 'User')

environment 'config.action_mailer.default_url_options = { host: "localhost", port: 3000 }', env: 'development'

append_to_file 'app/views/layouts/_navigation_links.html.erb' do
  <<~'HEREDOC'

  <% if user_signed_in? %>
    <li class="nav-item me-4">
      <%= link_to "My Account", edit_user_registration_path, class: "nav-link" %>
    </li>
    <li class="nav-item me-4">
      <%= link_to "Sign Out", destroy_user_session_path, "data-turbo-method": :delete, class: "nav-link" %>
    </li>
  <% else %>
    <li class="nav-item me-4">
      <%= link_to "Sign In", new_user_session_path, class: 'nav-link' %>
    </li>
  <% end %>
  HEREDOC
end

rake 'db:migrate'

git add: '.'
git commit: %( -m 'added devise')

David Kimura PRO said over 3 years ago on esbuild for Rails :
  daijinara I think that the ERR_CACHE_READ_FAILURE is something about plugins or other tools on your system that is deleting the temp files. If you were to do a SHIFT + F5 (on windows) or CMD + SHIFT + R (on macos) then it should tell the browser to force download the files again and ignore your local cache.

There are some applications that will clear out temp files and your browser database did not get not of these changes.

  •  antivirus suites (Like Norton 360)
  • Dell SupportAssist
  • "Speed Optimization" apps like CleanMyMacX

I wonder if whatever thing that is causing your temp files to be cleared out is related to a long expiration life. Honestly, I don't know if there is anything to be done on the server side as this is getting served from CloudFlare's cache.

David Kimura PRO said over 3 years ago on Tailwind CSS :
While I agree that daisyUI may violate some of Tailwind CSS's philosophy, I think it's also important to ask if those principals really matter to me or the project. I recently deployed an application to production using Tailwind CSS and daisyUI and the amount sent over the wire is about 17kB. Uncompressed, it is about 90kB. I'm okay with this even if there is additional stuff that is being generated and never used. Honestly, I really don't care too much about the CSS minimalism stuff. I care more about application maintainability and consistency.

I've dabbled with Shuffle a bit, but I don't use it too often. It's great for getting quick things in a view, but also rather limited in the stuff that it provides. Perhaps it will get better in years to come.