similar to: How to search in your application?

Displaying 20 results from an estimated 8000 matches similar to: "How to search in your application?"

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 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
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
2005 Dec 31
7
Dynamic form? Not really!
Hi guru''s out there, Im happilly coding my first rails app, and all goes well. I find myself manually coding in a particular field all the time (company_id), that relates the contact to a company. The total coding of this form seems somewhat much. Could somebody tell me what Rails power I''m possibly missing and stuborn as I am trying to do myself? I was wondering if the
2006 Aug 07
3
character encoding in RoR
Hi, I''m a newcomer to Ruby and to Rails, and am having a problem with character encoding. Now, I know ruby doesn''t handle unicode...but, characters like ? (eacute) and ? (ccedil) are part of the iso-8859-1 charset, so it shouldn''t be a problem, right? But, for some reason, the string functions still seem to hang on those characters. As an example, in a brand new rails
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/.
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 May 01
1
Show/Hide with AJAX
I''m trying to implement a show/hide details function. I have the show part done, but I''m not sure how to get it to hide. My app looks like this so far: View: <%= link_to_remote "Show/Hide", :update => "details", :url => { :action => "show", :id => leif } %> <p id="details"></p> Action: def show @leif =
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/.
2005 Aug 15
2
Newbie rendering problem
Hi On every list request i render an item partial through a collection of items. the item table has 3 columns namely name,anotherName and id. the item partial looks like <%@item=item%> <%= error_messages_for(:item) %> <tr id="<%=item.id%>"> <% for column in Item.content_columns %> <td><%=h item.send(column.name) %></td> <%
2006 Sep 29
1
newbie Q: it won't display foreign keys...
I have two tables CREATE TABLE continents ( id int(11) NOT NULL auto_increment, name varchar(255) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE countries ( id int(11) NOT NULL auto_increment, name varchar(255) NOT NULL, continent_id int(11) NOT NULL, PRIMARY KEY (id) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; I generate scaffolds for country and for
2006 Jan 11
15
How to use custom url formats?
I''m new to Rails and am trying to use a field called "code" instead of "id" in my URLs. For example, assuming I''ve got a database of motorcycles makes where the codes are "Honda", "Yamaha", "Suzuki", and "Kawasaki", etc. To show the info about Honda I want to use this url: http://www.mysite.com/makes/honda/
2006 Mar 05
2
Need help understanding Rails magic!
Hi, I''ve just been pleasantly surprised, again, by how much Rails does for me, but I am *really* surprised. Surprised as in "how the heck did that happen?" I''d really like to understand this and would appreciate any help. Big picture... the user is presented with a form that allows them to select one or more check boxes to record their allergies. The form uses the
2006 Aug 09
2
how to access selected value in controller action
I have this in a view: <%= start_form_tag :action => ''create_price'', :id => @media.id %> <%= select("media", "price_code_id", PriceCode.find_all.collect {|pc| [pc.name, pc.id ] }, { :include_blank => false }) %> <%= submit_tag ''Add Price Code'' %> <%= end_form_tag %> My question is, how would I access the
2006 Aug 03
1
Is Ferret the standard rails search engine?
Is Ferret the standard rails search engine? I''m looking to search the file system and MySQL. TextSearch is working fine for MySQL. http://wiki.rubyonrails.org/rails/pages/TextSearch Is Ferret the solution that most people are using for documents in the file system? Thanks. Greg -- Posted via http://www.ruby-forum.com/.
2006 Nov 04
1
Dynamically updating a sortable list using RJS
I''ve got the following sortable list in one of my views: <ul id="sortable_list" class="sortable_list"> <%= render(:partial => ''section'', :collection => @sections) %> </ul> <div class="new_section" id="new_section"> <%= form_remote_tag(:url => {:action =>
2006 Feb 22
8
filtering "tags" via checkboxes - HABTM
First post/newbie post... bear with me. What I''m trying to achive (music site): A system containing tracks and moods with a HABTM relationship. I''ve got all that set up and functioning in the admin environment - i.e. admins can apply a variety of moods to a particular track via a series of checkboxes. Join table works just fine. I''m currently stuck on allowing
2006 Jul 30
8
Method_missing from Ruby for Rails book
I''m having a problem getting this example from the book to work: class Cookbook attr_accessor :title, :author def initialize @recipes = [] end def method_missing(m, *args, &block) @recipes.send(m, *args, &block) end end cb = Cookbook.new cb << recipe_for_cake cb << recipe_for_chicken beef_dishes = cb.find_all {|recipes| recipe.main_ingredient ==
2005 Dec 29
3
Maintaining DB reflection without scaffolding
Hi, I would like to know if there is a way to maintain database reflection for the ''new'' and ''edit'' views whilst removing scaffolding? I''m trying to create a webapp that will be somewhat maintainable by colleagues (that aren''t necessarily web developers) through simple manipulation of db table fields. For example to add another field to the
2006 Mar 14
15
in_place_editor_field -- values not clickable
Hallo -- I''ve just installed the latest stable version of rails, and am following the rails recipies book''s first recipie -- using in_place_editor_field. My problem is that the code throws no error, but the resulting fields are not editable -- the values just come up as text, rather than clickable-then-editable fields. Can anyone help shed any light on why this might be the