Displaying 20 results from an estimated 37 matches for "timesheet".
Did you mean:
timesheets
2006 Mar 28
2
Fastest way of adding " " around multiline text in RADRAILS
lets say i have the following SQL in my database editor :
When i paste it into rad rails i have to add quotes and the ''+'' symbol
to the end of each line. It is very tedious. What is the best method?
select timesheets.employee,
sum(items.hours) as hours,
sum(items.hours*timesheets.cost)
as cost,
sum(items.hours*timesheets.charge*decode(activities.chargetype,0,1,0))
as charge,
sum(items.hours*decode(activities.chargetype,0,1,0)) as chargehours
from timesheets, contacts, items, activities, employees, divisions
w...
2006 Aug 04
5
query across tables
I am trying to do things the proper rails way and use the auto generated
id to refernce other tables. Now I''ve hit a wall in trying to write a
query.
timesheets:
id, employee_id, code_id, ... values
codes:
id, job_number, code
How can I show just the timesheets that belong to a specific job?
I would need to check the codes table and look at the jobs, so I was
thinking of something like
Timesheet.find(:all, :order => "employee_id, code_id"...
2006 Mar 01
1
Eager loading problem. Help greately appreciated
Each Timesheet has an employee. An employee has a division and a
location.
I want to find all the timesheets with a status of 2. I then iterate
over the timesheet collection and print the timesheet name, employee
name, employee divison name, and employee location name. Like so:
for t in
Timesheet.find(:al...
2013 Mar 30
1
How to use group in nested associations
The below query fails:
Timesheet.joins(:time_entries).select("timesheets.*,
sum(time_entries.worktime) as total").group("timesheets.start_date")
The models have the following relations:
Timesheet < AR
has_many :activities, dependent: :destroy, inverse_of: :timesheet
has_many :time_entries, through: :a...
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-2006?, 8,8,0,0...
2006 Jan 19
2
select vs. select_tag
I have a "Users" object and
a "Timesheets" object. Each timesheet entry belongs to a User, which is
selected from a drop-down list. The timesheet has a user_id field. (The
user needs to have an option to select a different user due to the way
our system works.)
If i use the "select" object, which is bound to the Timesheet...
2006 May 03
1
Nubee Fixtures + Tests problem
According to the book, @timesheets["first_timesheet"] should be
accesible from within my functional test, but its not!
Timesheets.yml :
first_timesheet:
status: 2
start_date: 2006-04-24
cost: 10
employee: 444
id: 10683
charge: 20
My Test :
class AdminTimesheetsControllerTest < Test::Unit::TestCase
fi...
2013 Mar 04
2
accepts_nested_attributes: undefined method 'association'_attributes
I have 2 models Timesheet and TimeEntry:
class Timesheet < ActiveRecord::Base
attr_accessible :status, :user_id, :time_entries_attributes
has_many :time_entries, dependent: :destroy
accepts_nested_attributes_for :time_entries, :reject_if => proc {
|attributes| attributes[''worktime''].blank? }...
2006 Jul 31
1
Adding new rows to a db
I''ve created the following function, and for testing have hardcoded the
following values:
def addNewRow
@timesheet = Timesheet.find(:employee_id => ''1'',
:cost_code_id => ''14'',
:dept => ''007'',
:ending_date => ''2006-07-15'')...
2011 May 07
0
Rails opensource timesheet and project mgmt systems
HI All,
I need some open source timesheet management system for my
company.Anybody knows some rails open source timesheet and project
mgmt softwares? If so pls tell me. I really need them.Thanks in
Advance.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this...
2013 Mar 04
0
fields_for with accepts_nested_attributes: how to pass a value to a label
I can''t figure out how to pass a value from the following object build in
the controller:
class TimesheetsController < AC
...
def new
@timesheet = current_user.timesheets.new
now = Date.today
#generating 7 time entries: monday through sunday
(now.beginning_of_week..now.end_of_week).step { |date|
@timesheet.time_entries.build(:workdate; date)
end
end
...
In the Timesheet model I...
2007 May 16
2
very odd controller spec problem
Here''s a snippet:
it "should provide the fund" do
get(:timesheet,{:id=>@fund.id})
assigns[:fund].should == @fund
end
Works fine on my box, fails on my CI server. Here''s the output:
NoMethodError in ''The FundController timesheet should provide the fund''
You have a nil object when you didn''t expect it!
You might ha...
2013 Mar 25
1
validates presence of foreign key fails in nested form
I''m using accepts_nested_attributes as follows:
class Timesheet < ActiveRecord::Base
attr_accessible :status, :user_id, :start_date, :end_date,
:activities_attributes
has_many :activities, dependent: :destroy
has_many :time_entries, through: :activities
accepts_nested_attributes_for :activities, allow_destroy: true
end
class Activity < ActiveRec...
2006 May 08
10
Apache 2.2, ProxyPass and HTTPS
Hi all,
I''m currently trying to get Mongrel running my app whilst fronted by
apache 2.2 in a sub-directory via https. A bit convoluted I''ll grant
you but necessitated by existing systems.
The pertinent parts of my httpd.conf:
<VirtualHost 123.123.123.123:12345> #historic choice of random port number
DocumentRoot /var/www/admin
ServerName admin.example.com:12345
2007 Dec 02
0
New Rails App: iZepto Timesheets
The software consultancy that I work for has recently released a
timesheet/time tracking system written in Rails. It''s called iZepto
and we are very keen to get your feedback. You''ll find it at:
http://www.izepto.com
We initially wrote it for our own consultancy work (we weren''t happy
with what else was out there) but have now turned it into a...
2006 Feb 11
4
Timesheet application for Rails
Hi all,
I am looking for some time tracking software for our small company. Does
anyone knows if such project on rails exists? I need simple
functionality such as recording spent time for employees and managing
projects or tasks. Ideally, it would be possible to integrate it into
Instiki and to some existing database. There are some other solutions,
but it seems to me that RoR would be ideal
2005 Oct 17
4
How to send excel file to browser (spreadsheat 0.3.2)
...''
@headers[''Cache-Control''] = ''''
else
@headers[''Pragma''] = ''no-cache''
@headers[''Cache-Control''] = ''no-cache, must-revalidate''
end
send_data gen_excel, :filename => "timesheets.xls", :type =>
"application/vnd.ms-excel"
end
def gen_excel
wb = Excel.new("test/timesheets.xls")
version = Excel::VERSION
# Preferred way to add a format
f1 = wb.add_format(:color=>"black",:bold=>1,:italic=>true)
f2 = wb.add_format(:color=>...
2006 Mar 14
3
cascading eager loading patch not working in oracle
Notice the "AS" keyword appears many times. Oracle does not support this
keyword:
ActiveRecord::StatementInvalid: OCIError: ORA-00905: missing keyword:
SELECT tim
esheets.id AS t0_r0, timesheets.start_date AS t0_r1, timesheets.status
AS t0_r2,
timesheets.cost AS t0_r3, timesheets.charge AS t0_r4,
timesheets.employee AS t0
_r5, employees.id AS t1_r0, employees.name AS t1_r1,
employees.start_date AS t1_
r2, employees.cost AS t1_r3, employees.charge AS t1_r4,
employees.username AS t1......
2006 Oct 02
0
Retrieving value in controller - NoMethodError (undefined method `35=' for #<TimesheetItem:0x8ddda08>):
How can I retrieve the values in my controller for the text field
below? The "35" is the id of the item I want to update.
<input type="text" id="timesheet_item_35_work_category"
name="timesheet_item[35][work_category]" value="PROJECTS" />
My controller is:
def update
@timesheet = Timesheet.find(params[:id])
@timesheet.timesheet_items.build(params[:timesheet_item])
@timesheet.update_attributes(params[:timeshee...
2006 Feb 03
6
Go back to previous action
Hello all!
I have two views (list_1 and list_2) that show a list of users in two
different ways. In the views for these actions there is a link to edit a
specific user properties (edit_user). That works fine, except that when
I change the user I want to go back to the view that originated the
request and not to the default list (list_1).
Can anyone help me?
Best regards,
Hugo
--
Posted via