similar to: please help me......

Displaying 20 results from an estimated 10000 matches similar to: "please help me......"

2006 Mar 14
6
How to provide 2 actions to a form?
Hi, I have a form in rhtml. Now I have 2 buttons indside that form. Clicking on the first button action will be ''create'' & on second button action will be ''delete''. How to do this? Thanx Prash -- Posted via http://www.ruby-forum.com/.
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 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 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 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 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 Mar 14
3
Can anybody tell me step by step how validate data on form?
Hi, I am new to ROR. I have created a form with foru fields in ROR. Now its working fine for all CRUD operations. But I want to validate data on form for "validates_presence_of" validation. How to do this? I tried it by putting line "validates_presence_of :description" . But its not working. Its throws error like "undefined method `each'' for
2006 Mar 17
2
Validation not working.......
HI, I am new to ruby. I am developing small application in ROR. Following is code for my rHtml , Controller & Model. PLease see it & let me know why data in form is not get validated & also how to check for whether data i have entered in form (username) is present in database or not? (Like Login form). following is my code:- ---index.rhtml-------- <%= start_form_tag(:action
2006 Mar 22
7
What is difference between render & redirect methods?
Hi, Thest are two methods:- 1) redirect_to :action => ''list'' 2) render :action => ''list'' what is difference between these two methods?????? Thanks. Prash -- Posted via http://www.ruby-forum.com/.
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 Aug 18
3
Understanding MVC - view customization after using scaffolds
All, I have ordered AWDWR and am anxiously awaiting its arrival. In the meantime I still am playing with ROR using radrails. I have a few questions ... I create a table named customers with the following details: Field Type Null Key Default Extra id int(11) NO PRI auto_increment customer_name varchar(50) NO inbound_retention int(11) NO outbound_retention int(11) NO unix_admin_email
2006 Apr 04
2
how to perform client side validations in RoR?
Hi, I have a form for user registration. In that form there are fields for password & confirm_password. Now in my database there is column corresponding to password field. Now at clicnt side I want to validate equality of password & confirm_password field. How to do that? I have downloaded one password validator plugin & tried to used it. But it requirs two seperate fields in
2006 Mar 10
1
How to use variables inside rhtml??
Hi, I want to use counters in my rhtml page for dynamic naming of my form elements. eg:- for 1st textbox name will be "text1" for 2nd textbox name will be "text2" ....& so on........ But here I want use a counter variable in rHtml file so that I will use for loop for looping througn each set of elements in form & give name to form elements as
2006 Apr 05
3
how to insert Current DateTime value into database?
Hi, I want to insert onto database the Current DateTime Value into database field "Store_date" with datatype (DATETIME). How to do tihs? I am usiing hidden variable into my form as follows:- ======================= <%= hidden_field("store", "store_date", :value =>:datetime ) %> ======================= But when I m submmittng form I couldn''t find
2005 Dec 30
3
Too many columns for list.rhtml to display on one page
I''ve gone once through the Agile book and am now attempting my own rails app. I''ve created a table named ''volunteers'' with over 15 columns. The problem is the default list.rhtml that is created with the scaffold, shows all the columns. I only want to show 4 of them with the list view. Where would I start to only return a handfull of columns to the
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 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
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 Mar 14
4
What does the send() method do on a model object?
All, I did a scaffold for a model and I ended up with this code in list.rhtml: <% for column in TargetList.content_columns %> <td><%=h target_list.send(column.name) %></td> <% end %> Where is the "send" method and what does it do? I can''t find it on ActiveRecord::Base? I assume that it returns a value based on the column id but I
2006 Aug 13
5
Newbie question: scaffold not working
I went through a tutorial at http://www.onlamp.com/pub/a/onlamp/2005/01/20/rails.html?page=1 to get started with RoR. I really like the idea of the scaffold construct, but I can''t seem to get it to work the way it was described in the tutorial. I''ve got a mysql database that is properly configured, and a table called ''quotes'' with a column called