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
Partigirb::Client.new.items.index? :item_type => 'film' # => [#<Partigirb::PartigiStruct ptItem_title="The Shop Around the Corner", c... | |
Partigirb::Client.new.items.index.json? :item_type => 'film' # => Partigirb::PartigiError: #<Partigirb::PartigiError:0x257bc80> |
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
update named_areas as na SET area_protected = ( | |
select | |
ST_Area(ST_Intersection(ST_Union(pa.the_geom), temp.the_geom)) | |
from named_areas_protected_areas as napa, protected_areas as pa, (select id from named_areas where id=na.id) as temp | |
where napa.protected_area_id=pa.id AND named_area_id AND named_area_id = temp.id ) |
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 Api::IdentificationsController < ApplicationController | |
#Provide an identification | |
def update | |
identification_attributes = { | |
:observationRowId => params[:rowid], | |
:scientificName => params[:scientificName], | |
:identificationTime => Time.now.strftime("%m-%d-%Y %H:%M:%S"), | |
:author => params[:username], |
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 Animal < ActiveRecord::Base | |
has_many :diseases | |
has_many :pets | |
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
= semantic_form_for @pet do |form| | |
= form.inputs do | |
= form.input :animal | |
= form.input :diseases, :as => :check_boxes | |
= form.buttons |
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
gem 'ruby-debug19' |
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 AuthController < ApplicationController | |
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
$:.unshift("/Library/RubyMotion/lib") | |
require 'motion/project' | |
Motion::Project::App.setup do |app| | |
app.name = 'wadus_app' | |
app.vendor_project 'vendor/tesseract', :static, | |
:headers_dir => 'include' | |
app.frameworks += ['CoreData'] | |
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
source "https://rubygems.org" | |
gem 'httmultiparty' |
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 Object | |
def instance_variable_set(name, value) | |
super("@#{name}", value) | |
end | |
end |