gem 'debugger', group: [:development, :test]
- Add
debugger
to anywhere in code that needs a breakpoint. - Refresh the page, the
rails server
terminal will stop, usehelp
.
.make_spans(@index, @total) when (@index < @total) { | |
.span@{index} { | |
height: unit((30 * @index), px); | |
} | |
.make_spans((@index + 1), @total); | |
} | |
.make_spans(1, 34); |
{ | |
"main": "index.html", | |
"name": "nw-demo", | |
"description": "demo app of node-webkit", | |
"version": "0.1.0", | |
"keywords": [ "demo", "node-webkit" ], | |
"window": { | |
"title": "node-webkit demo", | |
"icon": "link.png", | |
"toolbar": true, |
// Include gulp | |
var gulp = require('gulp'); | |
// Include Our Plugins | |
var sass = require('gulp-sass'); | |
var lr = require('tiny-lr'), | |
refresh = require('gulp-livereload'), | |
server = lr(); |
class User < ActiveRecord::Base | |
# ... lots of persistence stuff | |
end | |
class GitHubUserProvisioner < SimpleDelegator | |
def provision_with!(user_info, extra_user_hash) | |
self.github_login = extra_user_hash['login'] | |
self.name = user_info['name'] | |
self.email = user_info['email'] | |
self.github_url = user_info['urls']['GitHub'] |
class User < ActiveRecord::Base | |
#let's just make it simple and only add one column for this model called 'username' | |
attr_accessible :username | |
#use "follower_id" as the foreign key since by default it will use "user_id" which does | |
#not exist inside the "relationships" table | |
has_many :relationships, foreign_key: :follower_id | |
#find all user with the ID matching the "followed_user_ids" of the result. If I did not | |
#include "source: :followed_user", it will look for the column "following_id" which is wrong |
// Zhuochun | |
// 2013-12-15 | |
function eventFire(el, etype) { | |
if (el.fireEvent) { | |
(el.fireEvent('on' + etype)); | |
} else { | |
var evObj = document.createEvent('Events'); | |
evObj.initEvent(etype, true, false); | |
el.dispatchEvent(evObj); |
=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') |
After the latest OS X system update, Macbook Air 2013 Webcam no longer working on Chrome/Skype.
Solution
Download the attached file.
Go to Finder>Go>Go to Folder
Copy and paste this into the search bar: /Library/CoreMediaIO/Plug-Ins/DAL/
class DeviseCreateUsers < ActiveRecord::Migration | |
def change | |
create_table :users do |t| | |
t.timestamps | |
## Database authenticatable | |
t.string :email, :null => false, :default => "" | |
t.string :encrypted_password, :null => false, :default => "" | |
## Recoverable | |
t.string :reset_password_token |