Displaying 20 results from an estimated 10000 matches similar to: "date validation"
2005 Mar 09
21
Converting time retrieved from MySQL
I''m having a problem converting a date retrieved from my MySQL database
and I''m hoping someone can help.
MySQL stores the date/time as this:
2005-03-08 17:00:34.0
and according to my Pickaxe book Ruby stores times as "the number of
seconds and microseconds since [...] January 1, 1970". All well and good.
Unfortunately, RoR is converting my date to this:
2005 Mar 10
6
problems with ActionMailer
I''m having some problems with ActionMailer and I''m hoping that someone can
help. I''ve followed the tutorial on "How To Send Emails With Action
Mailer" <URL:
http://wiki.rubyonrails.com/rails/show/HowToSendEmailsWithActionMailer >,
I''ve generated a mailer -- "notifier.rb" -- and I''ve added the following
method to the
2007 Jun 22
2
problem with AR and 'virtual' multiparameter attributes.
Hello,
I have a model which I would like to have a ''virtual'' date column.
This column wouldn''t exist in the database, but would exist for
validation, etc. The data would be provided in the form of a
date_select in the view. This produces a multiparameter attribute. My
problem is that the ''execute_callstack_for_multiparameter_attributes''
method in
2005 Mar 31
5
Outputting XHTML strict
I''m trying to get a page to validate as XHTML Strict, and I''ve gotten
everything fixed except for one <textarea> that Rails is generating.
<textarea cols="40" id="estcomment_comment" name="estcomment[comment]"
rows="10" wrap="virtual"></textarea>
This tag is being called in my view with
<%=
2006 Jan 05
13
Date Validation
Hi,
How can I validate date in model class
Thanks.
Sainaba.
--
Posted via http://www.ruby-forum.com/.
2005 Dec 15
1
date_select help
I''m trying to select items from a database by their date field. The date
data is coming from a form using the date_select helper.
The field in the database is named date_notified_on.
My controller method is this:
def history_date
if(@params)
@notifications = Notification.find(:all, :conditions =>
["date_notified_on = ?",
2006 May 29
1
validation in a "subform"
I''ve been following the rails/osx tutorial at
http://developer.apple.com/tools/rubyonrails.html
This develops a simple application with expenses and accounts.
Near the end of the tutorial, there is a view which allows expenses to
be added to an account.
This view has the "parent" @account rendered, then iterates throught
@account.expenses to display the existing accounts,
2006 Jun 16
3
finding out about options
I''ve been to the RoR api docs trying to find out
about options for various methods (mostly for
select helper methods), yet I find no listing of
options even when the method described says
that it takes options. How
can I find out what are valid
options say for a date_select tag?
Thanks,
Dave
2005 Mar 10
4
error messages, loops and saves, actionmailer and finaly authentication
Thanks to everyone who responded to my first set of questions. Not only did I
get my questions answered but I improved my code and learned a couple new
things.
I think I prefer the mailing list over IRC... easier to follow :-)
I have some more questions if you don''t mind. Some are Rails related and some
are Ruby related.
1) This is concerning displaying error messages. I am assuming
2006 Mar 02
6
Newb question about facade columns
Hello,
I am trying to deal with a database table that contains a date in the
form of the number of seconds since epoch. Data is inserted in this
format by an existing script that I can''t change, so a schema change
isn''t realistic.
I would like to allow humans to view and edit this data in the form of
an actual human-readable date. I figured a facade column would be the
2006 Jul 26
1
Plz answer my query in date_select
hello gentlemen
I want to set my (default)own date in date_select, how to do this, plz
explain with example
advance thx
have a nice day
regards
narayana
--
Posted via http://www.ruby-forum.com/.
2006 Jun 22
18
Ruby on Rails Live CD
I''m pleased to announce the initial release of the new Ruby on Rails
LiveCD Linux Distribution. http://www.railslivecd.org
The RailsLiveCD offers most of what an average Rails developer needs
right out of the box! That includes :
Ruby 1.8.4
Rails 1.1.2
Capistrano 1.1.0
Mongrel 0.3.13
Rake 0.7.1
Subversion
MySQL 4.1.12
MySQL Administrator
RadRails
KDevelop
Kate
and many many others!
2006 Apr 24
4
[TIP] Ensure your test data is valid
Recently I wanted to check that my test data was valid. Seems like a
reasonable thing to want to do so I thought I''d share the rake task. Add
this code to a rake file in lib/tasks and run with rake
db:fixtures:validate. It will print out the class, record id and error
messages for any model objects that fail validation.
Enjoy!
-Jonathan.
--
namespace :db do
namespace :fixtures do
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
2006 May 30
3
Current process for tickets
This afternoon I was looking at the tickets posted in Trac, and I saw
that there we quite a few stale tickets and patches. A lot of these
are filed against very old versions of Rails, I think it''s fair for
the people posting these tickets that they get resolved. Either by
just removing them all or by weeding them out.
I understand that closing tickets is not very glamorous work
2005 Feb 15
5
date_select where to add "class"=>"something"
Hi,
I''ve looked on api.rubyonrails.org but I''ve not found how to add to a
date_select(object, method, options = {}) a class option to set the
class of all the select tags.
I''ve tried using "class" => "myclass" in thoose ways:
<%= date_select("costo", "data", "class" => "testo" ) %>
<%=
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
2006 Feb 08
6
can''t get date_select to work
Hi,
I render a couple of date_select fields, the HTML looks fine, I can
see the values submitted back to the server, but AR doesn''t pick them
up from the hash in Booking.new(params[''booking'']).
I''ve got a ''booking'' object with parameters product, startdate and
enddate.
HTML snippets:
<select
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
2007 Jun 13
3
date_select css options
Just looked at the Date helper in the rails API and noticed that none
of the functions there (i.e. date_select) allow me to specify html
options (i.e. class) for the generated selects.
I was wondering how do other group members css format date select
dropdowns?
Best,
Gabor
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google