-1

I am using Kaminari paginator and I got this error. I followed the instructions here!

SyntaxError (../ruby/2.3.0/gems/kaminari-0.17.0/app/views/kaminari/_paginator.html.erb:1: syntax error, unexpected '='
...buffer = @output_buffer;class = class = local_assigns[:class...
...

Please take a look at my controller and views This is my controller

def show
  @asset_location = AssetLocation.find(params[:id])

  if @asset_location.asset_location_type.name == 'unit_section'
    redirect_to :action => :edit, :id => params[:id]
  else
  # paginate sub-locations
  page_num = paginator_page_number(AssetLocation, params[:id])
  per_page = paginator_per_page(AssetLocation, params[:id])

  @asset_locations = @asset_location.sub_locations.page(page_num).per(per_page)

  if @asset_locations.empty? and page_num > 1
    page_num -= 1

    @asset_locations = @asset_location.sub_locations.page(page_num).per(per_page)

  end

  session["asset_location_#{params[:id]}".to_sym][:page] = page_num

  respond_to do |format|
    format.html
    format.js
  end
end

..and this is my view

<tfoot>
  <tr class="body-bg-color">
    <td colspan="8">
      <!-- pagination component here -->
      <div class="row-fluid row-fluid-no-margin" id="bottom-paginator">
        <%= paginate @asset_locations, :params => { :action => 'show', :id => @asset_location.id }, class: 'pagination pull-right' %>
      </div>
    </td>
  </tr>
</tfoot>

I don't know what is the problem here. Can you help me guys? Thanks!

Deepak Mahakale
  • 22,834
  • 10
  • 68
  • 88
Drin
  • 67
  • 1
  • 4

1 Answers1

3

Try removing the class from your code like this:

 <%= paginate @asset_locations, :params => { :action => 'show', :id => @asset_location.id }  %>
Saurabh
  • 71,488
  • 40
  • 181
  • 244
Kaushlendra Tomar
  • 1,410
  • 10
  • 16