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
/* Prototype JavaScript framework, version 1.6.1 | |
* (c) 2005-2009 Sam Stephenson | |
* | |
* Prototype is freely distributable under the terms of an MIT-style license. | |
* For details, see the Prototype web site: http://www.prototypejs.org/ | |
* | |
*--------------------------------------------------------------------------*/ | |
var Prototype = { | |
Version: '1.6.1', |
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
# An unintrusive, temporary DSL strategy. | |
# | |
# Why discusses Ruby DSLs and instance_eval vs. block arguments: | |
# http://hackety.org/2008/10/06/mixingOurWayOutOfInstanceEval.html | |
# | |
# This takes advantage of some Ruby 1.9 features to implement a DSL mixin that | |
# is temporary and doesn't override locally defined methods. | |
class DslInstance | |
attr_accessor :script | |
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
defmodule YourAppName.Search do | |
# ... | |
@doc """ | |
Queries listings. | |
""" | |
def query_listings(query, current_user) do | |
default_scope = from l in Listing, where: l.draft == false or l.user_id == ^current_user.id, order_by: [desc: l.updated_at], limit: 50 | |
id = _try_integer(query) |