Displaying 20 results from an estimated 26 matches for "bobsilva".
2006 Jan 27
17
Multiple Model Validation
Hey All !
I have a form which contains two models. I would like both models to be
validated, but have their validations aggregated on the page.
If I do:
<%= error_messages_for(:model1) %>
<%= error_messages_for(:model2) %>
It puts two big validation blocks on the page. I would like all the errors
from both models, but only in one validation box.
Is this possible ? All my attempts
2006 Feb 10
3
Quoting table and column names inside AR
There are quite a few tickets asking for quoted table names and field names
to enable reserved words as table or column names.
What is the general consensus regarding this issue?
Bob Silva
http://www.railtie.net/
_______________________________________________
Rails-core mailing list
Rails-core@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails-core
2006 Jan 24
5
Password fields and security?
Hi all
I wanted to ask why Rails'' password_field helper uses the input password
as default value when reloading a form because of errors? Isn''t this a
potential security leak? On any other webs I''ve seen so far the password
fields have to be filled in again after every reload of the site so the
password doesn''t exist in plain text in the html code...
What
2006 Jan 19
7
validates_numericality_of positive integer
Hi,
What is the simplest way to validate a positive integer?
validates_numericality_of :foo, :integer_only => true
how do I add the positive part? Do I need another validation statement
for pattern matching or do I have to write a validate() funciton for
my model?
Thanks,
Peter
2006 Jan 30
11
Database Selection
Hi,
I am a RoR newbie and I''ve been experimenting with different databases
(mySQL, PostgreSQL, etc.) and different table types (MyISAM vs. InnoDB).
Is there a preferred database/table type for RoR development. I like
how MySQL''s InnoDB tables enforce referential integrity, but these
tables require a lot more storage space then MyISAM tables.
For everyone with a lot of RoR
2006 Jan 24
2
DOCTYPE declaration:
I am playing around with the Agile Rails development book again and
thought to see what effect, if any, placing a doctype declaration
at the top of an rhtml file would have. When I insert any of the
three standard forms of such declaration at the top of
app/views/store.rhtml the product image disappears when the web
page is redisplayed. The error logged in log/development.log is:
>
2006 Apr 04
4
Ruby 1.8.4 on SUSE 10.0 howto
All,
I just installed ruby 1.8.4 on my SUSE 10.0 box. It was slightly
convoluted so I thought I would post the solution here.
Once this runs for a day or so I will try upgrading my rails to 1.1
=== Ruby 1.8.4 on SUSE 10.0 Howto
I downloaded the src.rpm from
http://mirrors.kernel.org/opensuse/distribution/SL-OSS-factory/inst-source/suse/src/ruby-1.8.4-9.src.rpm
Then I installed it with
2006 Feb 28
5
Session Sweeping
Hi,
Anyone got some slick ideas on how to sweep an AR session store? I have a
few ideas how I can do it, just want to see if there is an elegant solution
that someone is already using.
Bob Silva
http://www.railtie.net/
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
2006 Jan 27
4
testing for nil numeric value in find
In the agile/rails tutorial book the following construct is added
to products.rb.
def self.salable_items
find( :all,
:conditions => "date_available <= now()",
:order => "date_available desc")
end
Now, I wish to extend :conditions => to exclude products that have
a nil value for the price. I have tried different syntax
2006 Jan 23
9
Web Hosting Options?
Can someone recommend a good web host for ROR?
--
Posted via http://www.ruby-forum.com/.
2006 Jan 20
8
validates_confirmation_of not working
is there any special requirement for validates_confirmation_of ? I am
trying to make sure 2 passwords are equal (cleanly the rails way)..
In my view i have two fields with id user[password] and
user[password_confirmation].
in the model i have
validates_confirmation_of :password, :message =>"Passwords do not match "
Am i missing something here ?
thanks
adam
2006 Jan 22
3
Formatting input/output of a text box
Hello,
What''s the best way to handle formating of a text_area? I have a text_area
in my rails app where people can leave comments and I''d like to
automatically convert the line breaks into <br /> tags, or just simply wrap
a whole paragraph in <p></p> tags. I''m currently doing the following in my
comments controller to insert line breaks when the user
2006 Mar 04
4
authorization framework?
There are a number of good authentication frameworks for rails - has anyone
developed a generic authorization framework?
I''m thinking of something that included the concept of roles, mapped roles
to both actions and users and could be used to wrap actions before their
invocation.
Extra good would be some way to check data permissions (as in, "yes you can
perform the ''Edit
2006 Jul 13
3
date_helper megapatch and MultiparameterAssignmentErrors
Hello all,
There''s a great patch in trac that fixes a lof of issues with the
date helpers. I''m afraid it hasn''t had any attention yet.
http://dev.rubyonrails.org/ticket/3811
This fixes all the little date_helper problems, except one: When you
choose an invalid date ActiveRecord throws an
ActiveRecord::MultiparameterAssignmentErrors. This used to work in
1.0,
2006 Feb 07
9
Is there a good time_select tag helper?
I''m trying to record a list of start and end times, and they''re simply
an hour and a minute. Looking at the API, there''s a select_time
helper, but that just creates the tag. There''s a datetime_select
helper which takes an object and method name, so it does all the
magic...but I only want to worry about the hour and the minute. I''ve
tried writing my
2006 Jan 26
21
pagination_links help
I want append custom query parameters to my pagination links, like
?page=1&foo=bar. I can''t quite figure out how to do this with the
pagination_links helper, although I believe the API says you should be
able to:
pagination_links(paginator, options={}, html_options={})
options are:
:params: any additional routing parameters for page URLs
Has anyone tried this?
thanks,
jeff
--
2006 Feb 03
33
[ADV] Rails Recipes Beta Book is now available
I''m delighted to announce that Chad Fowler''s new book, Rails Recipes,
is now available
as a Beta Book.
This is a great title for folks who know Rails, and for folks who
want to get the most out of Rails. It contains detailed recipes for
doing real-world things with Rails, all illustrated with working
code. Some examples are drawn from Rails 1.1, the rest from Rails 1.0.
2006 Feb 05
1
acts as nested set
Hi Railers,
Is the nested set model restricted to only one root?
I''m working on a screencast building a threaded forum and nested set comes
close but is lacking a few items for this project.
First, all the documentation I can find restricts a nested_set to one root
node, and a threaded forum would have many roots. Also, without a ton of
fancy sql or an ungodly amount of db calls, it
2006 Feb 17
0
Caching Auto Complete Field
Greetings,
I''ve extended script.aculo.us to have the autocompleter cache it results in
the browser and only callback to the server when you clear your filter.
This provides good performance for lists with lots of elements on a busy
site. Typically, your initial result set doesn''t actually change, items just
get filtered out.
Why have your database perform this simple
2006 Jan 27
0
Plugin - Redefining Numericality
I''ve put together another plugin, this time it adds some convenience
functions to the
validates_numericality_of validation routine. Nothing in this plugin can''t
be done with
existing validation routines, it just moves them to a place I feel is more
appropriate.
http://www.railtie.net/articles/2006/01/27/defining-numericality
PS: Sorry for hijacking threads with my