search for: start_dates

Displaying 20 results from an estimated 91 matches for "start_dates".

Did you mean: start_date
2006 Jun 21
3
Simple range question
I have a model with a datetime field called start_date. I''d like to do a find on the model so that it returns only records with the start_date equal to the current day. Something like this: @foos = Foo.find(:all, :conditions => //?? start_date equal to today''s date ??// ] ) Thanks in advance for any help. -------------- next part
2006 Feb 28
5
Problem with paginate, include and foreign keys
Hi all, Solaris 10 Ruby 1.8.4 Rails 1.0.0 Postgres 8.1 postgres driver 0.7.1 I''m having a problem with getting paginate() to properly pick up an FK constraint properly. I don''t seem to have this issue with ActiveRecord, however. Consider: create table start_dates ( id bigserial, start_date date unique, max_slots int default 40, primary key (id) ); create table schedules ( id bigserial, start_date_id int, ... foreign key (start_date_id) references start_dates (id), primary key (id) ); class StartDate < Ac...
2007 Jul 08
2
datetime_select, is creating an instance of the Time class
Hello It seems that datetime_select, is creating an instance of the Time class. Why would that be? I found this while building a site where people can create vigils (prayer vigils, peace vigils, etc). When I added a validation method that compared start_date to created_at, it generated the error: ArgumentError (comparison of Time with DateTime failed): I was able to put a breakpoint in the
2006 Feb 28
1
Working with date_select ...
I am a little confused about the best way to work with date_select. I see that in my views it generates a simple input form that allows for the entry of year, month and date information. If I just leave it at that, great! But what if now in the controller, I want to work with the date information. I actually want to take the user input date and compute a new date some number of days in the
2006 Apr 15
2
Multi-parameter assignment
Hi, I''m trying to submit data from text boxes on a form to one variable in my controller, in the same way that datetime_select has date(1i), date(2i), etc for day, month, year, etc... I''ve named my variables event[start_date(1i)] event[start_date(2i)] and event[start_date(3i)] but this doesn''t seem to work and event[:start_date] is blank ... any pointers would be
2007 Apr 09
1
help with ActiveRecord joins
I''m working on a fairly complex join query and could use a bit of advice from more expert users of ActiveRecord. I have an events table with quite a lot of data, with has_many relations to categories, age_groups, and event_images. In my first naive implementation, each event had a date, so to load all upcoming events efficiently, I''d do: Event.find(:all,
2007 Sep 11
2
How to search with range when I am using AAF
acts_as_ferret :fields => { :name => {:}, :desc => {}, :start_date => {} } def start_date self.start_datetime.strftime("%Y%m%d") end Now that I am strong start_date in YYYYMMDD format, I want to search for all event in between 20070506 and 20070809 What will my query look like when I am using aaf. This one doesn''t work
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,
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: :activities accepts_nested_attributes_for :activities,
2011 Apr 20
3
[test message] Can R replicate this data manipulation in SAS?
Apologies for troubling the list, but it is a test that needs to be carried out. I am resending the message that I sent earlier on behalf of Paul Miller, but with a certain word used in the variables names of the SAS code changed to a different word. With thanks for your tolerance ... Ted. [*** PLEASE NOTE: I am sending this message on behalf of Paul Miller: Paul Miller <pjmiller_57 at
2013 Jan 29
2
Count entries in postgresql grouped by date
Hi! I have a table with visits with a visited_at: attribute which is a datetime field. They seem to be stored as UTC. Now I want to count all visits each day and return something like: { 2013-01-01: 8, 2013-01-02: 4, 2013-01-07: 9, ... } So, I did it like this which kind of works...: def self.total_grouped_by_day(start_date, end_date) visits = where(visited_at:
2010 Jun 08
2
type conversion with apply or not
Folks, i thought it should be straightforward but after a few hours poking around, I decided it's best to post my question on this list. I have a data frame consisting of a (large) number of date columns, which are read in from a csv file as character string. I want to convert them to Date type. Following is an example, where the first column is of integer type, while the rest are type
2007 Jun 19
5
Problems translating should_render from 0.8.2 to 1.0.5
<font size="2">I''m working on a large Rails site and we want to move from RSpec 0.8.2 to the latest and greatest.&nbsp; So we ran the translator and yet we''re having a lot of trouble translating should_render.<br><br>I found this on the web:<br><br>We will NOT be supporting the following in the new syntax:<br>&nbsp;
2008 Jun 24
10
Question on passing arguments inside a view.
I''m running into an issue undefined local variable or method `directoryid'' for #<EditorialsController:0x23f1bf8> I have two Models on a legacy database and only one controller called editorials with two actions index and display. I''m trying to pass in a parameter from the results of my search and getting the above error. Example: two tables one is editorial the
2004 Nov 08
2
Matrix Indexing
Hi, I have the following problem. In a csv file I have under column A, the date, and column B, the prices. Thus, for example, the file looks something like this -> 1/31/04 2.5 2/1/04 2.6 ... 4/12/04 3.5 Basically, I use the function inputframe = read.csv( ) which reads the csv file into the inputframe. My question is, how can I make a function that has, as inputs,
2012 Oct 12
1
Adding Time when Blanks
Greetings, My data set has dates and times that I am working with. Some of the times in Time_of_end are blank. This is supposed to dictate that the particular experiment lasted 48 hours. I would like to add 48 hours to the start Start_of_Experiment for another column as End_of_Experiment including both the ones with 48 added and those with early times. I was thinking something with a
2006 Mar 13
0
Pagination attributes
I have created a pagination with my own conditions : @timesheets_pages = Paginator.new self, count, 30, @params[''page''] @timesheets = Timesheet.find :all,:include =>{:employee=>[:location,:division]}, :conditions => ["employees.location=? and employees.division=? and start_date>? and end_date < ?
2008 Nov 11
1
Every other week recurring event
I have the code for computing a weekly event: (start_date..end_date).select{|d| d.wday == wday} but I am wondering if anyone has any ideas for using this to figure out a recurring event for every other week. Is it possible to somehow specify every other within the .select method? Any other implementation ideas? --~--~---------~--~----~------------~-------~--~----~ You received this message
2007 Jan 16
1
Can't pass parameters to Ziya controller using url_for
Hi All, I''m stuck yet again. I have an action on a controller that produces a Ziya graph, which I call using the gen_chart() helper. However, I can''t seem to pass more than one parameter through to the action. <%= gen_chart( "overview_graph", url_for( :controller => ''graph'', :action => ''graph'', :graph_id =>
2009 Jan 27
1
Creating list or numeric vectors out of selected columns of row oriented data
I am just assuming this can be done, but I have not gotten close to making it happen. I have a data file with about 1 million rows with 1470 unique subjects. Each row represents a small set of observations made on a specific date for a single subject. I would like to transform the data so that I have an R object with a single entry for each subject and start date and vectors for the