I created a form where user can create a profile and select keyword from an autocomplete token field using jquery tokenInput. the problem is as soon as I call .tokenInput() on the textfield, the text in it is not sent when the form is submitted. I'm using mongodb. here is my profile class:
class Profile
include Mongoid::Document
include Mongoid::Timestamps
field :status, type: String
field :displayname, type: String
field :city, type: String
field :country, type: String
field "_id", type: String, default: ->{ displayname.to_s.parameterize}
attr_accessible :user_tags, :displayname, :city, :country, :tagg_tokens
attr_reader :tagg_tokens
belongs_to :user
end
my coffeescript file:
$("#profile_tagg_tokens").tokenInput '/taggs.json' theme: 'facebook'
my form:
=f.text_field :tagg_tokens
anybody else had this issue before? thx for your help