similar to: textfield helper - formatting the displayed text

Displaying 20 results from an estimated 20000 matches similar to: "textfield helper - formatting the displayed text"

2005 Dec 30
9
SELECT MAX
How does one do a SELECT MAX query in rails? I''ve searched and searched and tried lots of things with no luck. I want to implement "SELECT MAX(column_name) from table_name and have it return the maximum value from column_name. I just need to get that one value, not the whole object... Thanks for any ideas... Shelby _______________________________________________ Rails mailing
2005 Jul 17
0
RE: link_to and CSS
What you want is a.linkCommand:hover, etc -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Shelby Westman Sent: Monday, 18 July 2005 2:20 AM To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: [Rails] link_to and CSS I am a bit confused about how
2005 Dec 26
2
confused about ruby fast C bindings
I am confused about ruby fast C bindings. Does the command: gem install mysql install these? Is this page: http://www.tmtm.org/en/mysql/ruby/ the home page for these bindings? If so, it gives no instructions about installing them with using gem. Wondering if this is all the same??? Thanks for any help... Shelby _______________________________________________ Rails mailing list
2005 Dec 27
3
myObject.send(column.name) from Agile Development book
I''m studying the Agile Development with Rails book. In the chapter that first sets up the depot application (page 68), there is this bit of code from a view: <% for product in @products %> <tr> <% for column in Product.content_columns %> <td><%=h product.send(column.name) %></td> <% end %> etc... I am trying to absorb both Ruby and
2011 Mar 10
4
Multi-model forms
Hi guys, I''m new to ruby and rails and I''m working on multi model forms, specifically 3. I''m using this http://guides.rubyonrails.org/getting_started.html as a start, and its got a 2 Model example but I cant seem to get the last one working. These are my models: Country name:string code:string (has_one :address) Address address_line1:string
2009 Aug 13
10
default value if textfield is empty
Hey all, im not sure where to set a default value if a textfield is empty? For now i do it in the controller, and check if the submitted parameter is blank. But this seems not to be the best solution... Thanks for your help! -- Posted via http://www.ruby-forum.com/.
2006 Jun 15
0
Re: rails question
Hi Shelby, No prob, You are having trouble b/c you don''t call @festival.valid? before this line: if !(@festival.errors.invalid? :name ) # => true if name is invalid I wasn''t clear about it in my post, but ActiveRecord::Errors#invalid? doesn''t actually do validations. It just looks at the associated errors object (which is empty if validation hasn''t
2006 Mar 03
1
number_to_currency() helper == non DRY == could be improved
Hi all, Apologies in advance if I got this one wrong, I''m still just a newbie ;-) Going through the Apple ADC RoR tutorial it suddenly occurred to me that the ''number_to_currency()'' helper method was not DRY streamlined. Scenario:: The "number_to_currency()" methods options hash works great when I need to dynamically display different currencies when I
2006 Jun 15
3
how to give a form a name
Using a <%= form_tag ... %>, how do I give a form a name, so that I can reference it with javascript? I sure can''t figure this out from the docs... Thanks, Shelby PS - what I am trying to do is just have the focus in the first form field when the form is loaded. There has to be an easy way to do this, but I can''t figure it out... -------------- next part --------------
2005 Aug 07
3
tracking online users
Let''s say I have an application and I want to create an admin program that will show me who is currently online using the application. I don''t know the best way to do this. Assuming I am storing my sessions in the default PStore, I don''t suppose there is any method that lists all the active sessions, is there? The only way I can think of to do this is to setup a
2006 Jul 09
2
serialized DateTime objects returning as Time objects
I have a database field called dates in which I am trying to serialize an array of DateTime objects. When I unserialize them, they are coming back in as Time objects. I know this, because I am getting errors that say "comparison between Time and DateTime failed. Why is this happening? Is there a way to prevent it?? Thanks Shelby -------------- next part -------------- An HTML attachment
2006 Aug 02
3
faster? database search or rewriting objects
I''m having an argument with my son :) I have a table with about 1500 objects called entries. I need to do something with about 100 of them (schedule manually) I say I should just mark them with a boolean when I have scheduled them. (manual == true) My son says I should pull them out of the entries table and copy them to new objects (lets call them "manual" objects, and store
2006 Jun 13
7
model validation across multiple views
I have a rather complex object with a number of attributes. For a variety of reasons, I would like one view to create the object with only a couple of fields completed, then a second and third view to finish all the fields. I would like the model to validate_presence_of all these fields, since eventually I need them all there, and I would like each page to validate its portion of the fields that
2006 Feb 09
0
pass values with autocomplete textfield
Hi all, I have a simple app that has an autocomplete textfield in my view. I now want to be able to pass the value of a select to my controller when my auto_complete_for_location_name is called. My goal is to be able to filter the autocomplete results by the value of the select. My view code looks like this: <%= form_remote_tag :update => "search_results", :url => {
2006 Apr 24
3
Form with multiple rows of content
I have looked at examples for this. I found a similar example in the Agile Web Dev... book but that didn''t help. Here''s what i am trying to do. A Cart has many line items. On the Display Cart page, I want to provide the user the option to update quantities. Here''s the rhtml code: <%= start_form_tag :action => ''update_cart'' %>
2006 Jun 18
3
on change of drop down a textfield emerging
hi, i have a situation where i have a list of options from which a user selects his options if its not in the list he/she selects Others/Not Present and a new textfield should pop up and the data entered there should be considered instead of dropdown. i have done this using javascript/dhtml but i was wondering how this can be done using pure rails i.e using some of the RoR apis?. i would
2006 Jul 16
1
form helpers with non-ActiveRecord objects
I have an ActiveRecord model (called Festival) that contains an array of "FestDate" objects serialized into a sql text column of the Festival object. (like the Agile book first edition describes on p. 205) The FestDate objects themselvs are not ActiveRecord objects. (of course, otherwise they would be in their own table...) When working with a Festival, I would like to use various
2006 Jul 11
4
add method parameter for form helper
Hello, Most of the form helpers are build using Object / Method without the possibility of using a method parameter (as I know ...) text_field(object_name, method, options = {}) how do you solve this problem ? -> (I did my own helper and generate the html ... well I think there is a better way;-) -> do I have to overide text_field(object_name, method, parameters {}, options = {})
2006 Jul 16
3
Binding text_field et al to object.attribute.name
Hi all, Suppose I have a PurchaseItem model which refers to Product model... class Product < ActiveRecord::Base has_many :purchase_items end class PurchaseItem < ActiveRecord::Base belongs_to :product end To keep things simple, one of the attribute of the Product model is title. On the interface, I have a textfield that I need to bind with @purchase_item.product.title.
2005 Dec 31
4
saving a collection
Reading the Agile book, I can''t find a single command to save a collection. The save command seems to operate on only individual objects. Lets say I have a collection that I have received from a find_all command. I want to go through and change some attributes in various objects in the collection. Then I want to resave the whole collection back to the database. I don''t think