save_and_open_page
have_button(locator)
<div class="collapse" id="register"> | |
<%= form_for(resource, :class => "collapse", :html => { :id => "registerForm", :multipart => true }, :as => resource_name, :url => registration_path(resource_name)) do |f| %> | |
<%= devise_error_messages! %> | |
<!--[if lt IE 9]> | |
<label for="user_password">Enter email</label> | |
<![endif]--> | |
<%= f.email_field :email, :autofocus => true, :id => 'signup_email', :name => 'user[email]', :placeholder => "you@example.com" %> | |
<!--[if lt IE 9]> |
# RSpec | |
require 'spec/expectations' | |
# Webrat | |
require 'webrat' | |
require 'test/unit/assertions' | |
World(Test::Unit::Assertions) | |
Webrat.configure do |config| |
Nudge - Richard Thaler -- an incredible primer on behavioral economics and the psychology of decision making | |
Rework - 37signals -- the new way of running a company | |
Lean Startup - Eric Ries -- the new way to build products that fill a need |
class ContributorsController < ApplicationController | |
require 'rubygems' | |
require 'json' | |
def show | |
url = 'https://api.github.com/repos/AgileVentures/LocalSupport/stats/contributors' | |
uri = URI.parse url | |
request = Net::HTTP::Get.new(uri.request_uri) | |
http = Net::HTTP.new(uri.host, uri.port) | |
http.use_ssl = true |
# app/uploaders/avatar_uploader.rb | |
# encoding: utf-8 | |
class AvatarUploader < CarrierWave::Uploader::Base | |
include CarrierWave::MiniMagick | |
storage :dropbox | |
process :resize_to_fit => [150, 150] | |
def store_dir | |
"uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}" |
#try this! | |
(rdb:189) Video.yt_session.my_videos.videos[0].media_content[0].url | |
"http://www.youtube.com/v/UvgMW4XiN3c?version=3&f=user_uploads&c=youtube_it&d=Ae_QTuvYrTPr2cwuB_kjD8IO88HsQjpE1a8d1GxQnGDm&app=youtube_gdata" | |
(rdb:189) Video.yt_session.my_videos.videos[0].media_content[1].url | |
"rtsp://r5---sn-5hn7su7k.c.youtube.com/ClcLENy73wIaTgl3N-KFWwz4UhMYDSANFEIKeW91dHViZV9pdEgGUgx1c2VyX3VwbG9hZHNyIQHv0E7r2K0z69nMLgf5Iw_CDvPB7EI6RNWvHdRsUJxg5gw=/0/0/0/video.3gp" | |
(rdb:189) Video.yt_session.my_videos.videos[0].media_content[2].url | |
"rtsp://r5---sn-5hn7su7k.c.youtube.com/ClcLENy73wIaTgl3N-KFWwz4UhMYESARFEIKeW91dHViZV9pdEgGUgx1c2VyX3VwbG9hZHNyIQHv0E7r2K0z69nMLgf5Iw_CDvPB7EI6RNWvHdRsUJxg5gw=/0/0/0/video.3gp" | |
(rdb:189) Video.yt_session.my_videos.videos[0].media_content[3].url | |
*** NoMethodError Exception: undefined method `url' for nil:NilClass |
echo "Install and configure github/tochman/website in current dir." | |
echo "On Ubuntu 13.10 64-bit, clean VM image from " | |
echo "http://virtualboximages.com/Ubuntu+13.10+amd64+VirtualBox+VDI+Virtual+Appliance" | |
echo "Dec 31, 2013" | |
read -p "Hit any key to continue.. " | |
if [ -d "website" ] ; then | |
read -p 'Directory ./website exists. Exiting.' | |
return 0 | |
fi |
<div class="col-md-4 col-md-offset-4" style="margin-top: -80px; padding-left: 140px; padding-right: 60px"> | |
<%= devise_error_messages_flash %> | |
<h3>Account details</h3> | |
<img src="<%= gravatar_for(resource.email) %>" class="img-rounded"> | |
<%= form_for(resource, :as => resource_name, :url => registration_path(resource_name), :html => { :method => :put }) do |f| %> | |
<div><%= f.label :first_name %> | |
<div class="form-group"> | |
<%= f.text_field :first_name, :autofocus => true, class: 'form-control' %> | |
</div> | |
</div> |