Results 1 to 1 of 1
Thread: changing partial template
Sep 9, 2008, 12:02 #1
- Join Date
- Dec 2004
- 0 Post(s)
- 0 Thread(s)
changing partial template
so i've got an observe_field search box going on... once the search is down to 1 object... i'd like to switch partial templates, controller and actions. Shouldn't that resemble something like below? Or if i'm forced to stay in the same controller... how would i at least switch partial and action (below minus the :controller?)?
if request.xml_http_request? && @people.length != 1 render :partial => "shared/one"#, :layout => false else render :partial => "shared/two", :controller => 'other_controller', :action => 'this_other_action', :layout => false endyour brain reacts in the same way whether you are
looking at something or thinking about it...