Leon Entrup

Joined

510 Experience
4 Lessons Completed
0 Questions Solved

Activity

I am aware of these guides:

My code for my ApplicationController can be found here

My after_sign_in_path_for(resource_or_scope) method returns nil when I put a debugger in it and I am trying to understand why that is the case:


stored_location_for(resource_or_scope)

=> nil

resource_or_scope

=> #<Userinstance>

super

=> "/"

Posted in error with purgecss and Tailwind 2

wow, thank you Chris for the quick reply. I am deeply grateful for the work you're doing. Always listen to the podcast too.

Posted in error with purgecss and Tailwind 2

Hey there, I am facing the following problem. In production, purgecss is preventing all all css from @tailwindcss/forms from being rendered properly. When I comment out purgecss everything is working just fine. The forms are located in the following file:

/app/views/boater/boats/new.html.erb

Here is my postcss.config.js :

let environment = {
  plugins: [
    require("tailwindcss")("tailwind.config.js"),
    require('autoprefixer'),
    require('postcss-import'),
    require('postcss-flexbugs-fixes'),
    require('postcss-preset-env')({
      autoprefixer: {
        flexbox: 'no-2009'
      },
      stage: 3
    }),
  ]
}

if (process.env.RAILS_ENV === "production") {
  environment.plugins.push(
    require('@fullhuman/postcss-purgecss')({
      content: [
        './app/**/*.html.erb',
        './app/**/**/*.html.erb',
        './app/**/*.html.haml',
        './app/helpers/**/*.rb',
        './app/javascript/**/*.js'
      ],
      defaultExtractor: content => content.match(/[A-Za-z0-9-_:/]+/g) || []
    })
  )
}

module.exports = environment

My package.json can be found here:

https://pastebin.com/3BV5uHMN

My tailwind.config.js can be found here:
https://pastebin.com/9e3uE3g6

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

© 2021 GoRails, LLC. All rights reserved.