-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #39 from mdidier9/HasPhoneController
Has phone controller
- Loading branch information
Showing
16 changed files
with
112 additions
and
3 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
2.0.0-p451 |
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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
# Place all the behaviors and hooks related to the matching controller here. | ||
# All this logic will automatically be available in application.js. | ||
# You can use CoffeeScript in this file: http://coffeescript.org/ |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
// Place all the styles related to the phones controller here. | ||
// They will automatically be included in application.css. | ||
// You can use Sass (SCSS) here: http://sass-lang.com/ |
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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
class PhonesController < ApplicationController | ||
skip_before_filter :require_login, :only => [:recieve_request_get_events, :recieve_request_create_event] #add the phone controller pages in here | ||
|
||
respond_to :json | ||
|
||
def recieve_request_get_events | ||
p "THIS IS INSIDE GET EVENTS ACTION ********************" | ||
# p params #not sure there is even going to be params | ||
@all_pingas = Pinga.all | ||
p @all_pingas | ||
respond_with @all_pingas | ||
end | ||
|
||
|
||
def recieve_request_create_event | ||
p "THIS IS INSIDE CREATE EVENT ACTION ********************" | ||
|
||
#geocode it with geocode gem (look for a method that can allow me to convert the address to the to the lat long) | ||
|
||
@create_event_data = params[:data] | ||
|
||
p @create_event_data | ||
|
||
respond_with @create_event_data | ||
|
||
|
||
|
||
#TO DO | ||
#--------------------------------------------------------------------------- | ||
|
||
#this is currently the format of the new_ping hash that we are getting from the phone | ||
#---------------------------------------------------------------------------------------- | ||
# {"title"=>"", "description"=>"", "category"=>"Social", "start_time"=>"6:00 PM", "end_time"=>"8:00 PM", "address"=>""} | ||
|
||
|
||
|
||
#this is currently the format of the new_ping properties that is defined in our migrations | ||
#---------------------------------------------------------------------------------------- | ||
|
||
#CHECK t.string :title | ||
#CHECK t.string :description | ||
#NO (determine in web app --- method) t.string :status | ||
#CHECK t.datetime :start_time | ||
#CHECK t.datetime :end_time | ||
#CHECK t.string :address | ||
#NO (get from the the address) t.float :latitude | ||
#NO (get from the phone using bubblewraps's location obj) t.float :longitude | ||
#NO (need to somehow get the user information from the phone) t.integer :creator_id #user_id | ||
#CHECK t.timestamps (this will be created when it is entered in the database) | ||
|
||
|
||
|
||
#QUESTIONS | ||
#--------------------------------------------------------------------------------- | ||
#How do we want to sanitize data? (trailing space?, newline? ) | ||
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
module PhonesHelper | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h1>This is to confirm that the recieve_request_create_event action has been called within the phone controller</h1> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<h1>This is to confirm that the recieve_request_get_events action has been called within the phone controller</h1> |
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 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 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 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
require 'spec_helper' | ||
|
||
describe PhonesController do | ||
|
||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
require 'spec_helper' | ||
|
||
# Specs in this file have access to a helper object that includes | ||
# the PhonesHelper. For example: | ||
# | ||
# describe PhonesHelper do | ||
# describe "string concat" do | ||
# it "concats two strings with spaces" do | ||
# expect(helper.concat_strings("this","that")).to eq("this that") | ||
# end | ||
# end | ||
# end | ||
describe PhonesHelper do | ||
pending "add some examples to (or delete) #{__FILE__}" | ||
end |