Displaying 20 results from an estimated 8000 matches similar to: "Validates_ip_of"
2006 May 18
4
Email Address verifier--eyes needed...
Folks:
I''ve posted a really basic e-mail address verifier to
http://wiki.rubygarden.org/Ruby/page/show/VerifyEmailAddress
I''d appreciate folks who understand DNS and SMTP having a look at it
to see if it looks reasonable. You could comment here or, possibly
more usefully, comment on the wiki page itself.
Thanks
Dave
2006 Apr 22
3
How to use Rails and REST
Hi,
I just wrote an article on how to easily create a REST API for
Ruby on Rails applications:
http://www.xml.com/pub/a/2006/04/19/rest-on-rails.html
It describes how to create everything from the ground up and includes
information on testing your API too.
--
Thanks,
Dan Kubb
2006 May 10
8
E-mail validtor??
Does anyone have a good working e-mail validator? or even some regexp to
make the validates_format_of work right... that would be awesome. Also,
maybe an online tutorial for regexp. i''ve always been afraid of it but i
think it''s time to face the fears.
thanks!
--
Posted via http://www.ruby-forum.com/.
2006 Jul 28
2
s/IF_UNMODIFIED_SINCE/IF_MODIFIED_SINCE/ ???
I''ve noticed in the source code that Mongrel handles the
IF_UNMODIFIED_SINCE header. I thought this rather odd, since
IF_UNMODIFIED_SINCE is generally only useful with PUT. Even more odd
is that there is no mention of IF_MODIFIED_SINCE in Mongrel which is
useful with GET (although not as useful as IF_NONE_MATCH of course).
Is this a bug in Mongrel?
-Tim
2006 Mar 19
1
Rails and REST Example
Does anyone have an example of using REST and submitting data through
a POST operation and then possibly loading that data with
activerecord.
Also, if you have client code written in another language (java,.net,
C), would you have that code as well?
Berlin Brown
2006 Dec 01
2
Mongrel 0.3.18, rails 1.1.6 and cookies
I''ve run into an issue with my rails application being unable to
properly set cookies on Mongrel 0.3.18. If I run the simplified code
below in Mongrel 3.14.4, both cookies are properly sent to and saved
by the browser. With the same code in 0.3.18, only the auth_token
cookie is created (if I switch them, only the userid as it will only
properly create the first cookie in the list.)
2006 Apr 29
2
iCal / Authentication / Site5 ?
So, I''m working on adding iCal support to my app. Since I want to restrict
users to their own calendars, form-based authentication isn''t going to work,
so I''m using the Basic HTTP Authorization from this page -
http://blogs.23.nu/c0re/stories/7409/
Everything works fine in my dev machine, but on the server (Site5), I get
the login prompt ad infinitum.
Has anyone run
2006 Jan 08
22
Putting it all in one place with Schemas
I''m still relatively new to ROR, but I like what I see with the
database-neutral approach of Schemas. In the spirit of keeping it
simple and minimizing the number of files and location of information,
does ActiveState currently allow me to go ahead and place other low
level model information such as validation requirements and associations
inside the schema rather than putting it in
2008 Jun 07
3
DRY validates_format_of?
In a model I have following validates_format_of. Is there an easy way to
DRY this up? It seems to be rather repetitive.
validates_format_of :expiration_date, :with =>
/^[0-9]{4}[-][0-9]{2}[-][0-9]{2}$/
validates_format_of :activation_date, :with =>
/^[0-9]{4}[-][0-9]{2}[-][0-9]{2}$/
validates_format_of :some_other_date, :with =>
2006 Aug 24
9
[slightly offtopic] A small, fast Apache2.2 (if there is such a thing)
Hi.
I''m using Apache2.2 built from source + mod-proxy + ssl + svn.
Everything works fine but I''m sure you I could disable a ton of
modules during the build process and in httpd.conf to speed things up
and run a tighter memory footprint.
Has anyone bothered building Apache2.2 from source disabling all the
unneeded modules.
I am planning on going through the Apache docs but I
2006 Apr 27
7
SuperImage plugin
Greetings all,
This is the first release of the SuperImage plugin. The idea is you
upload images to the database, and then pull them out at any size you
want. Combine this with caching and it will stay light and fast.
More info and instructions are here:
http://beautifulpixel.textdriven.com/articles/2006/04/27/superimage-plugin-making-resizeable-uploaded-images-easy
svn:
2005 Dec 31
4
saving a collection
Reading the Agile book, I can''t find a single command to save a collection.
The save command seems to operate on only individual objects.
Lets say I have a collection that I have received from a find_all command.
I want to go through and change some attributes in various objects in the
collection. Then I want to resave the whole collection back to the
database. I don''t think
2007 Feb 16
13
negate the regexp in validates_format_of
Railsters:
ActiveRecord''s validation system puts other database systems to shame.
However, the newbies might not know how to write a regexp that
excludes a match, instead of tests for it. Understand - I''m just
asking this question to help them. I have been using Regexps since
''grep'' on Xenix! But the newbies here might not know how to do this:
2006 Aug 07
2
HTTP Pipelining
I am trying to understand why Mongrel so forcefully disables http
pipelining. The docs say because the spec is unclear, and it hurts
performance. These reasons smell... wrong. The HTTP spec is pretty
clear, and, er, I cannot find anywhere else that claims there is a
performance drawback, and lots of studies (and personal benchmarks
across years of writing webapps) showing how much it
2008 Jan 18
2
validate mac address field
Hi to all,
i''d like to insert a validation inside my model about a mac address
field.
I''ve used this sintax but it''s not working.
validates_format_of :mac_address, :with =>
/^((?:[-a-f0-9])+(?:[-a-f0-9])+(?:[-a-f0-9])+(?:[-a-f0-9])+(?:[-a-f0-9])+(?:[-a-f0-9]))$/i,
:on => :create,
2007 Apr 05
5
Odd error handling in ActionView#compile_template causes WSOD
If a view file cannot be compiled (eg it has a block with a missing
''end'' statement), I''m experiencing WSODs - the browser reports a lost
network connection, rather than the helpful compilation error that we
used to have.
When the compilation fails, ActionView#compile_template raises this
error :
TemplateError.new(find_base_path_for(file_name || template), file_name
||
2006 Jan 30
4
multiparameter assignment
I''m trying to figure out the rails why to break a single database field
out into multiple fields on a form, very similar to how rails does with
dates. How can I create my own object that mirrors the date objects
behaviur in how it accepts the multiparameter assignment from the form.
Example:
A phone number field (to force formating on the user) could be broken
into 3 form fields,
2006 May 23
11
putting the schema in the model files
THE SCHEMA IN THE MODEL
a small write up on ''putting the schema in the model''
This is a write up on an issue best covered in a mailing list thread
of Januari 2006 (see the links in the text), I repost it because I
think it deserves a place on the agenda.
== Why? ==
I was switching back and forward between the model files and the
schema.rb -- off course I have
2007 Jan 21
35
Collection proxies need to be stubbed ?
Hi all !
I just started writing specs on a new project. I would just like to
validate that this is the way you would write it. I know about mocks,
stubs and expectations. I don''t think this is a problem for me.
My question really boils down to:
def index
@projects = current_user.projects.active
end
My spec needs to return the proxy, no ? Here''s my code:
context "A
2006 Mar 13
4
Problem realted to upload..
I want to upload a file.
And what I am confused about is...should I upload it using a separate
table or just as another file in the form.
If as a separate table then I am not able to save it on the system/
Or/ If not that, then how can i check for the extensions?
Do reply.
Thanks.
--
Posted via http://www.ruby-forum.com/.