# Vertical slide

**URL:** <https://www.ruby-forum.com/t/vertical-slide/175113>\
**Category:** Rails\
**Created:** [September 8, 2009, 9:47am UTC](https://www.ruby-forum.com/t/vertical-slide/175113 "2009-09-08T09:47:39Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![puneetpandey85](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/4af34b/32.png) [@puneetpandey85](https://www.ruby-forum.com/u/puneetpandey85)\
**Post date:** [September 8, 2009, 9:47am UTC](https://www.ruby-forum.com/t/vertical-slide/175113/1 "2009-09-08T09:47:39Z")

</div>

Hi Everyone,

I have a page where I would like to implement something like this:  
[http://livingsocial.com/](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

---

<div class="post-metadata">

**Author:** ![puneetpandey85](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/4af34b/32.png) [@puneetpandey85](https://www.ruby-forum.com/u/puneetpandey85)\
**Post date:** [September 9, 2009, 12:52am UTC](https://www.ruby-forum.com/t/vertical-slide/175113/2 "2009-09-09T00:52:01Z")

</div>

Hi,  
Taking a look to this site seems you need to do something like:

1. Selecting all events not displayed
2. Update the vertical slide with the first event from the list you  
obtain  
in the Step 1.
3. Mark this event was displayed
4. 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:

1. Select all events with state = “not displayed” order them by the  
“created\_at” field
2. Read the first Event from the list. If the list is empty, waste some  
time  
(configured ?) and Back to Step 1.
3. Display it in the vertical slide.
4. Update the state field to “duisplayed”
5. Write the event.
6. Back to the Step 1.

If you like this logic…then letÂ´s Rails IT !!!

FF

2009/9/8 puneetpandey85 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid)

---

<div class="post-metadata">

**Author:** ![puneetpandey85](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/p/4af34b/32.png) [@puneetpandey85](https://www.ruby-forum.com/u/puneetpandey85)\
**Post date:** [September 9, 2009, 6:15am UTC](https://www.ruby-forum.com/t/vertical-slide/175113/3 "2009-09-09T06:15:46Z")

</div>

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](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 [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> 1. Select all events with state = “not displayed” order them by the
> 
> > [http://livingsocial.com/](http://livingsocial.com/)
> 
> >

–  
Thanks and Regards

* * *

Puneet Pandey  
Ruby on Rails Developer

> **[PUNEET PANDEY's WEBLOG](https://puneetitengineer.wordpress.com/)**
>
> Where perfection meets intelligence

In Puneet’s Lab: [http://www.puneetpandey.com](http://www.puneetpandey.com)
