On my local pc my token field works fine. I use a MySQL data.
But on the server where the database i PostgreSQL there is something wrong with the search. I use the this token field plugin: http://loopj.com/jquery-tokeninput/
In my controller I have:
def sammenlign
@pakkes = Taletid.where("navn like ?", "%#{params[:q]}%")
respond_to do |format|
format.html # index.html.erb
format.xml { render :xml => @pakkes }
format.json { render :json => @pakkes.map(&:attributes) }
end
end
Why is the like method not working?
For postgres try ILIKE instead of LIKE. Postgres is case-sensitive by default.