-
lowerCamelCase
-
2 пробела для отступов
-
google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml
-
Держим JS отдельно от HTML
@webmock | |
Feature: Sign up with Twitter account | |
In order to log into the system | |
As a user | |
I want to register a new account with the system with my Twitter account | |
Scenario: User signs up with Twitter account | |
Given the Twitter OAuth request is successful | |
When I go to the sign up page | |
And I follow "Sign in with Twitter" |
Post.fetch # fetch post from remote resources and save to the Post | |
Post::Tumblr.fetch # fetch post from Tumblr and save to the Post |
Feature: Create a multichoice question | |
In order to qualify team members based on internal standards | |
As an Admin | |
I want to be able to create a multiple choice question pool to create standards tests | |
Background: | |
Given I am an authenticated user | |
And I am on the new question page | |
Scenario: Admin creates new question |
(function($) { | |
$.fn.multiply_fields = function(options) { | |
var settings = { | |
'item': '.item', | |
'add-trigger': '.add-trigger', | |
'remove-trigger': '.remove-trigger' | |
}; | |
return this.each(function() { |
Host *.amazonaws.com | |
StrictHostKeyChecking no |
require 'rubygems' | |
require 'bundler/setup' | |
require 'octokit' | |
require 'active_support/core_ext' | |
@username = 'repo user name' | |
def client | |
@client ||= Octokit::Client.new(:login => 'login', :token => 'token') | |
end |
class ActiveRecord::Base | |
validate do |record| | |
record.class.columns.select{|c| [:string, :text].include?(c.type) && c.limit.present? }.each do |column| | |
validator = ActiveModel::Validations::LengthValidator.new(:attributes => [column.name], :maximum => column.limit) | |
validator.validate(record) | |
end | |
end | |
end |
lowerCamelCase
2 пробела для отступов
google-styleguide.googlecode.com/svn/trunk/javascriptguide.xml
Держим JS отдельно от HTML
# класс для работы с рядом | |
class Series | |
def initialize | |
@result = [[1]] # каждый элемент ряда - массив | |
end | |
# добавить в ряд элемент | |
def push( element ) | |
@result.push( element ) |