From 7a56322b609fcb07e035f0086a5644ec55e4de63 Mon Sep 17 00:00:00 2001 From: Alex Chvatal Date: Wed, 22 Jun 2011 12:31:24 -0400 Subject: [PATCH] Adds ability to parse plain-text tags Tags that haven't been autocompleted and clicked on will be added as tags as well. There should only be one tag like this at a time, since adding a space between tags turns it into a list item. --- app/controllers/profiles_controller.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/app/controllers/profiles_controller.rb b/app/controllers/profiles_controller.rb index 641355bbc..25aa1f3bb 100644 --- a/app/controllers/profiles_controller.rb +++ b/app/controllers/profiles_controller.rb @@ -20,6 +20,7 @@ class ProfilesController < ApplicationController def update # upload and set new profile photo params[:profile] ||= {} + params[:tags] << params[:profile][:tag_string] unless params[:profile][:tag_string].nil? params[:profile][:tag_string] = (params[:tags]) ? params[:tags].gsub(',',' ') : "" params[:profile][:searchable] ||= false params[:profile][:photo] = Photo.where(:author_id => current_user.person.id,