[Ror-es] can't convert Fixnum into String
Manuel González Noriega
manuel.gonzalez.noriega at gmail.com
Thu Dec 21 16:37:39 GMT 2006
On 21/12/06, lamacarena <ruby-forum-incoming at andreas-s.net> wrote:
> intento hacer esto:
>
> @page_path2 = "<a href='/categoria/show/"+ at actividad.id+" . ..
>
> pero me da el error
>
> can't convert Fixnum into String
@page_path2 = "<a href='/categoria/show/"+ at actividad.id.to_i+" . ..
>
> @page_path2 = link_to actividad.nombreactividad, :action => 'show',
> :controller => '/categoria', :id => actividad %>
def link_to_actividad(act_id, act_nombre)
link_to act_nombre, :controller => 'actividad', :action => 'show',
:id => act_id
end
@page_path2 = link_to_actividad(@activad.id, @actividad.nombre)
¿Así te vale?
--
Manuel
http://linkja.com * un agregador de tendencias
http://simplelogica.net
http://simplelogica.net/logicola
More information about the Ror-es
mailing list