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
| // | |
| // MyLocation.m | |
| // MapTutorial | |
| // | |
| // Created by David Ohayon on 12/22/12. | |
| // Copyright (c) 2012 David Ohayon. All rights reserved. | |
| // | |
| #import "MyLocation.h" | |
| #import <AddressBook/AddressBook.h> |
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 index | |
| if params(:state) == used | |
| @coupons = Coupon.all(params[:state]) | |
| else | |
| @coupons = Coupon.all | |
| end | |
| respond_to do |format| | |
| format.html # index.html.erb | |
| format.json { render json: @coupons } |
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 create | |
| @message = Message.new(params[:message]) | |
| account_sid = 'AC99a8b8ee9bba15e33ee4cac8bb0e505a' | |
| auth_token = 'f1adcf3b638369e574662fcad40e60f5' | |
| if @message.save | |
| begin | |
| client = Twilio::REST::Client.new account_sid, auth_token | |
| client.account.sms.messages.create( |
NewerOlder