search for: human_nam

Displaying 20 results from an estimated 32 matches for "human_nam".

Did you mean: human_num
2006 Jun 01
3
more questions: human_name
One more question: Is there some way to set the human_name of a column? e.g.: human_name for column address1 shouldn''t be Address1 but "Address, line 1". If not, should I make a hash with my custom names? Best regards, -- ---------------------------------------------------------------------- Yannick Majoros http://www.inma.ucl.ac...
2005 Dec 30
3
Too many columns for list.rhtml to display on one page
...o it in the view (list.rhtml - excerpted below). Does anyone have an example that only prints out a subset of the columns in a table? .......... <h1>Listing volunteers</h1> <table> <tr> <% for column in Volunteer.content_columns %> <th><%= column.human_name %></th> <% end %> </tr> ............ -- Posted via http://www.ruby-forum.com/.
2006 Sep 24
0
How to change human_name
Is there a way to change the value of human_name() for a particular model attribute? Say I want the human name for line_item to be "Items" instead of "Line items". Thanks __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.co...
2006 Aug 05
1
Viewer Problem
In a standard scaffold generator, the list.rhtml looks something like this ... <% for column in Book.content_columns %> <th><%= column.human_name %></th> <% end %> How can I modify this code so for each table column add my own name not the "human_name" generated code? -- Posted via http://www.ruby-forum.com/.
2005 Dec 27
3
myObject.send(column.name) from Agile Development book
...he rails API, I don''t find anything. When I look it up in the Ruby API, it says that the form is obj.send(symbol [,args...]). Well, there is no symbol in use here. So I am confused about the "send". Then, I can''t find a method "name" anywhere. Unlike "human_name", it is not listed as one of the methods of a Column in active record. At least I can''t find it. I know what this code accomplishes, but I wish I understood it better. Can anyone point me in the right direction? Thanks, Shelby _______________________________________________ Rails...
2006 Apr 27
2
"for column in..." not picking up _id columns
My code executes fully: <% for column in ModelName.content_columns %> <th><%= column.human_name %></th> <% end %> but it does not pick up any columns in my model''s table that end in "_id". Is this by design? Is there a helper method that will reference the related tables? Or will I need to code the column titles and detail records by hand? Learning....
2005 Dec 31
7
Dynamic form? Not really!
...<% end %> </select> </td></tr> ### The cool dynamic part that shows the rest <% odd_or_even = 0 for column in Contact.content_columns odd_or_even = 1 - odd_or_even %> <tr class="ListLine<%= odd_or_even %>"> <td><%= column.human_name %>:</td> <td><%= text_field ''contact'', column.name %></td> </tr> <% end %> </table> <input type="submit" value="Save" /> <%= end_form_tag %> Thanx a lot guys! Regards, Gerard. -- "Who care...
2006 Aug 07
3
character encoding in RoR
...ot;Post" mapped to a database with id, title, and body, I generate a scaffold, and create a new entry with an accented character in the title. Then, in the show.rhtml view, I add the .reverse method as follows: <% for column in Post.content_columns %> <p> <b><%= column.human_name %>:</b> <%=h @post.send(column.name).reverse %> </p> <% end %> The entire title is reversed, as expected, except the ? (eacute) character is now ?? (two question marks). My MySQL DB is set up with latin-1 as the default. I don''t get what''s going on h...
2006 May 02
16
no one cares about i18n (was [OT]: Asking questions on this list)
Do most others in the community agree with this statement? It seems to me that i18n is: 1. Actually important to many people 2. Not really the difficult to implement in concept 3. Something that people like to point out about Rails to say it''s not ready foir "Enterprise" It seems to be that a big part of Rails is encouraging people to do things the "Right Way",
2006 May 01
1
Show/Hide with AJAX
...gt; { :action => "show", :id => leif } %> <p id="details"></p> Action: def show @leif = Leif.find(params[:id]) render_partial ''show'' end _show.rhtml: <% for column in Leif.content_columns %> <p> <b><%= column.human_name %>:</b> <%=h @leif.send(column.name) %> </p> <% end %> Any tips or ideas would be appreciated -- Posted via http://www.ruby-forum.com/.
2006 Feb 27
1
Undefined Method Error in View
...thing I want to display. I know the SQL works it was lifted from a PHP project, and from a command line returns exactly what it should. What confuses me is what I''m doing in the view. If my view looks like this: <% for column in Quote.content_columns %> <p> <%= column.human_name %> <%= column.send(column.name) %> </p> <% end %> I get the method error. However, if my view looks like this: <% for column in Quote.content_columns %> <p> <%= column.human_name %> </p> <% end %> It works, printing out the column names. T...
2006 Mar 17
4
Noob question about the "show" function
i''ve got a cool app going and it''s getting bigger and bigger, but now i''m trying to customize the show function. i''m using the scaffold code as a base but can''t seem to get anything to look right. i guess i''m confused about how exactly the scaffold code works for the "show" function. any help would be awesome! thanks. jon --
2006 Mar 11
0
Ruby-GetText-Package-1.3.0
Hi, Ruby-GetText-Package-1.3.0 is now available. Now ActiveRecord::Column.human_name values translate automaticaly. Changes for RoR --------------- * Improve Local::Object * POSIX, C convert to "en". * Enhance supports of Ruby on Rails. * ActionMailer localization support. * Use GetText function(_() N_() etc) in template. * ISO-2022-JP charset is use...
2006 Sep 29
1
newbie Q: it won't display foreign keys...
...ongs_to and has_one: class Continent < ActiveRecord::Base belongs_to :country end class Country < ActiveRecord::Base has_one :continent end The code that is generated to show a country record is <% for column in Country.content_columns %> <p> <b><%= column.human_name %>:</b> <%=h @country.send(column.name) %> </p> <% end %> <%= link_to ''Edit'', :action => ''edit'', :id => @country %> | <%= link_to ''Back'', :action => ''list'' %> This latter code...
2006 Mar 05
2
Need help understanding Rails magic!
...@allergy_item.update_attributes(params[:allergy_item]) for column in AllergyItem.content_columns selected = @allergy_item.send(column.name) if selected == ''y'' @allergy = Allergy.new @allergy.emrec_id = @emrec.id @allergy.description = column.human_name @allergy.save end end redirect_to :controller => ''creation'', :action => ''show_emrec'' end private def find_allergies session[:allergy_item] ||= AllergyItem.new end def find_emrec session[:emrec] ||= Emrec....
2006 Mar 22
9
Setting empty fields with in_place_editor_field
Hi all! Playing around with in_place_editor_field, I found that when you set a field to be empty, you can''t edit it at all anymore after that. Am I doing something wrong or is this the way it is intended to be? If so, is there any way around that behaviour? Is it just styling? Best regards, Raphael -- Posted via http://www.ruby-forum.com/.
2006 Aug 17
2
What helper makes "News Item" out of "news_item"?
Hi all Look at the title, I guess you know what I mean... What helper makes the attribute names of tables human readable? news_item >> News Item name >> Name etc. Thanks for info :-) Joshua -- Posted via http://www.ruby-forum.com/.
2006 Jun 15
2
Custom database forms input and display ??
...now to see if I can start my own project.. I need to understand how admin/new.rhtml <%= render :partial => ''form'' %> is creating the forms and telling it to input data into the tables I have it talking to a different table this time and in list.rhtml <%= column.human_name %> I can get it to show all of my tables more than the book makes me create... But in new.rhtml I dont see any forms besides that one tag... any oneth tutorials for custom design or some key word I should look for ?? I am not making a store I need basicly a replacement for filemaker desig...
2006 Apr 15
0
drag&drop strangeness
...%> <% end %> add_search_field and remove_search_field are removing from the session a field and search_fields.rhtml as you see reprints all the fields I want to trash a field by moving it to the trash div. steps are the following: I have a table with a <%= draggable_element column.human_name.downcase, :revert => true %> and if I drag it to search_fields (it calls add_search_field in the controller) it works and renders correctly. then if I try to drag the newly added field to trash I''m unable to do it because it doesn''t drag. If I reload the page and then drag...
2006 Jan 22
0
Get colum types in auto form
...types (text_area and text_field for now), and filters out the ''created_at'' and ''deleted_at''. <% for column in Project.content_columns %> <tr class="ListLine<%= cycle("0","1") %>"> <td><%= column.human_name %>:</td> ## The line below <% if column.string %> <td><%= text_field ''project'', column.name %></td> <% elsif column.text %> <td><%= text_area ''project'', column.name %></td> <%...