Dino

Joined

1,140 Experience
11 Lessons Completed
0 Questions Solved

Activity

Tim, you may need to register Rails globally inside webpack config. Than you will not need to import it inside every controller.

// config/webpack/environment.js

const { environment } = require('@rails/webpacker')
const webpack = require('webpack')

environment.plugins.prepend('Provide',
  new webpack.ProvidePlugin({
    Rails: ['@rails/ujs']
  })
)

module.exports = environment

Posted in Writing Tests for Rack Middleware Discussion

Chris, nice video! 
But one thing is missing here, on the large app with a lot of tests passing script_name to the paths is cumbersome, helper need to be extracted that enables you to write 
visit posts_url
instead of
visit posts_url(script_name...)

Posted in Code Review: Run Number Refactoring Discussion

Another option is to lock the table during the insert(make transaction as small as possible) act_as_seuenced gem approach.

Adding unique index with retry can behave wonky depending on the dataset size and number of concurrent transactions trying to insert. You could end up retrying to the infinity :)

Posted in My Development Environment Discussion

Hey, nice video :)

You didn't talk much about your hardware equipment, do you use MacBook Pro 13' or 15' ?

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.