Provides an accordion
helper and a tabs
helper
In your Gemfile:
gem 'bootstrap-components-helpers', :git => 'git://gist.github.com/5105757.git'
#!/usr/bin/env ruby -w | |
name = ARGV[0] | |
slug = name.downcase.strip.gsub(' ', '-').gsub(/[^\w-]/, '') | |
system("git checkout -b #{slug}") |
#!/bin/sh | |
branch=`git rev-parse --abbrev-ref HEAD` | |
echo "Running tests before pushing ...." | |
if [ $branch == 'master' ]; then | |
exit_code=$(bundle exec rake > /dev/null 2>/dev/null )$? | |
if [ $exit_code -gt 0 ] | |
then echo "Did not push because of failing tests" | |
fi | |
exit $exit_code |
#!/usr/bin/env ruby | |
begin | |
puts "Loading Rails..." | |
require File.join('.', 'config', 'application') | |
require File.join('.', 'config', 'boot') | |
Rails.application.require_environment! | |
rescue | |
$stderr.puts "Please run #{$0} in your Rails root." | |
exit 1 |
POWAPP=`pwd`; cd ~/.pow/; ln -s $POWAPP; cd - |
Resque.workers.each {|w| w.unregister_worker } |
CURRENT_FEATURE=$(git symbolic-ref -q HEAD) | |
CURRENT_FEATURE=${CURRENT_FEATURE##refs/heads/} | |
CURRENT_FEATURE=${CURRENT_FEATURE:-HEAD} |
# see - http://reinh.com/blog/2009/03/02/a-git-workflow-for-agile-teams.html | |
# get latest from master | |
git pull origin master | |
# set "current feature" variable and create feature branch | |
export CURRENT_FEATURE=1234567-feature-name | |
git checkout -b $CURRENT_FEATURE | |
# or use the following to get the current branch name |
desc 'Create YAML test fixtures from data in an existing database. | |
Defaults to development database. Set RAILS_ENV to override.' | |
task :extract_fixtures => :environment do | |
sql = "SELECT * FROM %s" | |
skip_tables = ["schema_info"] | |
ActiveRecord::Base.establish_connection | |
(ActiveRecord::Base.connection.tables - skip_tables).each do |table_name| | |
i = "000" | |
File.open("#{Rails.root}/test/fixtures/#{table_name}.yml", 'w') do |file| |
module PdfHelper | |
require 'wicked_pdf' | |
def self.included(base) | |
base.class_eval do | |
alias_method_chain :render, :wicked_pdf | |
end | |
end | |
def render_with_wicked_pdf(options = nil, *args, &block) |