Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inconsistent Behavior with simple_form_tailwind.rb Changes #10

Closed
Sarkraf opened this issue Dec 16, 2024 · 2 comments · Fixed by #11
Closed

Inconsistent Behavior with simple_form_tailwind.rb Changes #10

Sarkraf opened this issue Dec 16, 2024 · 2 comments · Fixed by #11

Comments

@Sarkraf
Copy link
Contributor

Sarkraf commented Dec 16, 2024

Description

When using simple_form-tailwind, changes to the simple_form_tailwind.rb file behave inconsistently. Sometimes they're applied, and other times they’re ignored, creating unpredictable behavior.

Solution

Adding the following line to the content array in tailwind.config.js fixes the issue:
"./config/initializers/*.rb",

Updated content example:
  content: [
    "./public/*.html",
    "./app/helpers/**/*.rb",
    "./app/javascript/**/*.js",
    "./app/views/**/*.{erb,haml,html,slim}",
    "./config/initializers/*.rb", // Fix for this issue
  ],

Suggestion

Include this path in the default configuration or document this requirement to prevent similar issues.

Let me know if you need more details!

@tarellel
Copy link
Owner

Good catch,
Thank you, I'll update the README with this applied.

@Sarkraf
Copy link
Contributor Author

Sarkraf commented Dec 16, 2024

If you want, I'm currently modifying the gem to automate this. I can create a PR as soon as it's done. 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants