Displaying 20 results from an estimated 300 matches similar to: "time date stamp since, january 1st 1970"
2011 Jul 11
2
Pre-populating association
Hello,
I think this is an easy one for the average Rails developer but I''m a bit stuck.
I''m creating a simple voting app: any user can create a survey, with any number of questions, and other users can then vote by creating a ballot for that survey.
Here''s the modeling:
class Survey < ActiveRecord::Base
has_many :questions
has_many :eligibilities
has_many
2007 Sep 23
9
Code reviews: my dumb use of acts_as_commentable (newbie)
With the help of several heroes here yesterday I beat my way into a
working solution to adding comments to one or more models in my
application using acts_as_comentable. Great plugin, but my
implementation is lame. I need enlightenment.
I have users who log in. For several views I want to let them add
comments. Enter act_as_commentable which does just this -- it''s
polymorphic, so you
2010 Nov 16
6
rails 3.0.3 and visit_CoercibleString errors
From having no errors with 3.0.2 I now see lots of these errors when
running my tests.
undefined method `visit_CoercibleString'' for #<Arel::Visitors::MySQL:
0x000001074f4298>
Anyone know what this is?
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to
2006 Jul 01
4
Radio_button in loop problem
Hi all, I can''t figure out why my radio_buttons won''t reflect the values
stored in my database. I read through some of the previous posts -- is
it true that they don''t work with integers?
This is the code I''m using:
<% for question in @survey.questions %>
<%= debug question %>
<%= radio_button ( "question", :question_id,
2005 Jul 12
4
Calculation of group summaries
I know R has a steep learning curve, but from where I stand the slope
looks like a sheer cliff. I'm pawing through the available docs and
have come across examples which come close to what I want but are
proving difficult for me to modify for my use.
Calculating simple group means is fairly straight forward:
data(PlantGrowth)
attach(PlantGrowth)
stack(mean(unstack(PlantGrowth)))
2005 Nov 25
2
acts_as_list with 2 fields in the scope
Hi Railers,
I''ve got a Categories table.
I want it to act as a list within the scope of the parent_id AND the
site_id.
Categories table :
id
label
site_id
parent_id
So, in my Category class, I have :
acts_as_list :scope => ''site_id = #{site_id} AND parent_id = #
{parent_id}''
The problem is that when I try to move_up a Category with a parent_id
that is null,
2008 Oct 16
1
merge/combine data
Hi,
I have the following data imported from a csv file
user_id site_id name
1 1 11 februari
2 1 11 redbook
3 1 11 tips
7 3 6 sleep
8 3 6 monitoring
9 3 6 alarm
Which I would like to merge/combine into
user_id site_id name
1 1 11 februari,
2010 Feb 20
1
Contingency Table - output to odfWeave not working for matrix
Hi guys I'm hoping someone can help me with this. It should be easy but it seems to get stuck for no obvious reason! I am trying to set a report up in odfWeave so that we can re-run the same analysis at 3 time points as the data matures and provide an 'instant' report.
To simplify the situation we have two pieces of data: site_id (numerical value 1-9) and reaction (categorical Y or
2008 Sep 19
0
validates_uniqueness_of: passing a method to :scope
I was wondering if anybody knows an easy way to pass a method name as
the scope option to a validates_uniqueness_of validation on a AR model?
For example, I have nested models a bit like:
class Survey
has_many :areas
end
class Area
belongs_to :survey
has_many :questions, :order => ''position''
validates_uniqueness_of :position, :scope => : survey_id
end
class
2010 Jan 20
0
putting labels back on a matrix.
I did not post this question to the ecology list, even though it is about an analysis using Vegan, since my question is based more on basic data manipulation in R. I think this is a fairly simple question but for the life of me I cannot find a reference for in the archives.
I have an analysis using a matrix in which I needed to strip the ID variable off the input data to run the analysis. Now I
2006 Apr 19
4
Weird Problem - probably a noob mistake
I was up late last night trying to find the cause of this, but I''m
stumped.
I have this relatively simple controller to load up a bio. It''s basicly
id, name, desc, type (I use STI).
class BioController < ApplicationController
layout ''layouts/singlepanel''
def index
@bio = Bio.find(:all, :conditions => [''site_id = ?'',
2006 Jul 29
0
Accessing vars within helpers in Markaby
I''ve been trying to figure out how to do this:
select_tag ''site_id'',
@helpers.options_from_collection_for_select(Site.find(:all,
:order=>''name''), ''id'', ''name'', @site_id)
The select_tag gets output fine, but the default value
isn''t set. @site_id is set in the controller (@site_id
= cookies[:site_id]). In
2006 May 25
11
belongs_to confusion and some other questions - thanks!
Hello all,
Thanks for the help in advance, I am having some trouble with
belongs_to, and I caint seem to figure it out.
I have two tables, one called ''pow_users'' and one is called ''pow_site''
pow_users has a field called site that has the site ID for primary id in
the pow_site'' table.
the pow_site table setup as the Site class with the following:
2006 May 23
7
self-referencing has_many
Having a devil of a time finding records in a self-referencing has_many
table relationship.
Everything is working find looking at the has_many and the belongs_to
relationship.
But, when I try to find all "orphans", records that are neither a parent
nor a child, I can not find a query that work in ActiveRecord.
This query works in MySQL:
SELECT * FROM templates
LEFT JOIN templates
2007 Oct 25
2
Cronjob script with date stamp?
I have a cron job that calls a shell script - the script invokes dump.
I'd like to do two things:
- Have the script dump the results of the job to a text file. I tried
this with /path/to/dump my switches -v >> /home/me/dump.log
But that just produced an empty file.
- Have the dump file be date-stamped with the date it was executed. Right
now, I manually edit the script to change
2005 May 19
1
Is the "tcp time stamp validation issue" fixed in 5.4?
Hello
I'm a bit confused about the "tcp time stamp validation bug" mentioned
in the http://www.kb.cert.org/vuls/id/637934 advisory. FreeBSD has fixed
this issue in -current (2005-04-10) and in RELENG_5 (2005-04-19).
Is this also already fixed in 5.4? The CVS ID for tcp_input.c does not
look like this. But I'm not sure.
Regards,
Thomas
2008 Mar 06
1
Re: cifs verses smbfs for Linux clients -time stamp issue
After mounting a windows share via cifs I have came across the same
issue as described here:
http://lists.samba.org/archive/samba/2006-April/119813.html
"While using vim on files mounted under CIFS, when trying to write an
existing file you will randomly be warned "The file has been changed
since reading it!!!". Normally, this only occurs when another user
accesses and saves the
2004 Nov 18
3
date/time stamp
Hi
?Is there any way to reproduce the FTP behavior with Samba 3?
The desired effect is not to respect timestamps from Windows files and
just create them with Samba server date/time stamp when we drag/drop,
copy/paste, cut/paste, old files to a disk share.
We are replacing an FTP server with Samba3, so far it's doing great job,
but this effect is needed (don't ask why please, app
2000 Apr 26
0
time stamp changes of powerpoint file
We are running samba 2.06 on HP/UX 11.00.
I have a powerpoint file on a samba share. If I access this powerpoint file on a NT 4 system,
the time stamp of the powerpoint file gets changed, even when
nothing of the file is changed.
Does anybody know how to solve this problem,
Regards,
1999 Apr 16
1
stamp function in R
Dear R experts,
currently I'm converting a bit of trivial
Splus code to R.
In Splus I came across the stamp function.
Does R have something similar?
Thank you very much for your time.
Ananke
P.S.: Keep up the good work on R.
It's great!
HotBot - Search smarter.
http://www.hotbot.com
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-help mailing list --