Skip to content

Commit

Permalink
added explicit to_s as needed
Browse files Browse the repository at this point in the history
  • Loading branch information
Russell Norris committed Jan 29, 2009
1 parent 8e7ce1b commit 8c7ff6d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/lucky_sneaks/proxy_attributes_form_helpers.rb
Expand Up @@ -26,7 +26,7 @@ module ProxyAttributesFormHelpers
# PS: If you have a better/shorter name for this, I'm all ears. :)
def proxy_attributes_check_box_tag(form_object_name, proxy_name, object_to_check, local_variable = false)
method_name = "#{form_object_name}[#{proxy_name}][]"
parent = local_variable ? eval(form_object_name) : instance_variable_get("@#{form_object_name}")
parent = local_variable ? eval(form_object_name.to_s) : instance_variable_get("@#{form_object_name}")
checked_value = parent.send(proxy_name).include?(object_to_check.id)
tag = check_box_tag method_name, object_to_check.id, checked_value
if previous_check_box_exists_for[method_name]
Expand Down

0 comments on commit 8c7ff6d

Please sign in to comment.