View routes would allow people to define different views for different devices without using any logic.
Anyone got any thoughts?
# Now when you do `User.to_json(:jsonp => 'method')` you will get `method({id:1,username:'jphastings'})` | |
# | |
# Needs some sanitization of the javascript method name to prevent nastiness. | |
module ActiveSupport | |
# == Active Model JSON Serializer | |
module JSON | |
def self.encode(value,options = {}) | |
if options.has_key?(:jsonp) | |
method_name = options.delete :jsonp |
This bookmarklet demonstrates adding IDs to headings, so that places on a page can be linked to directly.
Bookmark the following address in a non-IE browser (tested in Firefox) and click it when you're browsing a page with headings in the hub.
Then hover over a heading, and double click to change the URL in your browser bar to the one which will go straight to that point.
Bookmarklet:
javascript:(function(){$('h1,h2,h3,h4,h5,h6').each(function(i,e){try{var%20hash=%22%3E%22+$(e).first().text().replace(/[^a-zA-Z\%20]/g,'').replace(/%20/g,'_');$(e).attr('title','Double%20click%20to%20get%20the%20URL%20for%20this%20point%20on%20the%20page:%20%23'+hash);$(e).attr('id',hash);$(e).dblclick(function(){window.location.hash=hash;})}catch(e){}})})();
I've forked sinatra-template and (having followed the instructions to install the required gems etc) immediately tried to rake db:migrate
only to end up with the following error.
Any ideas what's going on? It looks like the problem lies with DataMapper, but I'm not having any luck bug hunting.
require 'ruby-processing' | |
class ProcessingTest < Processing::App | |
load_library 'carnivore' | |
require 'packet_listener' | |
include Java::PacketListener | |
def setup | |
@carnivore = org.rsg.carnivore.CarnivoreP5.new(self) |
class Class | |
def cattr_accessor(*syms) | |
cattr_reader(*syms) | |
cattr_writer(*syms) | |
end | |
def cattr_reader(*syms) | |
syms.flatten.each do |sym| | |
class_eval("unless defined? @@#{sym}\n@@#{sym} = nil\nend\n\ndef self.#{sym}\n@@#{sym}\nend\n\ndef #{sym}\n@@#{sym}\nend\n", __FILE__, __LINE__) | |
end |
-----BEGIN PGP PUBLIC KEY BLOCK----- | |
Version: GnuPG v1.4.10 (Darwin) | |
mQMuBEzAn6ERCACLSb2NlvVmKa8zcFE+GsAY9iRiI1wux+ZtxCspO/Qv9hvxolKw | |
osPX1GfJx8p9XOSm5EqqlTcrO1mJw8Xl1cthNSMX1ZGW9LnDsSzXdf2EMYy3ZvDG | |
DNsMJ/WTdRaBeMtYAZbWe2OrjOEslW0eMDHcwKyiWGmP/OsnrAp8NRf/BR2w5wOd | |
lNtdCnAzwhKudWfAmdoIMNzydDj/2ylPlj33A3xqvC/h68a3HfODkypo1rQ0j1CH | |
B34gWHUIBiLhRcqF58cmYVzWhNbamdHkbMbgSz+x449hrqsUY5yvkoNyKevCfHMY | |
YQT5N2sC9SKxjImvraZ+A+G/TI/8IHzzP3B/AQDyNbgSwE1BK+tjl7fdcLC1hqTz | |
hZJaLdrfMR8hYeDL4wf/Sx2uIFX1Sx/AwpPVzCFTZxnAWHpsb3uGCuBxurHbH2LB |
Johnson::Error: setting a property that has only a getter | |
from /Users/jp/Downloads/rightjs-200-rc2/javascripts/right-src.js:2702 [JavaScript] | |
from /Users/jp/Downloads/rightjs-200-rc2/javascripts/right-src.js:2134 [JavaScript] | |
from /Users/jp/Downloads/rightjs-200-rc2/javascripts/right-src.js:2168 [JavaScript] | |
from /Users/jp/Downloads/rightjs-200-rc2/javascripts/right-src.js:3261 [JavaScript] | |
from /Users/jp/Downloads/rightjs-200-rc2/javascripts/right-src.js:1464 [JavaScript] | |
from /Users/jp/Downloads/rightjs-200-rc2/javascripts/right-src.js:1808 [JavaScript] | |
from /Users/jp/Downloads/rightjs-200-rc2/javascripts/right-src.js:1815 [JavaScript] | |
from /Users/jp/Downloads/rightjs-200-rc2/javascripts/right-src.js:252 [JavaScript] | |
from /Users/jp/Downloads/rightjs-200-rc2/javascripts/right-src.js:3615:in `event_support_for' [JavaScript] |