jipiboily / monologue

Monologue is a basic blogging engine. It is a Rails mountable engine you can mount in your already existing Rails app, or a in a new one! Enjoy.
http://jipiboily.com/2013/monologue-0-3-0-released-and-monologue-markdown
MIT License
478 stars 196 forks source link

Skip devise authenticate_user! #281

Closed p12y closed 8 years ago

p12y commented 8 years ago

Hi, I'm using this gem with devise and loving it! Great work! Only trouble is I have it set up with devise, where I'm using the authenticate_user! method. I want the blog to be accessible to anyone, so is there a way for me to skip the before_action for the blog?

p12y commented 8 years ago

Never mind, I solved the problem by adding this to config/application.rb:

config.to_prepare do Monologue::ApplicationController.skip_before_filter :authenticate_user! end

msevestre commented 8 years ago

excellent. So your goal is to have everyone access the admin section?

jipiboily commented 8 years ago

My understanding is that he has Devise setup in the main app and don't want it to interfere with Monologue public pages...?

p12y commented 8 years ago

Yeah, that's exactly right. Users need to log in to use the main app but I want them to be able to access the blog without needing to sign up. It doesn't seem to have interfered with the admin section as you still have to log in to monologue to use the admin section.