Tuesday, October 19, 2010

[Rails] print page and Link_to problem

Hi,

I am trying to make a product label maker, so as soon as I enter a Tire
into the DB/website I can then print a nice little label from the
website.
This is all being done from a admin account so I'm not worried about
other users.

I added a print_label.html.erb to my tire view. I also added a

def print_label
@tire = Tire.find(params[:id])
end
to my tire controller

So I figured I could add a

<%= link_to 'Print Label', print_label_tire_path(@tire) %>

on the show.html.erb. So that Print label will show only the information
from that tire ... brand name stock number so forth

but I'm getting a error of

undefined method `print_label_tire_path' for
#<ActionView::Base:0x7c391a8>

So do need to define a path in the routes or map a route...???

Thanks

--
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


Real Estate