このエラーは何ですか?BrandsController#indexのArgumentError引数の数が間違っています(2対1)コントローラーのインデックスのコードは次のとおりです。
def index
@brands = Brand.all
#@brands = Brand.paginate :page => params[:page],:per_page => 6
respond_to do |format|
format.html
format.xml { render :xml => @brands.to_xml }
end
end
index.html.hamlを表示するための私のコードは次のとおりです。
- content_for :title do
Listing Brands
- content_for :div do
Listing Brands
- content_for :subnav do
#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 do
%img{:src => "images/lifestyle.gif", :height => "35"}
-#
- content_for :subnav do
#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 do |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
BrandsController#indexのArgumentErrorの引数の数が間違っている理由がわかりません(2対1)