Displaying 3 results from an estimated 3 matches for "cost_codes".
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.col...
2006 Aug 14
6
Testing fails with fixtures not when invoked directly
I have three files organization.rb, company.rb, and department.rb. I want
to ensure the department always has a company
require 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 =>
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-15-...