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' | |
def start_simplecov | |
require 'simplecov' | |
SimpleCov.start 'rails' unless ENV["SKIP_COV"] | |
end | |
def spork? | |
defined?(Spork) && Spork.using_spork? | |
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
module ActsAsTaggable | |
module Taggable | |
def self.included(base) | |
base.field :tags, :type => Array, :default => [] | |
end | |
end | |
module Tagger | |
def tag(object, tags) |
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 paginator.total_pages > 1 %} | |
<div class="pagination"> | |
{% if paginator.previous_page %} | |
<a class="prev" href="{{paginator.previous_page}}">← Prev</a> | |
{% endif %} | |
{% for page in (1..paginator.total_pages) %} | |
{% capture url %}/{{site.pagination_dir}}/page/{{page}}{% endcapture %} | |
{% if page == 1 %} | |
{% assign url = "/" %} | |
{% endif %} |