Save 36% for Black Friday! Learn more

New Discussion

Notifications

You’re not receiving notifications from this thread.

Root route bypassing before_action

0
Rails

we have a posts_controller which takes a slug to render the correct page.
posts_controller inherits from application_controller which has a couple of before_actions

routes.rb has the following root

    root  'posts#show_post'

The before_actions are not called when going to localhost:3000 which renders the correct post.

also in the log i don't see the show_post action being called.
What am I missing here?

Join the discussion
Create an account Log in