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
register Padrino::Admin::AccessControl | |
set :login_page, "/" | |
access_control.roles_for :any do |role| | |
role.protect "/profile" | |
# role.protect "/admin" # Here a demo path | |
end | |
# Adding a role for users |
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
class ProductsController < Spree::BaseController | |
HTTP_REFERER_REGEXP = /^https?:\/\/[^\/]+\/t\/([a-z0-9\-\/]+)$/ | |
#prepend_before_filter :reject_unknown_object, :only => [:show] | |
before_filter :load_data, :only => :show | |
resource_controller | |
helper :taxons | |
actions :show, :index |
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
# views/layouts/application.html.haml | |
# Rails Error: uninitialized constant ActionView::CompiledTemplates::DOMAIN_CONFIG | |
%p | |
Request Domain | |
= request.domain.inspect | |
DOMAIN_CONFIG: | |
= DOMAIN_CONFIG.to_yaml |
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
%tr | |
%td | |
= t("filename") | |
\: | |
%td= f.file_field :attachment | |
%td | |
= t("tags") | |
\: | |
%td= f.autocomplete_field :tag_name, autocomplete_tag_name_images_path | |
- if @product.has_variants? |
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
# /config/compass.rb | |
# This configuration file works with both the Compass command line tool and within Rails. | |
# Require any additional compass plugins here. | |
project_type = :rails | |
project_path = Compass::AppIntegration::Rails.root | |
# Set this to the root of your project when deployed: | |
http_path = "/" | |
css_dir = "public/stylesheets" | |
sass_dir = "app/stylesheets" | |
environment = Compass::AppIntegration::Rails.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
require 'rubygems' | |
require 'spork' | |
Spork.prefork do | |
# Loading more in this block will cause your tests to run faster. However, | |
# if you change any configuration or code from libraries loaded here, you'll | |
# need to restart spork for it take effect. | |
require 'cucumber/rails' |
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
$ brew install tmux | |
==> Downloading http://downloads.sourceforge.net/tmux/tmux-1.3.tar.gz | |
File already downloaded and cached to /Users/e/Library/Caches/Homebrew | |
==> Downloading patches | |
==> Patching | |
patching file server.c | |
==> ./configure | |
==> make install | |
/usr/bin/cc -O3 -march=core2 -w -pipe -DBUILD="\"1.3\"" -iquote. -I/opt/local/include -c -o attributes.o attributes.c | |
/usr/bin/cc -O3 -march=core2 -w -pipe -DBUILD="\"1.3\"" -iquote. -I/opt/local/include -c -o cfg.o cfg.c |
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
[2010-09-15 15:41:54] make eval.c: In function ‘rb_eval_string_wrap’: | |
eval.c:1744: warning: assignment discards qualifiers from pointer target type | |
eval.c: In function ‘rb_eval_cmd’: | |
eval.c:1885: warning: assignment discards qualifiers from pointer target type | |
eval.c: In function ‘call_trace_func’: | |
eval.c:2736: warning: assignment discards qualifiers from pointer target type | |
eval.c: In function ‘rb_raise_jump’: | |
eval.c:4770: warning: assignment discards qualifiers from pointer target type | |
eval.c: In function ‘method_missing’: | |
eval.c:5736: warning: assignment discards qualifiers from pointer target type |
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
// | |
// example.h | |
// CoreDataExample | |
// | |
// Created by Wess Cope on 3/7/10. | |
// Copyright 2010 FrenzyLabs. All rights reserved. | |
// | |
#import <CoreData/CoreData.h> |
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
❼@clutch [sly] ~/w/hg/c (master) $ r --trace >> backtrace.txt | |
/Users/e/.rvm/gems/ruby-1.8.7-p302@clutch/gems/ticketmaster-basecamp-0.1.0/lib/provider/project.rb:11: uninitialized constant Kernel::Basecamp (NameError) | |
from /Users/e/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require' | |
from /Users/e/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `require' | |
from /Users/e/.rvm/gems/ruby-1.8.7-p302@clutch/gems/ticketmaster-basecamp-0.1.0/lib/ticketmaster-basecamp.rb:4 | |
from /Users/e/.rvm/gems/ruby-1.8.7-p302@clutch/gems/ticketmaster-basecamp-0.1.0/lib/ticketmaster-basecamp.rb:3:in `each' | |
from /Users/e/.rvm/gems/ruby-1.8.7-p302@clutch/gems/ticketmaster-basecamp-0.1.0/lib/ticketmaster-basecamp.rb:3 | |
from /Users/e/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:36:in `gem_original_require' | |
from /Users/e/.rvm/rubies/ruby-1.8.7-p302/lib/ruby/site_ru |