Notes posted by hardbap

RSS feed
September 30, 2011 - (>= v3.0.0)
1 thank

Using a block with image_tag

HTML5 officially supports block-level elements in the anchor tag and Rails 3 allows you to pass a block to image_tag:

<%= image_tag(some_path) do %>

<%= content_tag(:p, "Your link text here")

<% end %>

November 22, 2009
0 thanks

assert_response(:success) checks if the status code is in the range 200-299

success? in ActionController::TestResponseBehavior is defined as:

def success?
November 12, 2009
2 thanks

You can't use the :limit option either

Person.find_each(:limit => 10000)…

Will result in:

RuntimeError: You can’t specify a limit, it’s forced to be the batch_size