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
collection.find (error, cursor) -> | |
cursor.toArray (error, results) -> | |
# Do stuff with results. |
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
// In cases where we have an AJAX request for IE with an uploaded file, we | |
// assume we served through an iframe (a fairly safe assumption) and serve | |
// up the response with a content type of text/plain so that IE does not | |
// attempt to save the file. | |
LiftRules.responseTransformers.append { | |
resp => | |
(for (req <- S.request) yield { | |
resp match { | |
case InMemoryResponse(data, headers, cookies, code) | |
if ! req.uploadedFiles.isEmpty && |
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
private object noCometResponseSent extends SessionVar[Boolean](false) | |
LiftRules.redirectAjaxOnSessionLoss = false | |
LiftRules.noCometSessionPage = "/home" | |
// Returns true if we should send an empty response for a comet request, | |
// false otherwise. This is used to ensure we don't send multiple | |
// window.location redirects in the event of a server restart in response | |
// to comet requests. Sending multiple ones can send Firefox into an |
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
/** | |
* Fixes some issues where SuperTab has trouble editing labels that have | |
* been truncated. | |
* | |
* The original SuperTab uses the same textField used by regular tabs to | |
* _display_ the label to edit it, as well, simply setting it to an | |
* editable text field instead of merely a dynamic one. However, when | |
* the tab truncates the text of the field for width, and then is edited | |
* again, this means that the text in the editable field is truncated. | |
* |
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
- (void)setDelegate:(id)aDelegate | |
{ | |
delegateProxy = [DelegateProxy proxyWithDelegate:aDelegate]; | |
} |
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
[delegateProxy view:self didDoSomething:param]; |
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
if ([delegate respondsToSelector:@selector(view:didDoSomething:)]) | |
[delegate view:self didDoSomething:param]; |
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
@implementation MyClass : CPObject | |
{ | |
} | |
- (CPNumber)reverse | |
{ | |
return 5; | |
} | |
@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
4) | |
NoMethodError in 'UserSessionsController when showing session data as JSON should return the UserSession converted to JSON' | |
undefined method `params' for #<ActionController::TestRequest:0x3137dd0> | |
/Library/Ruby/Gems/1.8/gems/authlogic-2.0.11/lib/authlogic/controller_adapters/abstract_adapter.rb:30:in `params' | |
/Library/Ruby/Gems/1.8/gems/authlogic-2.0.11/lib/authlogic/session/params.rb:95:in `params_credentials' | |
/Library/Ruby/Gems/1.8/gems/authlogic-2.0.11/lib/authlogic/session/params.rb:71:in `params_enabled?' | |
/Library/Ruby/Gems/1.8/gems/authlogic-2.0.11/lib/authlogic/session/params.rb:65:in `persist_by_params' | |
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:178:in `send' | |
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:178:in `evaluate_method' | |
/Library/Ruby/Gems/1.8/gems/activesupport-2.2.2/lib/active_support/callbacks.rb:166:in `call' |
NewerOlder