# rdoc.sourceforge.net/doc/

Blog

This is an engine meant to be mounted inside a client app giving it a blogging type application.

Blog Contexts

I found that many of my sites had a /blog, /news and other such sections. The functionality was identical but the context was different. Thus, each of these “blogs” has a context and routes that go with them to allow this sort of differentiation.

Required method (client app)

  • current_user() that responds to id – needed for blog creation/edits so we do not pass user_id in params (small security thing)

  • blog_user_can?(:action, :object) – based off of cancan model

Instructions for Use

  • Run migrations: do this using rake app:blog:install:migrations

  • instal paperclip & inherited_resources gems

  • may have to prepend ‘main_app’ to route helpers in main application. ie. sign_up_path => main_app.sign_up_path

  • New context:

Development

  • sass –watch app/assets/stylesheets/blog/