Clint P. wrote:
Hey Adam. Would you send the code of your method along? That will make
it easier to help.
Sure…Something like this:
The view is just a form with the 3 rows (ColumnID, ColumnTitle, and
ColumnDescription), I specify the value for ColumnID in a hidden field
(i get the value from the URL).
Controller is a basic update method:
@column = Columns.find_by_ColumnID(params[:id])
flash[:notice] = ‘Column was successfully updated.’
redirect_to :action => ‘show’, :id => @column
render :action => ‘edit’
When it executes save_form is notifies me there is no id column in
UPDATE…WHERE id = NULL, but i want it to update where ColumnID =
hidden ColumnID value from the form.
It’s pretty basic, if i could only specify the update code it would be
Instead of it running UPDATE Table SET ColumnTitle = ColumnTitle WHERE
id = NULL
It needs to run:
UPDATE Table SET ColumnTitle = ColumnTitle WHERE ColumnID = ColumnID