Created
          March 25, 2012 04:34 
        
      - 
      
- 
        Save nuwansh/2191380 to your computer and use it in GitHub Desktop. 
    Destroy action [rails3]
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | def destroy | |
| @object.destroy | |
| respond_to do |format| | |
| format.html { | |
| flash[:notice] = "Deleted object." | |
| redirect_to(objects_path) | |
| } | |
| format.xml { head :ok } | |
| format.json { head :ok } | |
| end | |
| end | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment