[Rails] Re: print page and Link_to problem
Tim Shaffer wrote in post #955599:
> This is a "teach a man to fish" kind of reply...
What does that mean? Is it derogatory?
Give a man a fish and you feed him for a day; teach a man to fish and
you feed him for a lifetime
I can't begin to tell you how insulted I am and Your little link taught
me nothing...
I do have a AAS in software develoment....
I have "Programming Ruby" the pic axe book
"Agile Web Development with rails"
Sitting in front of me which niether goes over routes to any depth nor
do they or your "Fishing" Website explain very well or at all how to
pass a varriable to the page your linking to...
I wrote the following question before I relized that you were mocking me
I'll leave it...
Again finding ruby developers to be rather mean maybe it's just this
forum
>
>
http://api.rubyonrails.org/classes/ActionView/Helpers/UrlHelper.html#method-i-link_to
the link didn't help
lets take the basic crud we get when we run a scaffold...
Index
Edit
Show
Delete
from the the index view if we hit the edit button it takes us to the
edit view populating it with what ever :id was for that link_to
The index page has a link_to that looks like
<td><%= link_to 'Edit', edit_tire_path(tire) %></td>
now maybe I'm missing it but I've tried to find out were the scaffold
put the route or mapping of this edit link_to so that it works.
And thats were I'm confused, I figure I should be able to use the same
mechanizm to get from the show page to the print_label page using the
current :id as the scaffold built for getting from index to edit.
So that link you gave me doesn't really explain how to make a route or
the sytax to use to call print_label and send it the current :id.
if there is a edit route some were could you let me know so I can see
how the scaffold maped and or routed the views it created. i can't find
them.
your link says
link_to(body, url, html_options = {})
what does body represent?
So would it be " link_to(body, "www.mywebsite/tires/print_label") "
So were do I tell it that I want print_labels to grab the tire with the
current :id? and populate fields with that object?
--
Posted via http://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home