nicholasnadel/blocipedia — pull request #2 by nicholasnadel (2014-11-17 23:33:59+00:00)
Title: Private pages

I don't actually want to commit this.

I don't know where to go next to get private pages working. I find this more confusing than BlocItOff's Private Topics... If there's any article/walkthrough/book that goes over a similar application, I would find it invaluable since I'm obviously not capable enough at this point to do it without referencing a guide.

When I try to add the scope ```scope :visible_to, -> (user) { user ? all : where(public: true) }``` to pages_controller.rb, I get an ```undefined method `scope' for PagesController:Class```. Where should this be defined, if it's not already? I've got ```default_scope { order('created_at DESC' )}``` in page.rb...

I also feel like I should create a whole new slew of views (edit/index/new/show.html.erb) for private_pages. Is that correct? Or are these new private pages somehow going to pull from the current pages edit/index/new/show views?

Can we do a paired programming session on Wednesday, either with Nitrous or Floobits (or TeamViewer if you'd like to control my machine)? I think it would be most useful for me to see this done correctly.