Skip to content

Commit

Permalink
[#964] [#726] fix handling of can_view when repeating over an array
Browse files Browse the repository at this point in the history
  • Loading branch information
al2o3cr committed Sep 20, 2011
1 parent d3a7f44 commit a450d53
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion hobo/lib/hobo/helper.rb
Expand Up @@ -248,7 +248,8 @@ def can_view?(*args)
# TODO: Man does this need a big cleanup!

if args.empty?
if this_parent && this_field
# if we're repeating over an array, this_field ends up with the current index. Is this useful to anybody?
if this_parent && this_field && !this_field.is_a?(Integer)
object = this_parent
field = this_field
else
Expand Down

0 comments on commit a450d53

Please sign in to comment.