# General questions

**URL:** <https://www.ruby-forum.com/t/general-questions/53241>\
**Category:** Rails\
**Created:** [January 30, 2006, 8:55am UTC](https://www.ruby-forum.com/t/general-questions/53241 "2006-01-30T08:55:39Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [January 30, 2006, 8:55am UTC](https://www.ruby-forum.com/t/general-questions/53241/1 "2006-01-30T08:55:39Z")

</div>

Agile book lacks some basic information, perhaps I need to learn ruby as  
I am lacking information - some basic things - especially debugging.

The following are stupid newbie questions and any portion of them  
answered would be great.

1. If I am viewing a page from app/views/clients/ and on this page, I  
want to put a ‘link\_to’ directive to say app/views/case\_managers…  
how do I do this? For example,  
\<% link\_to client.case\_manager\_wholename, :action =\> case\_managers/show  
%\>

takes me to /clients/case\_managers/show.rhtml which is an error instead  
of /case\_managers/show.rhtml which is where I wanted to go,.

1. rdoc… I tried the other day…I somewhat forgot but I think I  
tried something like ‘rdoc Application::Controller’ and it reported  
couldn’t find the file and exited…where do I find information on how  
to use ri and rdoc ?

2. type conversions and concatenation…where do I find information on  
this?

3. Is the answer one of the Ruby books? Which one? Pragmatic Programming  
with Ruby?

Thanks

Craig

---

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [January 30, 2006, 9:28am UTC](https://www.ruby-forum.com/t/general-questions/53241/2 "2006-01-30T09:28:20Z")

</div>

Craig W. wrote:

> Agile book lacks some basic information, perhaps I need to learn ruby as  
> I am lacking information - some basic things - especially debugging.
> 
> The following are stupid newbie questions and any portion of them  
> answered would be great.
> 
> 1. If I am viewing a page from app/views/clients/ and on this page, I  
> want to put a ‘link\_to’ directive to say app/views/case\_managers…  
> how do I do this? For example,  
> \<% link\_to client.case\_manager\_wholename, :action =\> case\_managers/show  
> %\>
> 
> takes me to /clients/case\_managers/show.rhtml which is an error instead  
> of /case\_managers/show.rhtml which is where I wanted to go,.

This might help you…  
Page 350 of Agile Web D. with Rails says suggests you might  
want to try \<%= link\_to client.case\_manager\_wholename,  
:controller=\>case\_managers  
:action=\>show  
%\>

Please let me know if this worked for you or not.

Thanks,  
Dominique

---

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [January 30, 2006, 10:15am UTC](https://www.ruby-forum.com/t/general-questions/53241/3 "2006-01-30T10:15:08Z")

</div>

> 1. type conversions and concatenation…where do I find information on  
> this?

To convert, you an use @var.to\_i (for Fixnum), .to\_f (for Float), .to\_s  
(for string)… And to convert into a date, you can use :

```
@date Time.parse(str=@str_date)

```

And to concatene, you can use +.

I use a book, a GREAT book, “Agile Web D. with Rails” and few  
sites… :  
[http://api.rubyonrails.com](http://api.rubyonrails.com)  
[http://railsmanual.org](http://railsmanual.org)

and this one it’s great for your search:  
[http://www.rubycentral.com/book/lib\_standard.html](http://www.rubycentral.com/book/lib_standard.html)

Good Rails

pmt

---

<div class="post-metadata">

**Author:** ![craigrails](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/c/c2a13f/32.png) [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Post date:** [January 30, 2006, 4:30pm UTC](https://www.ruby-forum.com/t/general-questions/53241/4 "2006-01-30T16:30:15Z")

</div>

On Mon, 2006-01-30 at 09:28 +0100, Dominique P. wrote:

> > \<% link\_to client.case\_manager\_wholename, :action =\> case\_managers/show  
> > %\>

* * *

thanks - it worked fine after I added  
:id =\> client.case\_manager\_id

that was exactly the issue…I needed the :controller directive.

Thanks

Craig
