I have a User with one or more email addresses, and I don't want to create a new table for emails. The idea was to store email addresses as Array, but how do I implement this in the controller and the model? This is the controller
class UsersController < ApplicationController
def update
@user =User.find(params[:id])
if @user.update_attributes(user_params)
redirect_to :action => 'show', :id => @user
Is it possible to check during update if the email parameter is already there or a new one and if it is new add it to an Array? I don't know if I made myself clear, but thanks anyway for any answer you or suggestion you will provide! By the way, I am using mysql and I can't switch to a different one!