This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
property railsFolder : "/Users/andrew/Documents/DevProjects/rails_projects/" --update this to reflect your own location | |
global targetProjectName | |
global railsProject | |
-- Creates a new tab with the command passed to it, and sets the title accordingly | |
on newTab(tabTitle, command) | |
tell application "iTerm" to tell first terminal | |
launch session "Default" | |
tell last session | |
write text "cd " & railsProject & command |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'digest' | |
class User < ActiveRecord::Base | |
attr_accessor :password | |
attr_accessible :name, :email, :password, :password_confirmation | |
email_regex = /\A[\w+\-.]+@[a-z\d\-.]+\.[a-z]+\z/i | |
validates :name, :presence => true, | |
:length => { :maximum => 50 } |