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
god log listeners | |
I [2008-10-07 23:30:16] INFO: listener-process stop: RAILS_ENV=staging /home/a/staging.site.com/current/script/workling_starling_client stop | |
W [2008-10-07 23:30:17] WARN: listener-process stop command exited with non-zero code = 1 | |
W [2008-10-07 23:30:27] WARN: listener-process process still running 10 seconds after stop command returned. Force killing. | |
I [2008-10-07 23:30:27] INFO: listener-process before_start: deleted pid file (CleanPidFile) | |
I [2008-10-07 23:30:27] INFO: listener-process start: RAILS_ENV=staging /home/a/staging.site.com/current/script/workling_starling_client start | |
W [2008-10-07 23:30:27] WARN: listener-process start command exited with non-zero code = 1 | |
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
#new-user | |
- form_for @user, :url => users_path do |f| | |
%label{:for => "email"} email | |
= f.text_field :email | |
= f.error_message_on :email | |
.password | |
%label{:for => "password"} password | |
= f.password_field :password | |
= f.error_message_on :password |
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
Processing UsersController#create (for 127.0.0.1 at 2008-10-14 18:53:56) [POST] | |
Parameters: {"user"=>{"terms_and_conditions"=>"1", "password_confirmation"=>"password", "gender"=>"", "year"=>"", "password"=>"password", "news"=>"1", "email"=>"[email protected]"}, "commit"=>"join the project", "action"=>"create", "controller"=>"users"} | |
[4;35;1mSQL (0.000238)[0m [0mSELECT `email` FROM `users` WHERE (`users`.email = '[email protected]') [0m | |
[4;36;1mSQL (0.000130)[0m [0;1mSELECT `email` FROM `users` WHERE (`users`.email = '[email protected]') [0m | |
[4;35;1mUser Create (0.000205)[0m [0mINSERT INTO `users` (`salt`, `questions_count`, `updated_at`, `dob`, `crypted_password`, `state_password`, `gender`, `responses_count`, `multipurpose_code`, `email_verified_at`, `year`, `state_email`, `display_name`, `login`, `email`, `created_at`, `news`) VALUES('c0d1e5cfdsa159229f753baf5b72dbb865e249e2', 0, '2008-10-14 22:53:56', NULL, 'c8398e31f1d73249902dfds273abf165da1559a0', 'known', '', 0, '9fd5aded6db6b8fps0b7ea9a3503 |
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
- fields_for @user do |f| | |
%label{:for => "email"} email | |
= f.text_field :email | |
= f.error_message_on :email | |
.password | |
%label{:for => "password"} password | |
= f.password_field :password |
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
map.resources :settings | |
settings.namespace do |setting| | |
setting.resources :units | |
setting.resources :groups | |
end | |
end | |
class Settings::Units < SettingsController | |
end | |
class Settings::Groups < SettingsController |
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
When %r{^'(.*?)' deletes his welcome email$} do |user_email| | |
to_remove = nil | |
ActionMailer::Base.deliveries.each do |email| | |
email_msg = email.to_s.gsub("=\n", '') | |
next unless email_msg =~ Regexp.new("To: #{user_email}") | |
if email_msg =~ /.*http:\/\/.*?(\/reset_password\/[\w]+).*/mi | |
to_remove = email | |
break | |
end | |
end |
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
class User < ActiveRecord::Base | |
# ... | |
attr_accessor :password, :password_confirmation | |
attr_accessible :login, :email, :password, :password_confirmation | |
state_machine :state_email, :initial => 'fresh' do | |
before_transition :to => 'unverified', :do => :make_email_verification_code | |
before_transition :to => 'verified', :do => :set_email_verified_attributes |
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
Feature: a user signing up # features/users/signup.feature | |
As a user | |
I want a smooth sign up process | |
So ... | |
Scenario: the user sees the form # features/users/signup.feature:7 | |
When the visitor goes to '/signup' # features/steps/general_steps.rb:49 | |
Then the visitor should see the signup form # features/steps/users/signup_steps.rb:1 | |
Scenario: a successful signup # features/users/signup.feature:11 |
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
class Post < ActiveRecord::Base | |
filter :active, :conditions => { :active => true } | |
filter :mine, lambda { |user_id| {:conditions => {:user_id => user_id}} } | |
sort :date_desc, :order => "date DESC" | |
sort :date_asc, :order => "date ASC" | |
end |
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
groups: | |
| id | data | | |
| 1 | foo | | |
| 2 | bar | | |
| 3 | baz | | |
memberships: | |
| id | group_id | user_id | |