Displaying 20 results from an estimated 200 matches similar to: "Help with overriding / overwriting date values in ActiveRecord to accept Euro Style Date from a Textbox"
2006 Mar 23
5
validates_dateness_of ?
Hello all.
I don''t suppose some enterprising soul with much more skill than me has
whipped up a "validates_dateness_of" (Complete with leap year
calculations) method for use with all the other validation methods and
wishes to spread much much joy?
Cheers
Jeff "I can barely code RoR and rely on others to do the hard work"
Jones
--
Posted via
2006 May 16
4
Date/Time Quick Add
I am building a small app that reuires some clever text pattern
matching...
In my controller, I''ll have a string that I will want to parse out to a
datetime and a message, a la Google Calendar Quick Add.
Examples:
10/30/2006 7pm message
10-30-96 7:00 pm message
10/30/2006 19:00pm message
...
You see what I''m getting at. For a v1.0 release, I CAN publish some
standards for
2006 Jul 29
2
Cannot save Date field
Hi,
I have a table which has a column called due_date. Datatype of this
column in
mySQL is "Date". Here is what I extracted from schema.rb
> t.column "due_date", :date
My fixture tasks.yml file has the following line
> due_date: 07/17/2006
My test_task.rb has the following line
> assert_equal "07/17/2006", @task.due_date
When I run
2006 Jun 15
4
parse only seem to understand US date format
I''ve tried Time.parse() and DateTime.parse() but they interpret the date
as US format. Is there any way to tell it to interpret as dd/mm/yyyy?
--
Posted via http://www.ruby-forum.com/.
2009 Dec 30
1
make spotless, make and dosutil
checkout master:
dosutil/mdiskchk.com exists
make spotless:
dosutil/mdiskchk.com gets deleted
make:
make[1]: Entering directory `/syslinux-3.85-pre1-1-g769ee62/dosutil'
wcl -6 -osx -mt -bt=DOS -l=COM -c -fo=mdiskchk.obj mdiskchk.c
make[1]: wcl: Command not found
Time to revisit "Makefile: add DOS utilities as installables" ?
- Sebastian
2006 Jul 13
10
Book Question on RoR
Hi there,
I am a newbie and interested in learning Ruby on Rails. I see there are
2 books out there:
Ruby for Rails
Ruby techniques for Rails developers
David A. Black
and
Agile Web Development with Rails : A Pragmatic Guide (Pragmatic
Programmers)
Dave Thomas, David Heinemeier Hansson, Andreas Schwarz, and Thomas Fuchs
Which one should I get? "Agile Web Development with Rails"
2006 Jul 12
9
Instant Rails Screencast
I created a screencast showing how you can use Instant Rails to get a
fully functional Rails environment running on Windows in under 5
minutes.
Get started with Ruby on Rails in less than 5 minutes
http://mattgriffith.net/PermaLink.aspx?guid=97aa05b7-2e38-4c7d-b184-45ab2e2715b9
Right now the video is only available in Windows Media. Eventually there
will be a flash version available too.
2012 Mar 19
3
spaceship operator with a regex!?
Hi! Anyone knoe if it''s possible to realize resources with the spaceship
operator checking for regex equality?
Something like:
User<| group =~ /(qa|prod)/ |>
If not, anyone know of another way to do this sort of thing?
Thanks a lot!
Guy
--
You received this message because you are subscribed to the Google Groups "Puppet Users" group.
To post to this group, send
2006 Apr 09
6
Validating a DateTime
Hi,
Does anyone know of a method to validate a DateTime field?
I''ve looked at the validation docs and the validates_date /
validates_time plug-in but I can''t find a method to validate a value in
the format of yyyymmddhhmm. It seems like something that should exist
already, so I''d just like to check before I attempt my own version...
Cheers,
Mark
2006 Jul 31
1
validate date field
hi,
Below is an example of a text field I have, which works fine, until you
enter an invalid date such as Feb 31st, which doesn''t exist
Is there a way of checking this easily and returning an error message
like validates_presence_of does ?
<p><label for="project_client_deadline_date">Client Deadline
Date:</label><br/>
<%= date_select
2005 Feb 10
5
sample
I am trying to sample a subset from a matrix using sample.
The size of the matrix is 20X 1532. It works fine with this,
but when I transpose the matrix and try to sample it, it returns
null.
pick.set<-sample(tissue.exp.t,5,replace=FALSE,prob=NULL)
Is there something that I am missing here ?
Thanks ../Murli
2006 May 11
4
string to date/time?
Hey All,
Anyone know of a library for parsing "human" dates, like "this friday"
or "2 days ago"? I used to use strtotime in php, but starting from
here;
http://wiki.rubyonrails.com/rails/pages/PhpStrtotime
and doing lots of googling, I haven''t been able to find anything
similar for ruby. I know of javascript solutions to this, but I''d
need to do
2006 Jul 13
2
find_by_id(nil) does not always return nil
I have a model named User. When running this application from the
console I can call User.find_by_id(nil) and it returns nil. When running
this application during testing or through WEBrick or Mongrel calling
User.find_by_id(nil) returns the newest record in the database. But it
only does this the first time you call it with nil. The second time you
call User.find_by_id(nil) it returns nil.
2006 Jul 12
6
So what is REST? I don''t get how it fits in Rails
Does someone have an actual example of this? I saw DHH''s slides where
he said that you could have your app automatically respond with HTML,
XML, atom, whatever. So far I''ve found tons of discussion on REST and
CRUD in Rails, but I haven''t seen anything that actually shows me what
it all is. There''s simply_restful, which apparently makes things
easier...I
2007 Aug 12
4
Date and Time validator, updater
Can someone point me to a date/time validator or updater.
I have an event start datetime and an event end datetime. I want
to validate that the end datetime is after the start datetime.
Figure there is some code or library out there already, if you
know one, please forward it.
Thank you!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are
2006 Jun 05
5
Regexp - date validation
Can somebody tell me why the following RegExp doesn''t work for date
validation in Rails... It validates fine in RadRails -- using REgExp
panel. Intended format: (mm/dd/yyyy):
%r{^(0[1-9]|1[012])(-|/)(0[1-9]|[12][0-9]|3[01])(-|/)(19|20)([0-9][0-9])$}
If i try the following, it works in Rails:
%r{(0[1-9]|1[012])(-|/)(0[1-9]|[12][0-9]|3[01])}
When I add the last piece, it
2008 Dec 22
1
sgid bit set on ordinary files mounted via smbfs
Hi, I find that files (not directories) in an smbfs-mounted share always
have the sgid bit set. I've looked in the FAQ and HOWTO but didn't see
anything. I wonder if someone might suggest a way to fix it.
The share is served from Windows 2003 SP2 and mounted on a Fedora 10 Linux
machine (samba-client-3.2.5-0.23.fc10.i386) with this command line:
mount //wcl-fp1/shared /mnt/shared -t
2006 May 16
9
Date transform
hi all,
i want my users to enter a date in "ddmmyyyy" format, do someone know
how may i transform it in "yyyy-mm-dd" in the controler before i add it
to the base please?
thks
irong
--
Posted via http://www.ruby-forum.com/.
2014 Jun 24
3
[PATCH 1/2] Drop dosutil/mdiskchk.com
A prebuilt binary. Needs non-free Watcom compiler to build.
Signed-off-by: Lubomir Rintel <lkundrak at v3.sk>
---
dosutil/mdiskchk.com | Bin 8106 -> 0 bytes
1 file changed, 0 insertions(+), 0 deletions(-)
delete mode 100644 dosutil/mdiskchk.com
diff --git a/dosutil/mdiskchk.com b/dosutil/mdiskchk.com
deleted file mode 100644
index
2006 Mar 10
19
validates_date plugin for ActiveRecord
This plugin gives ActiveRecord the ability to do stricter date checking.
Example:
class Person < ActiveRecord::Base
validates_date :date_of_birth
end
This will ensure that date_of_birth is a *valid* date. The date can be set
initially as a string in any of the following formats:
"2006-01-01"
"1 Jan 06", or "1 Jan 2006"
"1/1/06" # Day /