views:

43

answers:

0

Hi,

I'm using the Vestal Version Fork here for Rails 3 support: http://github.com/adamcooper/vestal_versions/

The issue I'm having is that the updated_by => current_user is not storing in the versions table on update.

def update 
        @book = Book.find(params[:id]) 
  respond_to do |format| 
    if @book.update_attributes(params[:book].merge(:updated_by => current_user)) 
      format.html { redirect_to(@book, :notice => 'Book was 
successfully updated.') } 
      format.xml  { head :ok } 
    else 
      format.html { render :action => "edit" } 
      format.xml  { render :xml => @book.errors, :status => :unprocessable_entity } 
    end 
  end 
end 

I checked the logs, there is no error, Rails is INSERTING NULLs in the DB for the user fields, the one I need to populate is user_id

Ideas?

Thanks