Dino

Joined

7,450 Experience
74 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

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...)

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' ?

Earn XP by completing lessons, posting on the forum, and answering forum questions