similar to: Easy created_at/created_on question

Displaying 20 results from an estimated 3000 matches similar to: "Easy created_at/created_on question"

2005 Dec 19
3
created_on, created_at defaulting to 2000/01/01 00:00:00
Hello all, Rails 1.0.0 created_on is being set to 2000/01/01 00:00:00 Any ideas on this ? Thanks! Schema is create table user_login_history ( id int identity(1,1) not null, user_id int not null, created_on datetime default(getdate()) not null, created_at datetime default(getdate()) not null, updated_on datetime default(getdate()) not null, constraint pk_user_login_history primary key clustered
2005 Dec 27
3
created_on & updated_on - helper to display date only
All, My initial list is rather busy. I would like to shorten the created_on and updated_on fields to just display the date, not the time. Best wold be a simple 12/28/05 type of presentation. I''ve found the format helpers in rdoc. (ie. distance_of_time_in_words_to_now ), but none seem to be what I''m looking for. How do I control the date format of a timestamp field? Thanks
2006 May 24
1
AR many-many join tables - can they have created_on, updated_on ?
Hello all, I''m creating a many-many join table between ''homes'' and ''users''. Can it contain created_on? will AR update created_on, updated_on on this table? CREATE homes_users ( home_id int not null, user_id int not null, created_on datetime null, updated_on datetime null ) Thanks for your advice! -- ------------------------------ Apple MacBook.
2007 Mar 17
4
Created_on and updated_on in a non-ActiveRecord model
Hi you all, I have a model simulating an ActiveRecord model, according to the tips stated in [1]. It is simulated because even though I am gonna save the attributes in a file, not in a DB, I still want the validations made by ActiveRecord::Base (see code below). Well, the thing is that I also want the behaviour of the created_on and updated_on columns, that get modified automatically before
2007 Mar 13
6
Easy Date question - newb
All I want to do is find the objects that were created today under the ''created_on'' column. I''ve tried many ways, here is one example using the chronic gem. @products = Product.find_all_by_created_on(Chronic.parse(''today'')) I must be missing something right in front of me .... Thanks for any help.
2006 Mar 17
3
RoR problems with Created_At and PostgreSQL
So, I wrote some pages which essentially created some articles which are saved to a database, which also include both the "magic" rows ''created_at'' and ''updated_at''. Now, on my development machine I''m running the MySQL-database and everything worked as I wanted it to. On the live server I''ve had to switch to PostgreSQL 8.1 due to
2006 Jul 05
1
created_on in HABTM table getting parent dates
All of my HABTM tables receive the parent created_on/last_update_on dates whenever a record is inserted into these join tables. I don''t have any defaults in the database or anything else populating these tables. I assumed rails would populate these automagically. Is there something that needs to be done to get this to populate with the correct current timestamp instead of
2006 Jul 05
3
override created_on column name
We are using Rails for a project that must integrate with a legacy database. Is there a way to get Rails to automatically set the timestamp for a column named something other created_on or updated_on ? Also, how does one manipulate the size of the database connection pool? Dennis Byrne -------------- next part -------------- An HTML attachment was scrubbed... URL:
2012 Jan 11
6
Generating unque patient IDs
Dear group, I am trying to prepare a NONMEM friendly dataset for population PK analysis. My patient IDs are 10 digit long and NONMEM is losing precison and rouding the last couple of digits. I need to generate unique Patient IDs fromt he current 10-digit IDs. Ihave total 250 subjects so I appreciate if anybody can suggest me a way to code this in R. Regards, Ayyappa [[alternative HTML
2005 Oct 03
2
interpolation using akima (PR#8174)
Full_Name: Jonathan Lees Version: 2.0.1 OS: linux-gnu Submission from: (NULL) (152.2.75.65) there is a problem with calculating the convex hull in 2-D interpolation using the codes interp fromt eh akima package: x =c(0.6505304, -1.1821562, -0.2600792, 0.7913716) y = c(1.0424226, 0.1754048, -1.4523334, 0.2349112) z = c(0.000, 3.042, 0.370, 0.122) EX = seq(from=min(x), to=max(x),
2019 Apr 04
2
Question of syslinux chainloading
So when you boot from only your hard drive attached, it is the primary and only drive. It loads the master boot record that load the NT Loader boot code that is then configured to load the operating system from the primary partition on the primary drive. When you boot from the USB drive, you make it the Primary drive. You then tell it to load the MBR fromt the secondary drive. The secondary
2009 May 07
2
[LLVMdev] obtaining IR for CellBE code
On Thu, May 7, 2009 at 10:12 PM, Eli Friedman <eli.friedman at gmail.com> wrote: > On Thu, May 7, 2009 at 9:25 AM, Kshitiz Garg <ksh.cseiitk at gmail.com> wrote: >>> Can you give a couple examples of error messages you're getting? >>  llvm-gcc -emit-llvm -S        -W -Wall -Winline -Wno-main  -I.  -I >> /opt/cell/sysroot/usr/spu/include -I >>
2010 Jan 19
1
read.table with special chars
Hi all, I am just starting with R and I have come across a problem which I guess it is easy to solve. I am reading a table with read.table function. This table contains chars which seem to be problematic when reading them such as "'" and "#", if I remove these characters fromt the table by hand the problem disappears. Otherwise, the whole table is not read, since reading
2006 Apr 10
1
random | in join statement with more than one :include
I have an ActiveRecord class that has several has_many,belongs_to, habtm, and the new has_many => :through relationships. Whenever I try a find(:all, :conditions => "some conds", :include [:relationship]) it works fine, but if I have find(:all, :conditions => "some conds", :include [:relationship, :other_relation]) it gets a sql error such as Mysql::Error: You
2006 Mar 26
5
How to write manage created_on and created_by via mixin?
Hi! Definite newbie here - I''m working through this like-hate relationship with Ruby and Rails right now... sometimes things work really well (like blobs seem to rock) but other times, I dunno! :-) Anyway, I''d like put in create and update user timestamps on all my primary domain tables and allow them to be updated automatically by ActiveRecord. Coming from Hibernate, I just
2006 Jun 11
2
Problem with Acts_As_Attachment
Hi, I have installed the acts_as_authenticated plugin from technoweenie, but when I run the tests I get an error (running windoze) -- create_table(:attachments, {:force=>true}) c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:21:in `require__'': no such file to load -- sqlite (MissingSourceFile) I found the require statement in test/abstract_unit.rb
2011 Nov 16
1
Checking if the VM has been created
I'm a Libvirt newbie and I'd really appreciate it if someone could answer my doubts. I'm using Libvirt's Java API. My doubts: 1.Currently, I'm able to create a VM on Ubuntu 11.04 using Libvirt functions domainCreateLinux() and domainDefineXML(). Apart fromt the boolean return status of these operations and running the virsh list command, is there any way to SSH in (login) to
2004 Aug 05
1
R interface to Python (in Windows)
I put a copy of R 1.8.1 for Windows on our FTP site at: ftp://ftp.odot.state.or.us/outgoing/Test/. It should be there for a few days before it gets deleted. Benjamin Stabler Transportation Planning Analysis Unit Oregon Department of Transportation 555 13th Street NE, Suite 2 Salem, OR 97301 Ph: 503-986-4104 -----Original Message----- From: Peter Wilkinson [mailto:pwilkinson at videotron.ca]
2006 Jul 14
1
Converting Date string to Time Object
Hi, I have MySQL model with created_on specified as :date. This means that the day the record was created on is stored in the database as a string like "2006-04-28". I want to be able output a something like "5 days ago". From looking in the API I''ve found "strftime" and "*distance_of_time_in_words*". Distance_of_time_in_words only accepts Time
2005 Mar 10
10
Some Basic Questions
Sorry I can''t access IRC from work so I hope you don''t mind me asking my newbie questions here: 1) I have the following code: @post = Post.find(@params[''id'']) @comments = Comment.find_all "post_id = #@params[''id'']", "created_on ASC" And I am have problems with the second line. I want to pass the id from my post to the