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
var url = require('url'); | |
var fs = require('fs'); | |
var HTTPSStub = function(){ | |
var handlers={}; | |
var get = function(optionsget, callback){ | |
var p = url.parse(optionsget.path,true); | |
console.log(p.pathname); | |
console.log(p.query); | |
var res = { |
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
require 'bundler/capistrano' | |
set :application, "videonight" | |
set :repository, "git://github.com/RainerBlessing/Videonight.git" | |
set :scm, :git | |
# Prevents error if not parameter passed, assumes that default 'cap deploy' command | |
# and should deploy the master branch to the production server | |
set(:env, 'production') unless exists?(:env) |
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
# HTML | |
<script type="text/html"> | |
<table> | |
<tr><th>Column One</th><th>Column Two</th></tr> | |
{{#collection App.CollectionView tagName="tbody"}} | |
<td>{{content.column_one}}</td><td>{{content.column_two}}</td> | |
{{/collection}} | |
</table> | |
</script> |
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
#Gemfile | |
gem 'sinatra' | |
#config.ru | |
require 'rubygems' | |
require 'bundler' | |
Bundler.require | |
require './my_sinatra_app' |
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
diff --git a/lib/foreigner.rb b/lib/foreigner.rb | |
index 540657a..2eb55aa 100644 | |
--- a/lib/foreigner.rb | |
+++ b/lib/foreigner.rb | |
@@ -19,6 +19,14 @@ module Foreigner | |
end | |
def configured_adapter | |
+ if !ActiveRecord::Base.connected? | |
+ if Rails.application |
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
/* | |
* jquery dialog - display the "OK" button in a disabled state | |
* removes the function from the button and adds the class "ui-state-disabled" | |
*/ | |
if(data.length>0){ | |
options=""; | |
$.each(data, function(i, product){ | |
if(product.product.id!=product_id){ | |
options+= '<option value="'+product.product.id+'">'+product.product.name+'</option>'; | |
}else{ |
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
$.ajax({ | |
url: '/categories.json', | |
type: 'get', | |
contentType: 'application/json;', | |
success: function(msg,a) { | |
$('#product_category_id').empty(); | |
options=""; | |
$.each(msg, function(){ | |
options+= '<option value="'+this.category.id+'">'+this.category.name+'</option>'; | |
}); |
NewerOlder