Hi Everyone,
I have a page where I would like to implement something like this:
http://livingsocial.com/
I tried periodically_call_remote ajax helper, but it’s not working. It
is giving me all the records at a time, whereas I want records one by
one.
I need suggestions, please reply
Thanks
Puneet
Hi,
Taking a look to this site seems you need to do something like:
- Selecting all events not displayed
- Update the vertical slide with the first event from the list you
obtain
in the Step 1.
- Mark this event was displayed
- Back to Step 1
May be you should have some “state” and “created_at” fields in you
events
table ir order do the detalide steps:
- Select all events with state = “not displayed” order them by the
“created_at” field
- Read the first Event from the list. If the list is empty, waste some
time
(configured ?) and Back to Step 1.
- Display it in the vertical slide.
- Update the state field to “duisplayed”
- Write the event.
- Back to the Step 1.
If you like this logic…then let´s Rails IT !!!
FF
2009/9/8 puneetpandey85 [email protected]
Hi Fabian,
Looks like I am heading into the right direction, but I think I have to
add
some ajax flavor in it to make it working. Yestarday I worked on it and
I
realized that periodically_call_remote can help me out of this… When I
looked at the javascripts which http://livingsocial.com has used, I’ve
found
that they are using JSON in some ways… and that’s make me worrying 
Now the point is like I will implement the database part of it… now
comes
the slider. What do I need for that? any javascript, jquery, prototype
libraries I have to use?
I will be very glad if you will help me with some sample codes and some
links which can help me to achieve this…
BTW thanks a ton for giving your valuable response 
On Wed, Sep 9, 2009 at 4:19 AM, FabianF [email protected] wrote:
- Select all events with state = “not displayed” order them by the
http://livingsocial.com/
–
Thanks and Regards
Puneet Pandey
Ruby on Rails Developer
In Puneet’s Lab: http://www.puneetpandey.com