Skip to content

Instantly share code, notes, and snippets.

@osiro
Created October 30, 2014 02:38
Show Gist options
  • Select an option

  • Save osiro/d8a270263e12fe7b7929 to your computer and use it in GitHub Desktop.

Select an option

Save osiro/d8a270263e12fe7b7929 to your computer and use it in GitHub Desktop.
e = FactoryGirl.build_stubbed(:employee_profile)
=> #<EmployeeProfile id: 1012, user_id: 1010, joined_at: "2006-10-30", terminated_at: "2014-10-28", status: "F", base_hours_per_week: #<BigDecimal:101675550,'0.8070517643 283242E1',27(45)>, clinic_id: 1011, employee_position_id: 1007, modality_id: 1008, leave_group_id: 1009, exec_staff_wages: "Administration", created_at: nil, updated_at: nil>
e.persisted?
=> true
e.user
=> #<User id: 1010, email: "[email protected]", encrypted_password: "$2a$10$kXLvkcy5u9biitZZ94lbs.WA2KEVMaQb2D5dtBZTmgns...", sign_in_count: 0, current_sign_in_at: nil, last_sign_in_at: nil, current_sign_in_ip: nil, last_sign_in_ip: nil, created_at: nil, updated_at: nil, archived: false, job_type_id: nil, full_name: "Aiden Mitchell", supervisor_id: nil, username: "2austen_osinski", role_id: 3, job_type: nil, time_format: "12">
e.user.persisted?
=> true
EmployeeProfile.find_by(id: 1012)
=> nil
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment