Iam trying to build a classified site, I've created the code to
add,edit,delete posts. I am facing trouble with the edit part. When I
click the edit link for a post it shows the form with all the
textfields,after entering in all the fields and clicking the save
changes button, Iam getting the
Typically your show action does not allow for user input. The edit action does.
In any case, is there a classified/edit.erb and if you are trying to render it,
then it implies that the update failed. Do you know why?
On Sep 19, 2010, at 11:03 AM, Faisal Basha wrote:
Iam trying to build a
your show action looks like the edit action should look, and then you are
rendering edit if something goes wrong , that is not the way
def update
@classifed = Classified.find(params[:id])
if @classified.update_attributes(params[:classified])
redirect_to :action = 'show', :id =
3 matches
Mail list logo