Is making a search page on the same page as the user page possible
Tan YL
19 posts
|
Hi, Thanks to this book and the ruby community i am starting to build my app, however i am now stuck. I need to create a user page that can search and add objects to a cart Step by step of how app should work: 1. User logins 2. on the side bar there is a search box where i search for objects
Problem: (1)because i am already logged into a user page the address on the browser (2)i am not sure that routing using a show action and using the users id is the correct way to bring a user to his home page. (3)When i use AJAX to create the left side, I am not sure that thinking_sphinx and will_paginate will work. {trying to do it AJAX way code} <% form_remote_tag :url => {:action => :search}, :method => “get” do {{CONTROLLER}}
{{PARTIAL}} <% if @groceries == nil %>
@groceries is nil {{search.js.rjs}} page.replace_html(“sgreplace”, :partial => “search” ) |
Tan YL
19 posts
|
UPDATE: solved 1 & 3 need an answer on 2 though |
David John P...
5 posts
|
Always nice to give feedback on the solved issues, so it helps other people ! |
Tan YL
19 posts
|
nothing is wrong with the code. i made the noob mistake of putting the function under private |
4 posts, 2 voices
