Displaying 2 results from an estimated 2 matches for "categories_id".
Did you mean:
categories_ids
2006 Jun 29
2
HABTM with multiple select list
...tiveRecord::Base
validates_presence_of :name
has_and_belongs_to_many :titles
end
---
----view
Category Mappings:
<% options = options_from_collection_for_select (@categories,
''name'',''id'', @category_ids) %>
<%= select_tag(''categories_ids[]'', options, {:multiple=>true,
:size=>7}) %>
----
I am getting error:
Couldn''t find Category without an ID
Please help.
Thanks.
Inessa.
_______________________________________________
Rails mailing list
Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gm...
2006 Feb 28
1
Wrong id after join!
...e inner join postcodes as pc on
substring_index(e.postcode,'' '', 1) = pc.outer_part " )
Produces the folowing SQL
-------------------------
SELECT * FROM entities as e inner join postcodes as pc on
substring_index(e.postcode,'' '', 1) = pc.outer_part WHERE (categories_id
= 4 and pc.metres_x >= 367400.0 and pc.metres_x <= 399400.0 and
pc.metres_y >= 380600.0 and pc.metres_y <= 412600.0)
--
Posted via http://www.ruby-forum.com/.