Hell SO,
I've just started a new project with ComfyMexicanSofa being used as the CMS. I'm running into an issue where I try to add a new route to routes.rb. Here is an example of the last two lines in routes.rb, I believe the first one is the issue, and the second is the route that isn't working:
comfy_route :cms, :path => '/', :sitemap => false
post '/facebook_login', to: 'callbacks#login'
When I try to post to http://localhost:3000/facebook_login I get an 404 not found error. I also tried switching that route to get and visited the page, and received the "Couldn't find Comfy::Cms::Page" error.
From what I understand, the comfy_route line makes it so anything after '/' will look in the cms for content. I was under the impression that anything specified after that line would take precedence. I'm obviously incorrect...
Do any of you have any ideas how I can still set routes while using ComfyMexicanSofa? I've been able to find any other mention in searches referring to this issue. I'm very new to Rails, so I apologize if I'm doing something really stupid...
Thanks for your time! -Ryan
From the cms docs:
Make sure that content serving route appears as a very last item
So do this:
post '/facebook_login', to: 'callbacks#login'
comfy_route :cms, :path => '/', :sitemap => false