I'm trying to migrate to Rails 2, but keep getting these errors all over the place:
ActionView::TemplateError: wrong number of arguments (2 for 3) On line #61 of users/new.rhtml
58: <% if @captcha_error -%><div class="fieldWithErrors">< % end -%> 59: <table class="signup"><tr> 60: <td class="signupdescription">Verification code:<br /></td> 61: <td><%= image_tag @captcha_image.public_filename, :size=>@captcha_image.image_size %></
62: </tr><tr> 63: <td class="signupdescription" rowspan="2">Enter code:</td> 64: <td><%= text_field_tag :code %></td>
vendor/rails/actionpack/lib/action_view/helpers/ asset_tag_helper.rb:350:in `compute_public_path' vendor/rails/actionpack/lib/action_view/helpers/ asset_tag_helper.rb:350:in `path_to_image' vendor/rails/actionpack/lib/action_view/helpers/ asset_tag_helper.rb:390:in `image_tag' app/views/users/new.rhtml:61:in `_run_rhtml_47app47views47users47new46rhtml' vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb: 224:in `fields_for' vendor/rails/actionpack/lib/action_view/helpers/form_helper.rb: 184:in `form_for' ...
Basically, every function that calls `compute_public_path' gets this error. In this case, it's 'image_tag'. I'm looking at the source and don't see any problem.
def image_path(source) compute_public_path(source, 'images') end
def compute_public_path(source, dir, ext = nil, include_host = true)
compute_public_path takes a minimus of one parameter, which is supplied by image_path.
What am I doing wrong here?
Thanks, Helzer