rails / tailwindcss-rails

Other
1.39k stars 170 forks source link

Tailwind breaks rails mailer generator for namespaced files #272

Closed trueinviso closed 8 months ago

trueinviso commented 1 year ago

Rails 7.0.5.1

rails new mailer --css tailwind
cd mailer
rails g mailer admin/reservations_report send_csv

Generates error:

 create  app/mailers/admin/reservations_report_mailer.rb
 invoke  tailwindcss
 create    app/views/admin/reservations_report_mailer
 Could not find "layout.text.erb" in any of your source paths. Your current source paths are: 
 /Users/trueinviso/.rvm/gems/ruby-3.1.1/gems/tailwindcss-rails-2.0.29-arm64-darwin/lib/generators/tailwindcss/mailer/templates

Everything works as expected without the namespace, namespacing also works as expected in a new rails app without the tailwindcss-rails gem.

freibuis commented 1 year ago

I can confirm this also

work around is to make it with no namespace.. then modifier the file created with namespace details

flavorjones commented 8 months ago

Proposed fix at #308