This is a common case in django ORM.
from django.db import models
class Author(models.Model):| [alias] | |
| cm = "!f() { git commit -m \"$*\"; }; f" | |
| co = checkout | |
| ci = commit | |
| rb = rebase | |
| br = branch | |
| fe = fetch | |
| pu = pull | |
| pr = pull --rebase | |
| cp = cherry-pick |
| #!/usr/bin/env ruby | |
| require 'rubygems' | |
| require 'pp' | |
| begin | |
| gem "jiralicious" | |
| rescue Gem::LoadError | |
| pp 'Please run: gem install jiralicious' | |
| exit | |
| end |
| --colour | |
| --format html --out tmp/parallel_specs/report<%= ENV['TEST_ENV_NUMBER'] %>.html |
| module Extensions | |
| module HasYamlExport | |
| extend ActiveSupport::Concern | |
| # include class methods here | |
| module ClassMethods | |
| # Get options for relations | |
| # :all => true # Add fields | |
| # :only => [:field1, :field2] # Add only fields here |
| # In your model after declaring your attachments, add: | |
| # include HasPaperclipUrlUpload | |
| # Thanks to https://gist.github.com/1502777 | |
| require 'open-uri' | |
| module HasPaperclipUrlUpload | |
| def self.included(base) | |
| base.attachment_definitions.collect{|key, values| key}.each do |key| |
| # -*- encoding : utf-8 -*- | |
| require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper') | |
| include I18nHelper | |
| describe I18nFilters do | |
| include I18nFilters | |
| before do | |
| @client = Factory(:client) | |
| @front_office = FrontOffice.create(Factory.attributes_for(:front_office, :use_templates => true, :internationalization => true)) |
| @mixin box-shadow($top, $left, $blur, $color, $inset: false) { | |
| @if $inset { | |
| -webkit-box-shadow:inset $top $left $blur $color; | |
| -moz-box-shadow:inset $top $left $blur $color; | |
| box-shadow:inset $top $left $blur $color; | |
| } @else { | |
| -webkit-box-shadow: $top $left $blur $color; | |
| -moz-box-shadow: $top $left $blur $color; | |
| box-shadow: $top $left $blur $color; | |
| } |