Displaying 20 results from an estimated 7000 matches similar to: "managing dates in forms"
2006 Jan 07
4
set date with date_select
when retreiving a date from a DATETIME field in a database, is there a
way to set the date to the value of the DB in the view? It seems to
always default to the current date...
if I have a field called birthdate in the users table and i do
@user = User.find(@params[:id])
in my view i have a <%= date_select ''birthdate'',''user'' %>
but dont know how to
2006 Feb 23
2
lighttpd and blank page
Hi all:
I have been using lighttpd on os x with RoR. It normally works great,
however, when I use it for one project, kill the process, then switch
to another project and start up using ./script/server, all I get is a
blank page. No errors or html. The only solution I have found so far
is to restart my machine, but that seems terribly inneficient. How
does everybody else handle this, or do you
2006 Jul 28
2
RJS + Internet Explorer
Hello all:
I am using RJS templates to replace html on my pages. It works great
in FF but I get an RJS error in Internet Explorer. I believe I had it
working previously in IE, but for some reason it''s not working now.
Any help would be greatly appreciated!
Thanks,
--
Randy Schmidt
x@altorg.com
267.334.6833
2006 Feb 20
1
extract month from date column
Hi,
I have this rails query:
@birthdays = Birthday.find :all,
:conditions => ["user_id = ? and
birthdate = ''2006-02-01'', @user_id],
:limit => @birthday_pages.items_per_page,
:offset => @birthday_pages.current.offset
You can ignore the user_id, limit and offset part.
2006 Feb 25
0
self referential habtm using join tables
All:
I have been working on making a self-referential habtm relationship
that uses a join model because I want to store info about the
relationship. I have been using two sections from Chad Fowler''s "Rails
Recipes" as a guide, "Self-referential Many-to-Many Relationships" and
"Many to Many Relationships Where the Relationship Itself has Data".
So far I have
2006 Feb 27
0
self-referential many-to-many using a join model
Hello!
I have been working on making a self-referential habtm relationship
that uses a join model because I want to store info about the
relationship. I have been using two sections from Chad Fowler''s "Rails
Recipes" as a guide, "Self-referential Many-to-Many Relationships" and
"Many to Many Relationships Where the Relationship Itself has Data".
So far I
2006 Feb 21
7
Self-referencial habtm relationship
Heyo!
I am setting up a self-referencial habtm relationship with the users
of my app. I am using Chad Fowler''s "Rails Recipes" to get me started,
and everything works great with the join table "people_friends". I add
friends by doing somebody.friends << somebodyelse. However, with my
app, there is an approval process so my join table has columns
person_id,
2006 Jul 31
7
Problem with routes when I move the app to a different machine
Hi all:
I have an application that runs great on my macbook pro, however, when
I move the app to the production linux box, all routes fail except for
the one I set up as the default:
map.connect '':controller/:action/:id'', :controller => "Employee",
:action => "status"
I made sure the shebang line in dispatch.* was set to be OS
independent
2006 Feb 22
5
svn externals and Edge Rails
Hi all:
I am considering using edge rails so I can use join tables. I want to
use svn:externals to manage edge rails, however I want to understand
it more before I go and set everything up. so everytime I commit my
app it will pull the most recent version of rails from the svn
repository, right? What if the current version of rails is unstable,
is there a way to rollback edgerails and NOT my app?
2006 Aug 11
4
date (age) validation
I have an application that requires users to be in a specific age group,
or above a certain age. For simplicity sake lets say they have to be at
least 18.
This is my most recent attempt to produce the desired result:
validates_exclusion_of :birthday, :in => Range.new(Date.today,
Date.parse( (18.years.ago).strftime(''%Y/%m/%d'') )),
:message => "does not meet
2006 Jan 04
5
How do I set the default value for date fields?
I want my date fields to default to NIL or "", because the presence of a
date means something. My problem is that rails is defaulting the fields
to today''s date automatically when I create a new record through the
scaffold. I tried removing the default ''0000-00-00'' and changing NOT
NULL to NULL, but both columns get today''s date as the default
2006 Jan 22
23
calculate users age
i know it''s probably really simple, how do i work out someone''s age if i
have their d.o.b. stored as a date in my db.
cheers
--
Posted via http://www.ruby-forum.com/.
2006 Jun 24
0
LightBox and Ajax Global Responders
Does anybody know where I could find how to use LightBox JS and an
animated gif in Ajax Global Responders? For at least a starting point?
Thanks!
--
Randy Schmidt
x@altorg.com
267.334.6833
2007 Sep 21
1
calculate age of a person and compare it
how can i calculate the age of a person using database " birth date"
my teble is user and column is bday ....
now i want to calculate the age will some one please tell me how can i
calculate the age..
actually i want to compare my two database fields birthdate and
joining date ......that is why i need this....
will someone please tell me how can i do that
2009 Feb 20
3
mean over previous cells
Dear RUsers,
I guess this is an easy question for someone a little familiar with
programming...(which I am not)...
I've got 2 colummns, one shows just dates(SST_date, Class 'Date' num), the
other one shows the SeaSurfaceTemperature (SST, num) at that certain date.
SST_date SST
2008-01-01 22.2
2008-01-02 21.8
2008-01-03 22.8
2008-01-04 22.9
2008-01-05 23.1
2008-01-06 23.2
...
2006 Feb 21
26
Net::SMS::BulkSMS 0.1
This is the first release of a new Ruby library for the
www.bulksms.co.ukAPI which should allow simple integration of SMS
functionality into your
Ruby or Rails apps.
Sending a message is as simple as:
@service = Service.new(''username'', ''password'')
@service.send_message(''This is my message!'', ''4479123456789'')
# whats my
2006 Feb 21
3
Images directory
I have a template. In this template i refer to images by using <img
src="images/image.gif">. I putted the images in the public/images
folder. This works only for the base url, e.g.
http://localhost:3000/category. When i make a new category like
http://localhost:3000/category/new, the images arent displayed. When i
go to the source of the page, and look to the image url it says
2006 Jan 19
2
date_select broken
I am using date_select and in some instances it only shows about 10
years worth of choices. Same form on other users shows the whole
range. date_select looks like this
<%= date_select ''user'',''birthdate'' , :start_year => 1940 %>
I would expect to always see 1940-2006 or so , but i dont always do.
Is there a way to force the range or explain why i
2008 Jan 12
2
Problems with date field
Hi, I''m creating a date type field to put birthdate, but the years on
this field only go to 2003, what should I do??
--~--~---------~--~----~------------~-------~--~----~
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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To
2010 Dec 04
7
Error loading mfc42.dll - failed (error c000007b)
:D Hi,
I installed wine on ubuntu 10.10 to run a windows program as reported here (http://appdb.winehq.org/objectManager.php?sClass=version&iId=22133&iTestingId=59338).
After few trails I decided to reinstall Wine (now version 1.3.8 ), to configure it as instructed by the guide, and than to install again the windows application, Birthday Reminder.
At present the application doesn't