Notes posted by hardbap
RSS feed
hardbap -
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 %>
hardbap -
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? (200..299).include?(response_code) end
hardbap -
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
hardbap -
November 4, 2009
1 thank
As of v2.3.4 you can use Symbols
This commit fixes using a Symbol with assert_template
http://github.com/rails/rails/commit/f383a4aa333cd8a99003eb1bdbb27b6fdea1056c
assert_template :new # works in 2.3.4