Can anyone explain why a Link_to inside a table
should print out
the link if the field is null, but print out the field if it contain
data(text) in both rails 3 and 2.3.5.
If the field is nul it prints out:- “/dsplaces/100?
country=UK&area=London”
If the field contains data (text) it prints out correctly. The code
is:-
| <%= link_to truncate(dsplace.description ,:length => 35),
dsplace_path(:id => dsplace.id, :country=> dsplace.country, :area=>
dsplace.placename) %> |
On Nov 22, 2010, at 7:36 PM, MDM wrote:
<%= link_to truncate(dsplace.description ,:length => 35),
dsplace_path(:id => dsplace.id, :country=> dsplace.country, :area=>
dsplace.placename) %>
Otherwise you’d have nothing to click on. Is this dsplace.description
blank, perhaps?
-Rob
Rob B.
[email protected] http://AgileConsultingLLC.com/
[email protected] http://GaslightSoftware.com/
Thanks for that I will put in an if !=null or make sure the field is
not empty
On Nov 23, 2:19am, Rob B. [email protected]