similar to: before_destroy & verification

Displaying 20 results from an estimated 800 matches similar to: "before_destroy & verification"

2006 Apr 25
2
Noob Question: Regarding Form
I''m hoping there''s an easy way to do this.  I''m trying to read options from a database, and insert them into form tags.  So for example, In the Database Table: options size: 300 type: text_field maxsize: 300 and I want to create a text_field form tag, with all the appropriate options, is there an easy way to do this, other than having the code output the HTML
2006 May 03
3
using select_date causes errors...
I''m getting errors whenever the user chooses, for example, April 31st ( since there is no 31st in April, navicat freaks out ), there MUST be a method that ruby has that would allow me to validate a date before I submit to navicat. I haven''t been able to find anything online about it either, it''s probably something simple, I just can''t figure it out. Thanks
2006 Apr 20
5
strange mysql problem
i have this model: class LineItem < ActiveRecord::Base belongs_to :quote end in the console: >>l = LineItem.create ActiveRecord::StatementInvalid: Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' , , , )'' at line 1: INSERT INTO line_items (`qty`, `quote_id`,
2006 May 01
4
When to make a new controller
Hey all, Ok this is probably a newb question, but I haven''t been programming with MVC for very long, and I''ve been wondering what the general opinion is, or best practices, for making a new controller. Like what cases would you need a new controller for and what cases can you just put everything into one controller? Thanks in advance, Randal -- Posted via
2006 May 02
3
Ordering Results returned by has_many relationship.
Noob Question 31,265,232 if I''m searching on an object, say order, that has many "order_lines" and I want to display order lines by Quantity ( an attribute of the order_lines ) descending how could I do that without having to do a find() with :order, but something like; Order.order_lines.each do |ol| <!-- code to diplay the line --> how can I determine the field
2006 May 09
6
RJS, & mulitple Drop Down Boxes.
Hello Again Rails Folk! I''m trying to creat a page similar to what the person is doing here... http://mudabone.com/aietc/?page_id=410 Instead of doing it the way he/she has, I decided to use RJS files, or at least I tried. Here''s my view <%= start_form_tag %> <%= javascript_include_tag "prototype" %> <p> Union: <div id="union">
2006 May 09
7
going crazy!!!!!! ActiveRecord::StatementInvalid in Project
any suggestions on why I am gaining this error. ActiveRecord::StatementInvalid in ProjectsController#create Mysql::Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' , , , , )'' at line 1: INSERT INTO projects (`name`, `date_created`, `quote_id`, `client_id`, `description`, `user_id`)
2008 Sep 15
4
sprintf does not fill with "0"?!
Hello, please look here: ================================================================= > > sprintf("%03s", as.character(1:5)) [1] " 1" " 2" " 3" " 4" " 5" > ================================================================= There should be a leading "0" isntead of space-chars?! I use R version
2009 Dec 15
7
ZFS Dedupe reporting incorrect savings
Hi, Created a zpool with 64k recordsize and enabled dedupe on it. zpool create -O recordsize=64k TestPool device1 zfs set dedup=on TestPool I copied files onto this pool over nfs from a windows client. Here is the output of zpool list Prompt:~# zpool list NAME SIZE ALLOC FREE CAP DEDUP HEALTH ALTROOT TestPool 696G 19.1G 677G 2% 1.13x ONLINE - When I ran a
1999 Jun 24
1
Little problem
Hi all. IF Iam WRITING TO WRONG SAMBA LIST PLEASE TELL ME THAT, I GOT A LITTLE CONFUSED ABOUT THE LIST NAMES I just suscribed to this list and i want to say that i started use samba moustly for file and printer sharing. All ok till now , only two cuestions I need to set up a share folder for two users only , i made some like [folder] valid users usr1 usr2 printable no writable yes
2006 Aug 16
4
New Model Object from Existing Model Object
Hey Guys, need a hand again.... Lets say I have an Order... and an Order has Order Lines and Order_Lines have Items... I want to create a New Order, which would have New Order Lines with the same Items... Is there a fast / easy way to do this, w/o having to create a new order, loop through all the order lines, and create them associating them with the Items? Any help would be great, thanks --
2008 Jul 04
2
How do change catalog before catalog is delted?
In my rails application,there are two models:post and catalog. One post has a catalog,and one catalog has many posts. When I delete a catalog,the posts belongs to the catalog will not be shown normal,for it''s catalog is no existed. Now I want to create(if the ''Defalut catalog'' is not existed) a ''Defalut catalog'' in catalogs table,and make the
2006 May 16
1
EICON, chan_capi-cm and averlap receiving
Hi! I have problems when receiving overlap calls. I'm used to behaviour of zaptel. overlap=yes takes care of collecting the digits. I tried the digit colleciton setting in the diva config tool, but it stops collecting digits when a certain amount of digits is received (isntead of waiting a certain time). How can I configure the zaptel behaviour overlap=yes thanks klaus
2007 Dec 17
2
[LLVMdev] PointerType API Change
Would it be possible to keep get() unchanged, with a default behaviour, plus a warning? Otherwise everybody (assuming everybody gets type void*) will have to update their LLVM passes, and either maintain two versions of the passes or require their clients to use a certain LLVM version. Then passes could be "address-space-safe" or not. If the default parameter value for get() could
2009 Jul 15
1
ResetCDR after GotoIf doesn't set dst correctly, Is this a bug?
(Both on Asterisk 1.2 and 1.4) I was struggling to find out why my CDR was recording dst = h after a call hangup. It was working fine until I added a GotoIf statement before ResetCDR to calculate some value for userfield column. Today I tested and found out that if ResetCDR is put after GotoIf (or after if in AEL), it doesn't record correct value in dst column, and isntead puts 'h'
2006 Mar 24
2
before_destroy not called
Hello, I''m trying to intercept delete call in my model but before_destroy callback is never called... Somebody knows why ? Thanks The controller : def delete Image.delete(params[:id]) redirect_to :action => "list" end The model : class Image < ActiveRecord::Base set_table_name "publish_images" belongs_to :article before_destroy :on_destroy
2008 May 18
0
Spec a before_destroy callback in Sequel
Hi I''m struggling to find a neat way to spec this. The Sequel ORM doesn''t support automatically destroying dependent models. It''s easy enough to do in a callback though: class Changeset < Sequel::Model has_many :migrations, :class => DataModel::Migration before_destroy do migrations.each { |m| m.destroy } end # ... end
2007 Dec 17
0
[LLVMdev] PointerType API Change
On Dec 17, 2007, at 1:22 AM, Torvald Riegel wrote: > Would it be possible to keep get() unchanged, with a default > behaviour, plus > a warning? Otherwise everybody (assuming everybody gets type void*) > will > have to update their LLVM passes, and either maintain two versions > of the > passes or require their clients to use a certain LLVM version. AFAIK API
2008 Jul 02
2
How to write the method before_destroy and the test
How to write the method before_destroy? Here is my code: def before_destroy errors.add(:isdefault,"Can''t destroy default record") if self.isdefault return false end or I should write it like below? def before_destroy raise(Can''t destroy default record") if self.isdefault end and how to write the test for it -- Posted via
2007 Mar 14
0
before_destroy return false, but dependent are destroyed
I have a problem with before_destroy deleting by dependent records, even through I return flase. ... has_many :users, :class_name => ''Editor'', :as => :editable, :dependent => :destroy ... def before_destroy unless self.has_access?(99) errors.add_to_base "Destroy permissions error!" return false end end When I remove the dependent