Hello
I do not understand how to use instance variable properly with partial
views, I am hoping someone here can enlighten me. For example
class MainController < ApplicationController
def index
@item_list = Item.find_all_item
end
def detail_display
@current_selected = @item= Item.find(params[:id])
redirect_to :action => :index
end
end
detail_display is invoked when the user clicks on an item in the list.
The variable @current_selected is not available to the partial view
invoked when the index is redirected to. How can I remedy this?
Thank you
rube_noob
--
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 [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---