Rails: Setting tag owner with acts-as-taggable-on and tag_list direct assignment -


I need to set the ownership of tags using the Ilist Direct Assignment method by using

.

This is what I am doing:

  @ blog.tag_list = "red, blue, green" @ blog. Save  

And I have the user set as a tagger

  class user & lt; ActiveRecord :: Base acts_s_tagger end  

Tagged tagged tag tags according to tag how to set tag ownership, but how to set ownership through tag_list, any of it There is no discussion.

Is this possible? Or do I need to set up ownership to avoid direct work?

see

  # in a tagable model (blog): First_Save: set_tag_owner def set_tag_owner # Set some tag owner based on the existing tag_list_set_owner_tag_list_on (self.user ,: tags, self.tag_list) # Clear the list so that we do not get duplicate tagging self.tag_list = zero End # in this view: & lt;% = f.text_field: tag_list ,: value = & gt; @ Blog.all_tags_list%>  

Comments

Popular posts from this blog

java - org.apache.http.ProtocolException: Target host is not specified -

java - Gradle dependencies: compile project by relative path -

ruby on rails - Object doesn't support #inspect when used with .include -