Generated with workflows2md.
- Append to Journal by Chad Stovern
- Audio Device by mikegrb
- Bluetooth Toggle by Chris Streeter
- Can I Use v1.3 by Will Farrell
- Domainr by dingyi
- Emoji v1.5.0 by Carlos Galdino
| require 'fakeweb' | |
| require 'fake_resource' | |
| ActiveResource::Base.send :include, ActiveResource::FakeResource | |
| Before do | |
| FakeWeb.allow_net_connect = false | |
| end | |
| After do |scenario| | |
| ActiveResource::FakeResource.clean |
| =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 PostsController < ActionController::Base | |
| def create | |
| Post.create(post_params) | |
| end | |
| def update | |
| Post.find(params[:id]).update_attributes!(post_params) | |
| end | |
| private |
| #!/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 | |
| # |
| # | |
| # perl got some things right. here-docs were one of them. YAML takes this | |
| # further when we have to define large data structures. | |
| # | |
| # if you find yourself typing " ' ) ( [ ] too many times in a row, whack | |
| # yourself on the wee-wee with a keyboard and whip out the YAML | |
| # | |
| this_fucking_licks_hairy_balls_to_edit = |
| class Api::RegistrationsController < Api::BaseController | |
| respond_to :json | |
| def create | |
| user = User.new(params[:user]) | |
| if user.save | |
| render :json=> user.as_json(:auth_token=>user.authentication_token, :email=>user.email), :status=>201 | |
| return | |
| else |
| # 0. Make sure you have Ruby 1.9.3 installed, and optionally RVM and PostgreSQL | |
| # 0.2 If you are on the Mac, make sure you have a c compiler by installing XCode Command Line Tools or gcc4.2 with homebrew | |
| # https://github.com/mxcl/homebrew/wiki/Custom-GCC-and-cross-compilers | |
| # 0.5 Make sure you have bundler version ~> 1.2 as Rails depends on it | |
| gem install bundler | |
| # 1. Get edge Rails source (master branch) | |
| git clone https://github.com/rails/rails.git |
| access_key_id: xxx | |
| secret_access_key: yyy |
| msgs = YAML::load(File.open("#{::Rails.root.to_s}/config/locales/devise.en.yml")) | |
| msgs['en']['devise']['failure']['unauthenticated'] |
Generated with workflows2md.