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

Version Path
jnstq-acts_as_sms-0.1.0 test/app/controllers/short_messages_controller.rb
jnstq-acts_as_sms-0.1.1 test/app/controllers/short_messages_controller.rb
jnstq-acts_as_sms-0.1.3 test/app/controllers/short_messages_controller.rb
jnstq-acts_as_sms-0.1.4 test/app/controllers/short_messages_controller.rb