Taggable Associations - D4uS1/ez-on-rails GitHub Wiki

Taggable Associations

Ez-on-rails uses the select2 field to render associations. More details about rendering of associations can be found in the render info documentation.

This field is also able to add options that are not yet available, like Tags.

Ez-on-rails enables those by adding the html_option taggable in the render infos field definition.

...
  def render_info_article
    {
      tags: {
        label: 'Tags',
        html_options: {
          class: 'taggable'
        },
        label_method: :name
      }
    }
  end
...

This adds new new tags to the result field. But note, that you need to process the passed data in your controller action. The described option only adds the values to the input fields, even if they do not exists. To persist them to the database, you have to process them in the submit action.