ruby on rails 3 - wrong number of arguments (2 for 1) -


what error? argumenterror in brandscontroller#index wrong number of arguments (2 1) code index in controller is:

  def index     @brands = brand.all     #@brands = brand.paginate :page => params[:page],:per_page => 6      respond_to |format|       format.html       format.xml { render :xml => @brands.to_xml }     end   end  

my code view of index.html.haml is:

- content_for :title   listing brands - content_for :div   listing brands - content_for :subnav   #navigation-search     /= yield :brand_img     %img{:src => "images/lifestyle.gif", :height => "35"}     /= link_to 'change brand', new_brand_path     %a.metro-16{:href => new_brand_path, :title => "change brand"} change brand      = render :partial => 'updatemesg'  - content_for :brand_img    %img{:src => "images/lifestyle.gif", :height => "35"} -#   - content_for :subnav     #navigation-search       %form         #{yield :brand_img}    %ul     %li       %a.tt-top-center{:title => "total events"}#{event.all.size}       %span total events     %li       %a.blue.tt-top-center{:title => "today's events"} 12       %span today's events     %li       %a.green.tt-top-center{:title => "tomorrow's events"} 3       %span tomorrow's events     %li       %a.tt-top-center{:title => "upcoming events"} 7       %span upcoming events    %a#show-modal.create-24.tt-top-center{:href => new_brand_path, :title => "new brand"} new brand  - @brands.each |brand|   .ovr     %ol.hoverbox       %li         = link_to image_tag(brand.photo.url, :alt => brand.name, :class => "preview"), brand_path(brand)         /= link_to image_tag(brand.photo.url), { :class => "preview"}         .abc                 = brand.name 

i not getting why error coming argumenterror in brandscontroller#index wrong number of arguments (2 1)


Comments

Popular posts from this blog

django - How can I change user group without delete record -

java - Need to add SOAP security token -

java - EclipseLink JPA Object is not a known entity type -