def index
      @search = Snippet.order('title asc').search(params[:q])
      @snippets = @search.result(distinct: true).per_page_kaminari(params[:page]).per(10)

      respond_to do |format|
        format.html # index.html.erb
        format.json { render json: @snippets }
      end
    end
def index
      @search = Snippet.order('title asc').search(params[:q])
      @snippets = @search.result(distinct: true).per_page_kaminari(params[:page]).per(10)

      respond_to do |format|
        format.html # index.html.erb
        format.json { render json: @snippets }
      end
    end
GET /static_blocks
 GET /static_blocks.json