Sha256: 9b584bd629fae528a8f4231ae469376851fe39e1f161a806bd79f11cb4925690
Contents?: true
Size: 722 Bytes
Versions: 4
Compression:
Stored size: 722 Bytes
Contents
class ShortMessagesController < ApplicationController def index @short_messages = ShortMessage.all end def new @short_message = ShortMessage.new end def create @short_message = ShortMessage.new(params[:short_message]) respond_to do |format| if @short_message.send_message flash[:notice] = 'ShortMessage was successfully sent.' format.html { redirect_to(:action => 'index') } format.xml { render :xml => @short_message, :status => :created, :location => @short_message } else format.html { render :action => "new" } format.xml { render :xml => @short_message.errors, :status => :unprocessable_entity } end end end end
Version data entries
4 entries across 4 versions & 1 rubygems