similar to: [Error] Using validates_presence_of for datetime field causes parse error?

Displaying 20 results from an estimated 200 matches similar to: "[Error] Using validates_presence_of for datetime field causes parse error?"

2005 Mar 10
0
Need Help with Flaky FastCGI on Windows
Hi Everyone - I have a rails 0.10.1 application deployed on a Windows 2003 server under XAMPP Lite 1.4.12. Running under CGI, the application works fine (a bit slow, obviously, but no problems). When I run under FastCGI, the app is fine until I leave it alone for a few hours. For example, last night I switched it to FastCGI and everything seemed to be working fine. When I woke up this
2005 Feb 07
0
Trying to Seed Maybe Bug?
Hi, trying to get rubytorrent to act as a seeder. I''m instantiation the RubyTorrent::Bittorrent with a pre-created MetaInfo object... bt = RubyTorrent::BitTorrent.new(dtorrent.metainfo) bt.on_event(self, :tracker_connected) { |s, url| puts "[tracker] connected to tracker #{url}" } I will attack the test file (just some random strings in a file) and the torrent that was
2011 Jul 05
0
Problem in accessing bucket of my AWS S3 account
I tried to establish connection to my aws s3 account like this in my irb console - AWS::S3::Base.establish_connection!(:access_key_id => ''my access key'', :secret_access_key => ''my secret key'', :server => " s3-ap-southeast-1.amazonaws.com") And it works well and prompt this - => #<AWS::S3::Connection:0x8cd86d0
2006 Aug 10
4
I need "validates_presence_of" help
Hi - I have 3 fileds a user can fill out. They can fill out 2 of them or just one of them, for example. fill out these 2 fields: Field1 and Field2 Or fill out this field: Field3 In my model how do I use validates_presence_of for Field1 and Field2 or just Field3. I want to do something like this: validates_presence_of Field1, Field2 OR validates_presence_of Field3 So the user can fill out
2005 Jan 12
2
Extending metainfo class
Hi, I`ve still posted this comment on comp.lang.ruby and after that I found this list ;) I`ve had some problems with a .torrent file because of unknown fields. The file was created with: BitComet/0.56 So, I extended the metainfo class like this: -- Andreas Index: rubytorrent/rubytorrent/metainfo.rb =================================================================== RCS file:
2005 Feb 28
5
Using session data in model
Hi, I want to use my some session data when I validate som data in the model. The specific problem I have is that I present different forms data based on gender, and then dependent of the gender, there''s different fields that needs validation. I''m wondering what''s the preffered way of doing this. The session data is not present in the model, i.e: class Myclass
2005 Dec 29
0
strange output in http header
Hi there, I''m experiencing something strange in rails http headers. The response comes back as text/plain. The http header looks like this: HTTP/1.1 200 OK Date: Thu, 29 Dec 2005 15:18:18 GMT Server: Apache/2.0.54 (Debian GNU/Linux) PHP/4.3.10-16 mod_ruby/1.2.4 Ruby/1.8.4(2005-10-29) #<#<Class: 0x40a7f818>:0x40a7f778>Content-Type: text/html Cache-Control: no-cache
2006 Feb 21
8
Validations continued
I simply can''t figure this out. I have been reading and re-reading Agile book and wiki.rubyonrails.org - all sorts of validation methods and still, it doesn''t work. Controller code def create @client = Client.new(params[:client]) if @client.save! flash[:notice] = ''Client was successfully created.'' redirect_to :action =>
2006 Jul 07
5
link_to: link is missing id
I''m using a legacy table, where the unique id is not ''id'' I have a Model class like the following: class Article < ActiveRecord::Base set_primary_key "ARTICLE_ID" end however, using a link_to like the following (modified scaffolding), the link has no id value: <% for article in @articles %> <tr> <% for column in
2006 May 20
3
In a find, can''t you use both :include and :limit ?
I''m trying to do a find that includes a join. It has to be a find because I''m using the results for a Pagination, so I need to limit my query to the number of results I want to display per page. Here''s the type of thing I want to do: Employee table <-> Skills_Employees table <-> Skills table Let''s say I want to find all the employees who have
2006 Apr 20
7
checking date
Radrails created a field for date <%= product.date_available.strftime("%y-%m-%d") %> What does this mean? Should the definition be date or datetime? I tried both and no results Jim -------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060420/ed0cbb14/attachment.html
2009 Dec 08
0
Holiday Gift Perl Script for US Holiday Dummy Regressors
##### BEGIN CODE ###### #!/usr/bin/perl ###### # # --start, -s = The date you would like to start generating regressors #--end, -e = When to stop generating holiday regressros # --scope, -c = D, W for Daily or Weekly respectively (e.g. Does this week have a particular holiday) # --file, -f = Ummm where to write the output silly! # # **NOTE** The EOM holiday is "End of Month" for
2009 Dec 08
0
Opps Correct Version of Holiday Regressor Perl Script
Here is the correct version. The old version is the redirect only version of the script. ### BEGIN SCRIPT #### #!/usr/bin/perl ###### # --start, -s = The date you would like to start generating regressors #--end, -e = When to stop generating holiday regressros # --scope, -c = D, W for Daily or Weekly respectively (e.g. Does this week have a particular holiday) # --file, -f = Ummm where to write
2006 Jan 28
1
Method for returning a random date between two dates
Hi, I''m trying to create a method to return a random date within a range. So far, I''ve come up with this... require ''parsedate'' def random_date (a, b) adate = ParseDate.parsedate(a) bdate = ParseDate.parsedate(b) atime = Time.local(*adate) btime = Time.local(*bdate) atime + (rand * (atime - btime) ) end ...and it doesn''t seem to
2005 Sep 06
1
US Date Handling in Rails
My application is built on Rails and MySQL. It will only be accepting US formatted dates as input, however both Rails and MySQL are oriented around ISO the format. I know I can convert a good portion of the entries using ParseDate::parsedate but it does not appear this is how the conversion is taking place when data is being transferred from the params hash into model members. Say I have a field
2005 Jun 02
2
[OT] Purchasing Rails beta book and CC Verification
Did anyone else who purchased the Rails betabook get a telephone call from someone at "Humboldt Merchants" (sp?) asking to verify their purchase, ostensibly to ensure there was no fraud (on the part of the merchant, not the person buying the book)? They knew my name, phone number, the title of the book I bought and the type of credit card I used. They didn''t give or ask for the
2006 Aug 16
0
validates_presence_of non-null float/boolean/integer fields
Has anyone figured out a way to get validates_presence_of to work with float, boolean, and integer fields that are defined as non-null in the schema? The problem is, ruby intializes these types to the default schema value, which for mysql is never null if the column is not allowed to be null, and as a result they are initialized in the form with a value, and are never null. I found a work
2006 Jul 17
1
How to DRY up validates_presence_of
Given the case of validating the presence of an attribute and then performing other tests on said attribute, how do you go about not having to check for nil in the other tests? Example: validates_presence_of :start_date, :end_date validate :validate_start_date_before_end_date def validate_start_date_before_end_date # without this check an exception will be thrown on access to the
2006 Jul 23
0
composed_of and validates_presence_of
I''m using composed_of in one of my models, and I''d like to validate that the attribute is present. class Hand < AR::Base composed_of :level, :mapping => [ %w(sb sb), %w(bb bb), %w(ante ante) ] validates_presence_of :level, :message => "must be set" end The Level class itself is very simple: class Level include Reloadable attr_reader :sb, :bb, :ante
2006 Jul 26
0
validates_presence_of in upload_progress plugin
Hi there, I have implemented the upload_progress plugin which ajaxified my form_tag and works as expected(ish) and now I find that my validations do not work i.e validates_presence_of etc etc has anyone seen this before or know the work around cheers dion -------------- next part -------------- An HTML attachment was scrubbed... URL: