Displaying 2 results from an estimated 2 matches for "category_title".
Did you mean:
category_titles
2006 Nov 21
14
Starting from scratch
I have the following models:
===
class Person < ActiveRecord::Base
has_many :person_organisations, :dependent => true
has_many :organisations, :through => :person_organisations
has_many :person_categories, :dependent => true
has_many :categories, :through => :person_categories
end
class Category < ActiveRecord::Base
has_many :person_categories, :dependent => true
2006 Nov 04
1
search function
...s/search'' %>
<p> <%= submit_tag ''Search'' %> </p>
<%= end_form_tag %>
here is my partial _search.rhtml :
<% @cats= Category.find(:all, :conditions=>["parent_id = ?", ''0''])
%>
<p><label for="category_title">Search</label><br/>
<%= text_field ''category'', ''title'',:size=>''10'' %></p>
and here is my controler :
def search
@catid = @params["title"] # I also tried @params[:title],
params["title"...