Johan André

Joined

2,250 Experience
21 Lessons Completed
0 Questions Solved

Activity

Posted in Rails Initialization Internals Discussion

Really awesome timing with this episode! Helped me figure out some issues with conditional eager loading! :) Good job!

Posted in Ruby Module Include Tracking Discussion

Nice screencast! I use this to check which models includes a concern:

ActiveRecord::Base.descendants.select { |c| c.included_modules.include?(Contentable) }

Posted in How to handle flash messages with TurboJS?

Ahhh! Nice. Thanks!

Posted in How to handle flash messages with TurboJS?

When using turbo-frame to switch from showing a partial of model to showing the form of model, how do I handle flash messages?
The failed state - for failed validation - is pretty straight forward, since I re-render the form and outlining the validation errors in the form. But when a form is successfully submitted I would like to show a message (preferably like a toast) saying the data is saved.

Any ideas how to do that in a clean way?

Posted in Using webpacker in Rails Engines?

Thanks Gregorio! Will check it out! 

Posted in Using webpacker in Rails Engines?

Yes! Thank you! Basically it says that there is no good way (right now) to use webpacker in engines. :(

Posted in Using webpacker in Rails Engines?

I'm making a pluggable CMS engine and want to keep the JS/CSS (preferably by writing Tailwind components) in the engine. It works great with models, controllers, routes and the asset pipeline, but I really can't figure out the best way to do it with Webpacker-packs.

Any tips?