Hi everyone!
I just started learning Ruby on Rails about a week ago for a school
project, and can’t seem to find a solution for something.
I have this inside the form inside of edit_albums.rhtml:
<%= start_form_tag :action=>‘proccess_edit_album’, :id=>@album.id %>
…
Release Date: <%= datetime_select(:album, :release_date, :start_year
=> 1960) %>
…
and inside the controller:
def edit_album
@album = Album.find(params[‘id’])
end
def proccess_edit_album
@album = Album.find(params[:id])
@album.update_attributes(params[:album])
if 1
redirect_to :action=> ‘list_albums’
else
render :action => ‘edit_album’, :id=>params[‘id’]
end
end
but it gives me an error message, i dont get why, and i can’t seem to
find a fix to it.
Can anyone help me? I’ll appreciate it!