This file contains 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
ArgumentError (wrong number of arguments (2 for 1)): | |
app/mailers/user_mailer.rb:58:in `reset_password_instructions' |
This file contains 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
class User < ActiveRecord::Base | |
attr_accessible :email, :facebook_id, :firstname, :lastname, :username, :facebook_username, :photo_url | |
def to_param | |
username | |
end | |
def as_json(options={}) |
This file contains 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
Started PUT "/audio_clips/25.json" for 127.0.0.1 at 2013-02-23 23:34:25 -0500 | |
Processing by AudioClipsController#update as JSON | |
Parameters: {"play_count"=>"4", "id"=>"25"} | |
AudioClip Load (0.3ms) SELECT "audio_clips".* FROM "audio_clips" WHERE "audio_clips"."id" = ? LIMIT 1 [["id", "25"]] | |
(0.1ms) begin transaction | |
(0.1ms) commit transaction | |
(0.1ms) begin transaction | |
(0.0ms) commit transaction | |
Completed 200 OK in 91ms (Views: 3.4ms | ActiveRecord: 3.8ms) |
This file contains 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
#Put Command Sent: | |
curl -i -H "Accept: application/json" -X PUT -d "like_count=5" http://localhost:3000/audio_clips/25.json | |
#Response Received | |
HTTP/1.1 200 OK | |
Content-Type: application/json; charset=utf-8 | |
X-UA-Compatible: IE=Edge | |
ETag: "7ae5757e1b786a3feb1a604a4991df94" |
This file contains 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 show | |
@audio_clip = AudioClip.find(params[:id]) | |
@client = Foursquare2::Client.new(:client_id => 'client_id', :client_secret => 'client_secret') | |
@audio_clip.fsvenue = @client.search_venues(:ll => '36.142064,-86.816086') | |
respond_to do |format| | |
format.html # show.html.erb | |
format.json { render json: @audio_clip } | |
end | |
end |
This file contains 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
--- !ruby/hash:Hashie::Mash groups: - !ruby/hash:Hashie::Mash type: places name: Places items: - !ruby/hash:Hashie::Mash id: 4b2afcaaf964a5205bb324e3 name: Starbucks contact: !ruby/hash:Hashie::Mash phone: '6153210262' formattedPhone: (615) 321-0262 twitter: starbucks location: !ruby/hash:Hashie::Mash address: 3005 West End Ave crossStreet: 30th Ave lat: 36.143513 lng: -86.813939 distance: 251 postalCode: '37203' city: Nashville state: TN country: United States cc: US canonicalUrl: https://foursquare.com/v/starbucks/4b2afcaaf964a5205bb324e3 categories: - !ruby/hash:Hashie::Mash id: 4bf58dd8d48988d1e0931735 name: Coffee Shop pluralName: Coffee Shops shortName: Coffee Shop icon: https://foursquare.com/img/categories/food/coffeeshop.png parents: - Food primary: true verified: true restricted: true stats: !ruby/hash:Hashie::Mash checkinsCount: 8828 usersCount: 2370 tipCount: 44 likes: !ruby/hash:Hashie::Mash count: 0 groups: [] menu: !ruby/hash:Hashie::Mash type: foodAndBeverage url: https://foursquare.com/v/star |
This file contains 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
## Configuration | |
Geocoder.configure( | |
:timeout => 5, | |
:units => :km | |
) |
This file contains 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
This is what I get in the terminal: | |
Started GET "/profiles/1" for 127.0.0.1 at 2013-01-06 14:24:07 -0500 | |
Processing by ProfilesController#show as HTML | |
Parameters: {"id"=>"1"} | |
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", "1"]] | |
User Load (0.1ms) SELECT "users".* FROM "users" WHERE "users"."id" = ? LIMIT 1 [["id", 1]] | |
RentalAgreement Load (0.3ms) SELECT "rental_agreements".* FROM "rental_agreements" WHERE "rental_agreements"."owner_id" = 1 | |
User Load (0.3ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 LIMIT 1 | |
(0.2ms) SELECT COUNT(*) FROM "reviews" WHERE "reviews"."user_id" = 1 |
This file contains 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 show | |
@user=User.find(params[:id]) | |
@user.set_view_profile(@user.id, false) | |
@rental_agreements = RentalAgreement.where(:owner_id => @user.id) | |
@tools = Tool.where(:user_id => @user.id) | |
respond_to do |format| | |
format.html # show.html.erb | |
format.json { render json: @user } |
This file contains 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
Started POST "/rental_agreements" for 127.0.0.1 at 2012-12-20 19:19:29 -0500 | |
Processing by RentalAgreementsController#create as HTML | |
Parameters: {"utf8"=>"✓", "authenticity_token"=>"yfiXJUvhXm/8XsmLwNLOYOIVHulcZdQ7dadhvhvAHfo=", "rental_agreement"=>{"term_start"=>"12-15-2012", "term_end"=>"12-19-2013", "agreed_price"=>"", "owner_id"=>"23", "tool_id"=>"1", "borrower_id"=>"23", "agreed_terms"=>"1"}, "commit"=>"Send Rental Proposal to Owner"} | |
User Load (0.2ms) SELECT "users".* FROM "users" WHERE "users"."id" = 23 LIMIT 1 | |
(0.1ms) begin transaction | |
SQL (1.0ms) INSERT INTO "rental_agreements" ("agreed_price", "agreed_terms", "approved", "borrower_id", "created_at", "owner_id", "term_duration_hours", "term_end", "term_start", "tool_id", "updated_at") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?) [["agreed_price", nil], ["agreed_terms", "1"], ["approved", nil], ["borrower_id", 23], ["created_at", Fri, 21 Dec 2012 00:19:29 UTC +00:00], ["owner_id", 23], ["term_duration_hours", nil], ["term_end", nil], ["term_ |