You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is it possible to loop over multiple i tags?
my model has a has_many relation with Geography so i want to display the flags in the frontend.
So the question is where and how should i do the loop?
def geo_to_flags
h.content_tag :span, title: geographies.map(&:code).join("|") do
geographies.each do |geo|
h.content_tag(:i, class: "famfamfam-flag-#{geo.code}") do
end
end.joins
end
end
this is not working
Or is this approach completely wrong?
The text was updated successfully, but these errors were encountered:
Is it possible to loop over multiple i tags?
my model has a has_many relation with Geography so i want to display the flags in the frontend.
So the question is where and how should i do the loop?
this is not working
Or is this approach completely wrong?
The text was updated successfully, but these errors were encountered: