ruby-on-railsrubygemscustomizationhelpermethods

Editing world-flags output


I am trying to edit the output on the world-flags gem, in the documentation it says the following:

You can customize the output by the flag view helper methods:

WorldFlags.flag_list_tag = :div
WorldFlags.flag_tag = :span
WorldFlags.flag_text = ''

I have tried many things but can't seem to get it to work, where abouts should i place these methods to customise output? Thanks!


Solution

  • I was not able to edit the output of the world flags gem by using the view helper methods in the question. However I was able to remove the bullets from the ul tags by using the following CSS:

    ul {
        list-style-type: none;
    }
    

    The ul and li tags still remain, and I don't think there is currently a way to remove them using the world-flags gem unless you edit the gem yourself.

    Hopefully this feature is added to future versions of the gem.