Don't like ads? PRO users don't see any ads ;-)
Guest

Untitled

By: a guest on Jun 17th, 2012  |  syntax: None  |  size: 0.49 KB  |  hits: 15  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. class BlipsController < ApplicationController
  2.  
  3.     before_filter :login_required
  4.     respond_to :js
  5.    
  6.     def create
  7.        
  8.         @blip = current_user.blips.build(params[:blip])
  9.         @blip.created_at = Time.now
  10.         #respond_to do |format|  
  11.             if @blip.save  
  12.               respond_with(@blip)
  13.             else  
  14.               flash[:notice] = "Message failed to save."  
  15.               format.html { redirect_to root_path }  
  16.           end
  17.     end
  18.  
  19.     def destroy
  20.  
  21.     end
  22.  
  23. end