Just launched! Get 30% off Rails Revisited Have a Look

In The Real World

Buy or Subscribe

You can access this course in just a minute, and support my efforts to rid the world of crappy online courses!

Buy Standalone  Subscribe

I'm a control freak, and that means I want to own all of my routes and use Spina where I choose to. Currently, on my main site (bigmachine.io), Spina handles my courses, lessons, and old blog posts. I do not, however, let it handle the routing.
To do that, I need to know how to retrieve Spina pages:
@page = Spina::Page.find_by(slug: params[:slug])
@page = Spina::Page.i18n.find_by(materialized_path: "#{params[:slug]")