save_and_open_page
have_button(locator)
=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') |
#!/usr/bin/env sh | |
## | |
# This is script with usefull tips taken from: | |
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx | |
# | |
# install it: | |
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh | |
# |
This playbook has been removed as it is now very outdated. |
This is a summary of the "Learn You A Haskell" online book under http://learnyouahaskell.com/chapters.
module Abilities | |
def self.ability_for(user) | |
if user.admin? | |
AdminAbility.new(user) | |
else user | |
MemberAbility.new(user) | |
else | |
GuestAbility.new | |
end | |
end |
module Paperclip | |
class Masker < Processor | |
def initialize file, options = {}, attachment = nil | |
super | |
@format = File.extname(@file.path) | |
@basename = File.basename(@file.path, @format) | |
end | |
def make | |
source = @file |
createuser --no-createdb --no-createrole --no-superuser [username] | |
createdb --owner [username] --encoding utf8 [database] | |
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U [username] -d [database] -p 5432 [data_file] | |
PGUSER=[username] heroku pg:pull HEROKU_POSTGRESQL_NAME [local_database] --app app-name |