Topic: Scaffold that shows results and destroys them straight away
I have developed a search facility for my app. However, I don't want the searches to clutter my application.
How would you rewrite a simple scaffold to make it only show and automatically destroy afterwards (when you leave the page)?
I tried .destroy or .delete but it doesn't delete the "search_id"
My simple scaffold:
class SearchesController < ApplicationController
@search = Search.new
@search = Search.create!(params[:search])
@search = Search.find(params[:id])
Last edited by Vierka (2012-08-25 12:29:25)