I'm using acts_as_taggable_on_steroids plugin with rails 2.3.5 to build a tag cloud and I'm unfamiliar with the syntax of their view loop. I couldn't find any ruby doc explaining that loop either.
When I run the code below I get this "no block given" error.
LocalJumpError in Tags#index
Showing app/views/tags/index.html.erb where line #10 raised:
no block given
I thought I needed to add the tag_cloud method to my routes.rb file but that didn't solve the problem.
Controller:
class PostController < ApplicationController
def tag_cloud
@tags = Post.tag_counts
end
end
View:
<% tag_cloud @tags, %w(css1 css2 css3 css4) do |tag, css_class| %>
<%= link_to tag.name, { :action => :tag, :id => tag.name }, :class => css_class %>
<% end %>