My view code is as below:
<%= b.input :city, as: :select, collection: Lov.where(:remarks => 'lov_city').select('id').select('lov_content'), placeholder: 'Enter City', label: false %>
When the code is render, the list of data that is shown in my view is #<Lov:0x3241351>
..
Actually the Lov table is a reference table which is not related to any other tables and when i do in the rails console (rails c) and running the same 'Lov.where(:remarks => 'lov_city').select('id').select('lov_content')
' the data is shown but the view is different.
From rails console:
jruby-1.7.16.1 :001 > Lov.where(:remarks => 'lov_city').select('id').select('lov_content')
lovs Columns (6.0ms) SHOW FULL COLUMNS FROM `lovs`
Lov Load (8.0ms) SELECT id, lov_content FROM `lovs` WHERE `lovs`.`remarks` = 'lov_city'
=> [#<Lov id: 229, lov_content: "Ayer Baloi">, #<Lov id: 230, lov_content: "Ayer Hitam">, #<Lov id: 231, lov_content: "Ayer Tawar 2">, #<Lov id: 232, lov_content: "Ayer Tawar 3">, #<Lov id: 233, lov_content: "Ayer Tawar 4">