General questions


#1

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


#2

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


#3
  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://railsmanual.org

and this one it’s great for your search:
http://www.rubycentral.com/book/lib_standard.html

Good Rails

pmt


#4

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