Displaying 20 results from an estimated 1000 matches similar to: "tricky form validation"
2006 Feb 02
5
access controller var within model
I need to access params[:field_name] from within my Model.
@params[:field_name] isn''t working?
2006 Feb 01
1
distance_of_time_in_words_to_now with "ago" suffix
I wanted the distance_of_time_in_words_to_now method to have '' ago''
suffixed to it when the date is in the past, I assumed this would be the
default behaviour but apparently not. I know of a REALLY messy way that
i could solve this with, but it''s so ugly I can''t be bothered
Does anybody have an easy, elegant solution?
2006 Feb 08
3
ungenerate / remove scaffold command?
I have seen this somewhere and can''t find it now. Is there an ungenerate
or remove command for the scaffold generator. It would be easier than
removing all the files by hand.
I have tried ./script/ungenerate but no luck.
Thanks
--
Posted via http://www.ruby-forum.com/.
2006 Mar 10
5
case insensitive search
I am having trouble with a simple gallery search.
I type in a segment of the address and i only
seem to be getting results if I use the correct case.
This is in my Gallery controller:
def search
@gallery = Gallery.find(:all, :include => :property,
:conditions => "address LIKE ''%#{@params[:keywords]}%''")
end
On a different note:
I am having
2006 Jan 13
1
Accessing file_column_helper from withing controller
Hi All,
i have i niggly little showstopper -> I need to access
file_column_helper from within the controller, as I need to include an
image in my "pdf-write" code...
Any sane way to do this?
"Require ''rails_file_column''" still gives me an error: "undefined method
`url_for_file_column''..." (I am using *svn* version with Rails 1.0)
2008 Apr 14
4
Unable to load module chan_zap.so
I am having trouble with chan_zap.so not loading. When I load it from
modules.conf, Asterisk bails out without any error message. When I
load it from the console, it just says "Unable to load module
chan_zap.so" no matter what verbose level I am using.
dmesg says:
Zaptel Version: 1.4.4
Zaptel Echo Canceller: MG2
Freshmaker version: 73
Freshmaker passed register test
Module 0:
2006 Apr 07
6
validation nightmare
Please help, I am really at a loss at how validation is supposed to work
in rails.
Model contains
acts_as_tree
I want to force my NEW objects to have a parent
I do NOT want existing object to have a parent
so I only want to have parent_id on create, NOT on update.
I am trying this:
def validate_on_create
validates_presence_of :parent_id, :message => "You must specify a
2011 Apr 28
3
difference between validate and validate_on_create
i just ran into a problem with some test, and i am not exactly sure why,
but the difference happened when i changed my model validation from:
validate :custom_validation
to:
validate_on_create :custom_validation
can someone give me any ideas on where in the chain the validation takes
place?
thanks!
--
Posted via http://www.ruby-forum.com/.
2006 May 29
19
WYSIWYG Editors and Rails
Hi everyone,
I''m currently investigating re-writing our School CMS application in
Rails and the only drawback I can see is there isn''t an ample supply (if
any) of WYSIWYG In-browser editors written with a raw Ruby backend. We
currently use KTML4 which is written with PHP as a base. I''m interested
to hear from anyone who''s integrated a PHP based editor into
2008 Nov 19
2
Where should I put "prerequisite logic"?
Hi there,
I have this model called InventoryItem. Every time an InventoryItem is
created (through the CharactersController and the create_item action) I
need to update others tables and make lookups in other tables, to check
if the Character has the prerequisites to actually create the
InventoryItem.
My problem is that I cannot seem to find a good place to put this logic.
I''ve tried to
2004 Oct 11
1
Bug#275946: Acknowledgement (newline not recognized when logcheck sends emails)
I upgraded to 1.2.28, same results.
Here are the rules I added.
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ perdition\[[0-9]+\]: Connect:
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ pure-ftpd: [^[:space:]]+ \[NOTICE\]
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ pure-ftpd: [^[:space:]]+ \[INFO\]
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ exact\[[0-9]+\]:
^\w{3} [ :0-9]{11} [._[:alnum:]-]+ slapd\[[0-9]+\]:
^\w{3} [ :0-9]{11}
2005 May 18
3
CentOS 3 / tg3 driver on an HS20 Blade
Greetings:
I know it's been mentioned before that the tg3 driver in CentOS 3.4 is
buggy. I had to revert to 3.4 today from 4 (fresh install) and now I
have no link and thus no network. I'm wondering if this is caused by
this bug and what the work-around is.
Thanks.
Brendon Colby
2017 Jun 26
2
Some questions about software pipeline in LLVM 4.0.0
Hi Ehsan,
In some cases modulo scheduling will insert copy instruction that end up as
real copies in the final code. It unavoidable in some cases. For example,
let's say a instruction defining a value is scheduled in the first
iteration, but one of its uses is scheduled two iterations later. In this
case, the kernel needs to create a copy because there will be two values
live in the
2006 May 04
2
validates :on 2
Hello, I need to have this for :create and :login how do I do so
validates_presence_of :login, :password, :password_confirmation,
:user_name, :email, :on => :create
I do need it to be off in a number of places though
--
Posted via http://www.ruby-forum.com/.
2016 Oct 07
4
Alternating boot default entry every reboot
Hi,
I am currently using isolinux (syslinux-6.03) in a clonezilla setup. It
boots fine, however I want to have a setup where the default boot selection
alternates every boot.
* First boot : Default is menu item 0
* Second boot : Default is menu item 1
* Third boot : Default is menu item 0
...
The idea is that when it is booted into clonezilla the clonezilla script
checks if the system needs to
2006 May 05
1
Adding methods to model based on foreign table rows
Hi all,
I wondered if the following is implemented in ActiveRecord:
I have three tables: "products", "properties" and "product_properties"
the products table holds base information for the product, like
product_id, name etc.
>> Product.column_names
=> ["product_id", "name"]
the properties table holds extra "columns" for the
2012 Nov 21
2
[LLVMdev] Disable loop unroll pass
I just wanted to add to Krzysztof's response. I'm not sure if you're
referring to the case when a compile-time trip count loop is completely
unrolled or for a loop with a run-time trip count, which would be partially
unrolled. For Hexagon, if we partially unroll a loop, we'd also like to use
our hardware loop instructions. That is, unrolling and hardware loops are
2005 Apr 23
7
Validation question
Hi all,
Is there a way to invoke validations at times other than save, create
and update? I know that I can do this by writing my own validation
checks using errors.add_[blah], but I''d like to leverage the existing
validation code.
What I have is two sets of fields in a record, set A and set B. Both
sets must be validated on record create. However, the trouble is that
after
2006 Mar 16
2
Verifying existance of related record
Is there an easy way to validate that a related record exists?
I''ve got a table that contains a set of categories and I want to make
sure the user has entered a vaild category (i.e. a category that exists
in the categories table). So in the model of the table I put this:
class Master < ActiveRecord::Base
belongs_to :category, :foreign_key => "categoryid"
2006 May 25
10
One set of source code with multiple instances
Hi there, we made a PHP and Impakt2 based web content management system
for schools with specific features that work really well for schools.
The way I designed it was so there was one central set of source code
and an empty (in terms of rows in tables) database structure. To set up
a new school i had a script that basically created a new directory in
/var/www and then within that, symlinked