similar to: default value in text field

Displaying 20 results from an estimated 20000 matches similar to: "default value in text field"

2006 Jun 01
4
can''t convert Fixnum into String ??
I have been getting this error message on various pages, just wondering if anyone could explain whats going wrong, and the best way to correct it code that is cuasing the problem is below @project = Project.find(:first, :conditions => "id = " + @purchaseorder.project_id) -- Posted via http://www.ruby-forum.com/.
2006 Apr 14
3
Updateform with a has_many relationship ?
Hello all, I would like to be able to update the "amount" of a certain item in me order list. The problem I run into is how to define the text_field element. @order is the current order, which has_many :order_item which in turn belongs_to :order. order_item has a field "amount" which should be modified... What I tried is this below, but I get a undefined method
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 Jul 01
6
Sorting by an attribute on a associated table
So, I have a User has_many :profiles. The most recently dated profile is considered the current one. I need to sort these users by name, but the name attribute is a member of the associated table. Is there any easy way to do this other than with some ugly find_by_sql? Maybe a more general question - is there a common solution to sorting in Ruby? -- Posted via http://www.ruby-forum.com/.
2006 May 10
12
how best to implement lookup table?
Hi all - I''d like to implement a lookup table in my app that contains some reference data, just some status codes and their descriptions. What''s the most appropriate approach according to the "rails way" of doing things? Would I just implement a has_many relationship? Let''s say these are Order status codes, would the StatusCode have many Orders? This
2006 Apr 16
8
"Cannot convert String to Integer" after using association
So, I''ve written a partial that does some stuff with a given instance of my class "entity". Entity is ActiveRecord. I''m able to retrieve all sorts of data from an @entity, until I do something like: <% for @attribute in @entity.attributes %> <div id="attribute_<%= @attribute.id %>"> <%= render(:partial =>
2006 Jul 31
4
Login Password text field values
I have a text field that I use for logging in users. Due to the design of my site, I don''t have room to put the word "username" in front of the text field so I''d like to actually display it inside the field and then have the word clear when the user clicks on it. How could I modify something like this <%= text_field "user", "login", :size
2006 Jun 12
5
Method in Model
I have a simple method in a model, to send out e-mails via the script/runner. def Reminder.dropoff @messages = Reminder.find(:all, :conditions => [ "time < now()"]) @messages.each do |mes| Mailman::deliver_send_message(mes) end end However, it''s not sending e-mails. When this exact code was dropped in a controller, it worked great... is there
2006 May 02
9
Visual Migration Design Tool
For a really long time, I''ve been using DBDesigner from FabForce.net. For those of your who''ve never used it, its a freeware visual entity-relationship diagram tool, which allows you to make database designs visually instead of in SQL DDL. You can then use it to generate the SQL to make your databse design into reality, or even run a "synchronize" to make any
2011 Aug 07
3
New field does now show in browser
Hi all I just added a new field phone to form _form.html.erb created with: rails generate migration AddPhoneTotickets phone:string added with rake migraiton and the new field does not show in the browser new <div class="field"> <%= f.label :phone %><br /> <%= f.text_field :phone %> </div> old <p> <%= f.label :phone
2006 Jul 27
2
setting initial text field values in a form
Hi, I am trying to create a basic form in which I want one of the fields initialized before displaying it. My code (in a view) is as follows: <% if ( session[:user_id] != nil ) then logged_in_user = User.find(session[:user_id]) end %> <% form_for :suggestion do |form| %> <label for="suggestion_title">Topic:</label><br/> <%=
2006 Jun 10
8
OT: Good virtual server host with debian?
Hey all, I''m casually shopping around for a host that will give me a virtual server running Debian. It would host some of my rails projects and probably some svn. Does anyone know of a good host? Anecdotes about satisfaction would be nice. Thanks, Bryan -- Posted via http://www.ruby-forum.com/.
2006 May 10
12
Strange Behavior on Non-Index Pages
If I browse to \myRoRApp, I get the "Welcome aboard" screen. I''ve done the ruby scripts/generate controller MyTest, and "Rolling with Ruby on Rails" tells me I should be able to browse to \myRoRApp\MyTest and see an error page, but what I''m actually seeing is a fastcgi config file! I have installed fastcgi, but apache can''t "see" the
2006 Jan 13
5
Form field naming semantics question
Hi, I have a question today regarding how the various form elements in _form.rhtml are named. I understand that for a database table "persons" with a column headed by "name", then in _form.rhtml it will probably be like: <p><label for="person_name">Name><br/> <%= text_field ''person'', ''name''
2006 Jul 30
1
PDF to HTML converter for Ruby?
Does anyone know of a good package that can convert a PDF into HTML? Cross-platform compatible is a plus, but I can live with Linux-only if it comes to that. -- Posted via http://www.ruby-forum.com/.
2006 Jun 11
2
Javascript include in html - load times
Hi, If I include a javascript library, will it load when the html load, or just at the first use? I have table.js and I have few pages that needs it. Should I include it just on the pages that needs it, or put it on the application_layout? Thanks, Kfir
2006 May 14
2
one to one, but only with one table per record
Hi, I have a ''descriptions'' table which has_one of lots of other tables. The other tables all belong to a description. But I only want each description to have one record from any of the tables. So a description can''t have a room and photo. There has to be one description for each room, and one description for each photo. Any idea if there''s a reasonably easy
2006 Apr 21
5
input controls on-the-fly ?
i wish to know if there is some way to check user-input directly while it''s inserted. for example if i have to insert a number and the user press letters i just have to hide/delete the letters and wait for numbers. all without the need to press some submit button or any link..just automatically. Thanks Lepre -- Posted via http://www.ruby-forum.com/.
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
2006 Apr 17
6
Is there anyway to make Rails NOT cache?
Is there anyway to make Rails NOT cache? I''m getting caching in the browser and the server. I have to restart Lighttpd after every view change to see the results. Thanks, phill