def annex_block(identifier, opts = {})
      opts[:route] ||= current_route

      case Annex::config[:adapter]

      when :activerecord
        doc = Annex::Block.where(route: "#{opts[:route]}_#{identifier}").first_or_create
        content = doc.content

      when :mongoid
        doc = Annex::Block.where(route: opts[:route]).first_or_create
        content = doc.content.try(:[], identifier.to_s)

      end

      render partial: 'annex/block', locals: { content: content || opts[:default], identifier: identifier, opts: opts }
    end
def annex_block(identifier, opts = {})
      opts[:route] ||= current_route

      case Annex::config[:adapter]

      when :activerecord
        doc = Annex::Block.where(route: "#{opts[:route]}_#{identifier}").first_or_create
        content = doc.content

      when :mongoid
        doc = Annex::Block.where(route: opts[:route]).first_or_create
        content = doc.content.try(:[], identifier.to_s)

      end

      render partial: 'annex/block', locals: { content: content || opts[:default], identifier: identifier, opts: opts }
    end
annex_block is a universal helper to render content from
 the database and display it on the page