similar to: Can anybody tell me step by step how validate data on form?

Displaying 20 results from an estimated 2000 matches similar to: "Can anybody tell me step by step how validate data on form?"

2005 Dec 26
4
Books for Beginners
I have experience in PHP/MySQL, but absolutely no experience at all in Ruby (and Rails) and would love to get a few quality books aimed at absolutley newbies. Any suggestions? Thanks, Jim -- Posted via http://www.ruby-forum.com/.
2006 Jun 06
4
pls help me regarding Maths round up function.....
Hi, I have some values on my webpage displaying like 1.22333333333 2.33333344444 2.33377777777 etc. Here I want to display values upto 2 decimal places correct. i.e, 1.22333333333 should be dislayed as 1.22 2.33333344444 should be dislayed as 2.33 2.33777777777 should be dislayed as 2.34 & so on.... How to do this in ruby????? Is there any function??? Thanx in advance. Prash --
2006 May 08
4
How to disable textbox in Ruby?
Hi, I want to disable textbox in my page so that user can not modify its contents. How can we do that in ruby? Thanx, Prash -- Posted via http://www.ruby-forum.com/.
2006 Mar 17
3
How to check for presence of particular value entered ?
Hi, I am entering value in textbox ("name") on form. Now name field in database is having ''unique'' constraint on it so that no 2 records with same name allowed in database. Now when I m trying to enter same name into database from my form I m getting following error. ================================ Mysql::Error: #23000Duplicate entry ''Prashant''
2006 Jun 08
5
How to find particular pattern in string?
Hi, In my application I want to find out the occurance of substring "http:\\" in the main string "http:\\www.abc.com" Here how to find out whether substring "http:\\" is present in my String? & if substring "http:\\" is present then I want to delete it from main string. How to do this? PLs help me. Thanx in advance. Prash -- Posted via
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 May 08
7
How to get difference between two dates in days???
Hi, I want to calculate difference between Current date & previous date (stored in database). The difference should be in days. Hhow to do that?? PLs tell me. Thanx in advance. Prash -- Posted via http://www.ruby-forum.com/.
2006 Jun 09
2
How to mail decrypted password to user?
Hi, I am using acts_as_athenticated plugin for my rails application. That plugin is using "SHA1" algorithm to encrypt password & stroe it into database. Now in future suppose user requsted his password through email, hhow should I decrypt that password in my application & for sending it through mail? Please help me. I am trying this since last 2 days. But still not
2006 Apr 05
6
How to Upload Image through RoR??
Hi, I have one form , in which I am using file_field teg for input image file as follows. ===== <%= file_field("store", "picture") %> ======= Tha Actual fileld name of my Image field in Database is "store_photo" with datatype LargeBLOB. & Inside my Store Model I have specified "def picture" as follows:- ========================= def
2006 Mar 17
2
How to specify default action for particulr actioncontroller
HI, How to specify default action for particular actioncontroller? Currently when I m typing the URL as "http:\\localhost:3000\actioncontroller_name" , then I m getting the default actin page as list.rHtml. But instead I want my action page to be index.rHtml. How to do it? Thanx. Prash -- Posted via http://www.ruby-forum.com/.
2006 May 03
1
RoR go Live?
I am having a problem trying to use RoR live. I have a Win XP SP1 OS, Apache 2.0.55, MySQL 5.0.15-nt ruby 1.8.2, rails 1.0.0, gem 0.8.10, WEBrick 1.3.1 Is it possible to run RoR using these components, live? Using an actual domain name like www.joe.com/rails/app? Instead of using localhost:3000? I would like to go live using either just Apache or Apache and WEBrick for RoR. I have an actual
2006 May 12
2
Problem regarding accessing attributes from object...
Hi, I have an object (@cnt). Now when I am calling "@cnt.inspect" on object it gives me output as follows:- ----output---- [#"3"}>] ----------- Now in aboove output the number between double quotes (3) which is of my interest & I want to display it. How to do that? Actually this is my method:- ==================================== class Tagging < ActiveRecord::Base
2006 Mar 17
1
How to update values in database in this form?
Hi, This is my rHtml page & Corresponding actions & model pages:- ===listform.rHtml================= <h1>Products List</h1> <%= start_form_tag(:action => "add_to_cart")%> <table> <tr> <% i=0 %> <th> Product No. </th> <th> Unit Price </th> <th> Available Qty. </th> <th> Demand Qty. </th>
2006 Feb 26
5
Subversion | CVS | Sourceforge | OS X : Tutorials
Can anyone suggest some step-by-step tutorials for using CVS or Subversion on Sourceforge with OS X ? I''m a new to RoR and creating a Sourceforge project was recommended as a way of working and learning from/with others. But I can''t get over the hurdle of transferring what I''ve already build to csv.sourceforge or subversion.sourceforge. All my attempts generate
2005 Apr 27
2
noob question: rhtml new/edit views and the date functionality
Hello All, I''ve been playing with Rails - did the recipe/category sample from onLamp.com - fairly straight forward - even got it working against postgres. Anyway, I''ve been appling rails to a small test project and I can''t seem to get the syntax down or find a sample of how to use the date control on a custom new/edit view. The CRUD (is that right?) that automatically
2006 Jul 31
1
How to get result of following SQL Query in Ruby?
Hi, I have 2 tables as follows:- _________________ ________________ ____________ taggings | |stores | | tags | -----------------| |---------------| |------------| --tag_id | |--store_id | |tag_id | --store_id | |--store_name | |tag_name | --user_id | |---------------| |------------| -----------------| Now I want to execute
2006 May 08
3
How to get count of records from database?
Hi, I want to display count of all records with particular field value from database onto my view. How should I do that? PLs tell me. Thanx. Prash -- Posted via http://www.ruby-forum.com/.
2006 May 19
1
How to upload text files or csv files in ruby??
Hi, I want to upload text file & csv file to server through my rails application. How to do that? PLease tell me if any plugin available for that? If not then how to upload files?? Thanx in advance. Prash -- Posted via http://www.ruby-forum.com/.
2006 Mar 10
2
Syntax for <input type=hidden> in rhtml????
Hi, I am new to ROR. PLease tell me what is syntax of creating hidden field in form inside RHTML file. I knonw the syntax for text box (<%= text_field ''product_item'',''product_id'', :value=>product.id%>) But I don''t know syntax for hidden field(like <input type=hidden> in HTML). Please tell me. Thanx in advance. Prash -- Posted via
2006 Mar 22
1
How to retrieve attribute values of objects?????
Hi, I am writing following line in my code:- ================= @product1=Product.find(:all, :conditions => ["id = ? ", params[:product][''product_id''+count.to_s]]) print @product1.inspect =========================== So I am getting on console following output. ========================== [#<Product:0x3cd61c8 @attributes={"demand"=>nil,