search for: cost_cod

Displaying 3 results from an estimated 3 matches for "cost_cod".

Did you mean: cost_code
2006 Jul 10
3
Problem with migrations
...d other minor tweaks it just does not work. I am connected to the db, the first table does get filled out. Any help is appreciated! Here is what I''ve done so far: >ruby script\generate model employees >ruby script\generate migration add_employee_data >ruby script\generate model cost_codes >ruby script\generate migration add_cost_code_data Then inside the first 3 migrations everything goes ok - 001 class CreateEmployees < ActiveRecord::Migration def self.up create_table :employees do |t| t.column :employee_number, :integer t.column :name, :string t.c...
2006 Aug 14
6
Testing fails with fixtures not when invoked directly
...e File.dirname(__FILE__) + ''/../test_helper'' class OrganizationTest < Test::Unit::TestCase fixtures :organizations def setup @smo = organizations(:smo) end def test_department_company_defaults_to_parent org = Department.new(:name => ''company'',:cost_code => ''123'', :parent_id => organizations(:root_dept)) assert org.valid? assert org.company_id = organizations(:root_dept).company_id end end This fails when loading the fixtures file from rake but works if I do the test by itself ruby test/unit/test_organization.r...
2006 Jul 12
6
Showing rows on a page
This is my first rails program and I?m having trouble figuring out how to show rows on the page when there may not be rows in the database. There are 3 tables, employees, cost_codes and timesheet, I will simplify them when describing them later on. When an employee logs in, I would like to pull up their timesheet, which should consist of one row per cost code. So timesheet would look a little like: (timesheets) Name, Cost Code, Ending Date, M,T,W,Th,F Bob, 11701, ?7-1...