David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
Ruby Rogues Panelist
David Kimura PRO said about 2 years ago on Easy Infrastructure :
If you're going the route of AWS, App Runner or Elastic Beanstalk may be considerations. There are episodes on both of those. If you do go the route of Beanstalk, set up your own database instead of provisioning one through the Beanstalk wizard. This will provide some separation of Beanstalk and your database if you ever decide to switch to something like App Runner, ECS or EKS.

For Digital Ocean, I am not comfortable enough with their App Platform yet. The last time I tried it, there were several issues around my project using esbuild instead of webpacker and couldn't successfully deploy. I've been monitoring their release notes page and haven't seen anything to indicate that this issue is fixed. 

It also greatly depends on your application needs. Do you need to have multiple regions and load balancing between multiple web services? 

David Kimura PRO said about 2 years ago on Hotwire Question and Answer Feature :
You can go that route for sure. Personally, I don't like the off chances that an answer could be updated for a different question by accident (if someone is changing the form values via inspect elements). 

David Kimura PRO said about 2 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 about 2 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 about 2 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')