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[:near] | |
@locations = Location.near( | |
params[:near], # Latitude, Longitude | |
params[:radius] ? params[:radius].to_i : 10, | |
:units => :km | |
) | |
else | |
@locations = Location.all | |
end |
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
# Gemfile | |
source 'https://rubygems.org' | |
gem 'rails', '3.2.0' | |
# Bundle edge Rails instead: | |
# gem 'rails', :git => 'git://github.com/rails/rails.git' | |
# PostgreSQL | |
gem 'pg' |
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
createDevice: (e) -> | |
event.preventDefault() | |
attributes = | |
licence_plate: $(@el).find('input[name="licence-plate"]').val() | |
contact_name: $(@el).find('input[name="contact-name"]').val() | |
contact_phone: $(@el).find('input[name="contact-phone"]').val() | |
@collection.create attributes, | |
wait: true |
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
class Etaxi.Routers.Base extends Backbone.Router | |
routes: | |
'register' : 'registerDevice' | |
'a' : 'b' | |
b: -> | |
alert "a" | |
initialize: -> |
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 update | |
@device = Device.find(params[:id]) | |
@device.update_attributes(params[:device]) | |
respond_with(@device) | |
end |
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 update | |
@device = Device.find(params[:id]) | |
@device.latest_activity = Time.now | |
@device.save() | |
@device.update_attributes(params[:device]) | |
respond_with(@device) | |
end |
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
# Error: <class:Video>': undefined method `hello' for Zencodera:Module (NoMethodError) | |
# lib/zencodera.rb | |
module Zencodera | |
def hello | |
puts "Hello..." | |
end | |
end | |
# models/video.rb |
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
# Error: invalid API key | |
# lib/video_encoder.rb | |
module VideoEncoder | |
def self.encode(video = nil) | |
response = Zencoder::Job.create({:input => "test.mp4"}) | |
puts response.inspect | |
end |
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
Rails.application.routes.url_helpers.notification_api_v1_zencoder_job_url | |
ActionController::RoutingError: No route matches {:format=>"json", :action=>"notification", :controller=>"api/v1/zencoder_jobs"} | |
from /Users/drale2k/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.0/lib/action_dispatch/routing/route_set.rb:503:in `raise_routing_error' | |
from /Users/drale2k/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.0/lib/action_dispatch/routing/route_set.rb:499:in `rescue in generate' | |
from /Users/drale2k/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.0/lib/action_dispatch/routing/route_set.rb:491:in `generate' | |
from /Users/drale2k/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.0/lib/action_dispatch/routing/route_set.rb:532:in `generate' | |
from /Users/drale2k/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.0/lib/action_dispatch/routing/route_set.rb:557:in `url_for' | |
from /Users/drale2k/.rvm/gems/ruby-1.9.3-p0/gems/actionpack-3.2.0/lib/action_dispatch/routing/route_set.rb:329:in `url_for' | |
from /Users/drale2k/.rvm/gems/ruby-1.9.3-p0/g |
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
Rossauer Kaserne | |
Josephinum | |
Produktenbörse | |
Chemisches Institut | |
Postsparkasse | |
Schubladkastenhaus | |
Theresianum | |
Hotel Imperial (Palais Württemberg) | |
Schloss Belvedere | |
Kammerspiele |