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
| def valid | |
| failure = catch :fail do | |
| code = Code.find_by_value(params[:id]) or throw :fail, 'unknown' | |
| code.unused? or throw :fail, 'used' | |
| nil | |
| end | |
| respond_with({:valid => !failure, :reason => failure}.compact) | |
| end |
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
| module HashExtensions | |
| def compact | |
| self.reject{|key, value| value.nil? } | |
| end | |
| end | |
| class Hash | |
| include HashExtensions | |
| end |
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
| data_sources: | |
| 27 - | |
| 28 # The type is the identifier of the data source. By default, this will be | |
| 29 # `filesystem_unified`. | |
| 30 type: filesystem_unified | |
| 31 encoding: utf-8 | |
| 32 | |
| 33 # The path where items should be mounted (comparable to mount points in | |
| 34 # Unix-like systems). This is “/” by default, meaning that items will have | |
| 35 # “/” prefixed to their identifiers. If the items root were “/en/” |
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
| identical [0.03s] output/projekte/wohnen/tillia/index.html | |
| identical [0.00s] output/projekte/wohnen/tillia_mehr/index.html | |
| identical [0.03s] output/projekte/index.html | |
| identical [0.00s] output/start-1.jpg | |
| identical [0.00s] output/start-2.jpg | |
| identical [0.00s] output/start-3.jpg | |
| identical [0.01s] output/start-4.png | |
| identical [0.00s] output/start-5.png | |
| Captain! We’ve been hit! |
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
| From cde3f1f066196f93fe6bfe99801c9138b94447d3 Mon Sep 17 00:00:00 2001 | |
| From: Alexander Presber <[email protected]> | |
| Date: Sun, 27 May 2012 12:27:41 +0200 | |
| Subject: [PATCH] ido not count dir itself in its entries | |
| --- | |
| lib/vfs/entries/dir.rb | 3 ++- | |
| 1 files changed, 2 insertions(+), 1 deletions(-) | |
| diff --git a/lib/vfs/entries/dir.rb b/lib/vfs/entries/dir.rb |
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
| aljoscha :) % bundle exec nanoc co /Users/aljoscha/rails/nanoccer | |
| Loading site data... | |
| Compiling site... | |
| Captain! We’ve been hit! | |
| === MESSAGE: | |
| ArgumentError: undefined class/module ActiveSupport:: |
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
| @saved_referer ||= if params[:to].present? | |
| params[:to] | |
| elsif session[:return_to_after_login] | |
| session.delete(:return_to_after_login) | |
| else | |
| request.referer | |
| end |
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
| @saved_referer ||= params[:to].presence || session.delete(:return_to_after_login) || request.referer |
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
| @saved_referer ||= params.get(:to) || session.delete(:return_to_after_login) || request.referer |
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
| if node[:scalarium][:instance][:roles].any?{|role| %w(rails-app media-encoding).include?(role) } |