brew install redis
Set up launchctl to auto start redis
$ ln -sfv /usr/local/opt/redis/*.plist ~/Library/LaunchAgents
/usr/local/opt/redis/
is a symlink to /usr/local/Cellar/redis/x.y.z
(e.g., 2.8.7
)
=Navigating= | |
visit('/projects') | |
visit(post_comments_path(post)) | |
=Clicking links and buttons= | |
click_link('id-of-link') | |
click_link('Link Text') | |
click_button('Save') | |
click('Link Text') # Click either a link or a button | |
click('Button Value') |
class NestedAttributesForStrategy | |
def association(runner) | |
runner.run | |
end | |
def result(evaluation) | |
evaluation.object.tap do |instance| | |
evaluation.notify(:after_build, instance) | |
return attributes(instance) | |
end |
[init] | |
templatedir = ~/.git-templates | |
[color] | |
ui = always | |
[grep] | |
extendRegexp = true | |
lineNumber = true | |
fullName = true | |
[color "grep"] | |
filename = green |
class NestedAttributesForStrategy | |
def association(runner) | |
runner.run | |
end | |
def result(evaluation) | |
evaluation.object.tap do |instance| | |
evaluation.notify(:after_build, instance) | |
return attributes(instance) | |
end |
Call: | |
Set custom options: | |
= link_to talk, method: :delete, class: 'icon-close', data: {confirm: "Вы действительно хотите удалить всю переписку с данным пользователем?", confirm_options: {title: 'Удалить все сообщения', yes: 'Да', no: 'Нифига'}}, remote: true | |
or standart rails way | |
= link_to talk, method: :delete, class: 'icon-close', data: {confirm: "Вы действительно хотите удалить всю переписку с данным пользователем?"}, remote: true |
Using MongoDB in golang with mgo |
# Run Guard normally. This Guardfile defines 2 groups: | |
# 1) default: This is the default group and will run all appropriate specs when anything changes. | |
# 2) focus: This is the group you want when you are focusing on a specific spec or context of specs. When in this | |
# scope Guard will only run specs tagged with :focus. | |
# | |
# Example: | |
# context "GET on :index, /", focus: true do | |
# ... | |
# end | |
# |
doctype html | |
html | |
head | |
title My App | |
meta name="viewport" content="width=device-width, initial-scale=1.0" | |
= stylesheet_link_tag "application", media: 'all', 'data-turbolinks-track' => true | |
= javascript_include_tag "application", 'data-turbolinks-track' => true | |
= csrf_meta_tags | |
body |