I am trying to get some Javascript working in my Rails app.
I want to have my index page allow me to edit individual items on the index page, and then reload the in
You forgot to write responds_to
block:
def update
@holder = Holder.find(params[:id])
if @holder.update_attributes(params[:holder])
respond_to do |format|
format.html { redirect_to holders_path } #, flash[:success] = "holder updated")
format.js
end
else
render 'edit'
end
end
But I am suspicious about your index.html.erb, I don't think that will really work the way you think.