Displaying 20 results from an estimated 3000 matches similar to: "validates_presence_of in upload_progress plugin"
2006 Jul 26
0
validates_presence_of broken
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:
2006 Aug 09
0
Re: association does not get foreign key
On 8/10/06, Dion Hewson <dionhewson@gmail.com> wrote:
>
> I have a 1 to 1 relationship using a similar example as below (has_one, belongs_to)
>
> but when I do the save, the foreign key of the child object is not set to the id of the parent object in the relation ship
>
>
> any ideas?
>
> cheers
>
> dion
>
> ---------------------------------
>
>
2006 Jul 23
8
destroy vs delete
what is the difference between destroy and delete in AR
I am not sure what they mean by
"Destroys the record with the given id by instantiating the object and
calling destroy<http://api.rubyonrails.com/classes/ActiveRecord/Base.html#M000866>(all
the callbacks are the triggered). If an array of ids is provided, all
of them are destroyed."
in
2006 Apr 11
0
upload_progress with apache
I am running Ruby 1.8.4, Rails 1.1, and apache2 with fcgid. I installed
the upload_progress plugin, but it doesn''t seem to be working. In my
log I see only
Processing SortController#create (for 71.32.223.31 at 2006-04-11
11:29:09) [POS\
T]
Session ID: 556c9a44ce6452a22bc1dbbab3ee5a2f
Parameters: {"commit"=>"Upload",
2007 Jun 14
0
upload_progress with --prefix
Hi,
I think I may have found a bug: When starting Mongrel with --prefix,
upload_progress doesn''t work. When starting without, it does.
Is this something I can possibly work around in the Rails code? The app
uses url_for throughout.
Regards
Craig
2007 Sep 16
0
upload_progress example
Since mrblog is now out of sync with trunk, I distilled out of it just the
minimum parts for having upload progress display on file uploads.
I also took the liberty of inverting the way the iframe was used: now the
iframe contains the progress display, rather than being the target of the
form post. This makes more sense to me, as you may wish to separate visually
the progress display anyway,
2006 Jul 31
4
Text field not being submitted via form_remote_tag; works via form_tag
Hi everyone,
Newbie here. I''m trying to get a textual form element to submit in
the context of a form_remote_tag block and having little success.
Oddly (or perhaps not), using regular old form_tag in its place does
cause the elements to be submitted. Here''s the relevant partial ERb
code:
<%= form_remote_tag( { :url => { :action => :out, :id => pending_task } } )
2006 May 18
1
Introspection of validates_presence_of
Hello all.
I don''t know how to get all symbols passed to method
validates_presence_of in model. I''ve trying to use following solution:
class News < ActiveRecord::Base
validates_presence_of :title, :text
def validates_presence_of(*attr_names)
@@obligatory_fields = attr_names
ActiveRecord::Base.validates_presence_of(*attr_names)
end
def obligatory_fields
2006 May 22
2
Weirdness with validates_presence_of
Hi,
I have a call to validates_presence_of in my model and it is behaving very
strangely
my first stab when this happened during testing was
validates_presence_of :impact, :ease_to_implement if Proc.new { |record|
!record.cost_estimate.nil? }
I have three values in my model that I care about with this one. Basically
what I''m trying to get to happen is
if one is there they all must be
2006 Apr 26
0
upload_progress
Hi,
Is possible to change the Default text "Upload starting..." when a file is
being submitted with this plugin???
I cant find the way to do that.
Thanks.
2006 Jan 10
0
file_column and upload_progress
is there a way to integrate the file_column plugin with the upload
progress bar plugin ?
Any tips on how to do this would be great.
thanks
adam
2006 Mar 25
3
validates_presence_of validation order?
I have a form with 3 fields: user_id, email and password.
All 3 fields are required, so I have a "validates_presence_of :user_id,
:email, :password" in my model.
Works, but the validation errors show up in a different order than I
specificed in the validates_presence_of statement.
Is there a way to specify the order in which the validations (and
corresponding error messages) should
2006 Mar 13
4
undefined method `validates_presence_of'' for #<ProductsContr
Hi,
I am trying to use method `validates_presence_of'' for validating my
input fields on form . I m using it in my action class as follows:-
=======================
validates_presence_of(params[:product][:quantity])
======================
But when I am running my application i m getting error like:-
=========================
undefined method `validates_presence_of'' for
2006 Apr 12
0
How to get validates_presence_of worked in this situation?
Suppose:
class articles < ActiveRecord::Base
has_many :assistarticles
validates_presence_of :body
end
class assistarticles < ActiveRecord::Base
belongs_to :article
validates_presence_of :detail
end
In the submit form:
<%= text_field ''article'', ''body'' %>
<%= text_field ''assistarticle'', ''detail''
2006 Sep 28
1
upload_progress and DRb.start_service crashes
Whenever I tried to start mongrel_rails with the upload progress
script, it would die with the following error:
/usr/local/lib/ruby/1.8/drb/drb.rb:837:in `getaddrinfo'': getaddrinfo:
No address associated with nodename (SocketError)
from /usr/local/lib/ruby/1.8/drb/drb.rb:837:in
`open_server_inaddr_any''
from /usr/local/lib/ruby/1.8/drb/drb.rb:860:in
2006 Jul 12
1
Test for file_column
hi all,
has any one had experience writing a test for file_column
I can write a test for testing the data in the form, but am not sure how to
test against the image
any tips?
cheers
dion
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060712/08f7996a/attachment.html
2007 May 18
4
No return status from mongrel upload progress (and thus no updates on the bar)
Hi all,
I''m using Boxroom (http://boxroom.rubyforge.org/) and trying to get
upload progress working. I''ve also been testing the sample code at
http://itblog.mcgeecorp.com/2007/5/15/mongrel-upload-progress-demo/.
I run a Mongrel cluster, and so am using drb (as per
http://mongrel.rubyforge.org/docs/upload_progress.html). Starting up
rails, I get lots of useful-sounding output:
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
2006 May 14
0
problem with validates_presence_of :on=> :update
I''m having what''s probably a stupid-newbie problem with validates_presence_of and I''m hoping someone will point me in the right direction.
Bottom line is that validates_presence_of does not seem to be ''firing'' when I use the :on => :update option. If I don''t include the option, the validation does fire.
The problem is that I want to
2005 Feb 19
0
[Error] Using validates_presence_of for datetime field causes parse error?
Hi Everyone -
I''ve got an odd sort of error when I try to use validates_presence_of
for a MySQL ''datetime'' field. Here''s the relevant portion of the table
definition:
mysql> describe student_surveys;
+---------------------+---------------------+------+-----
+---------------------+----------------+
| Field | Type | Null |