I have a list of `<li>` items being generated from a CMS/DB. Each `<li>` has a `<div>` in it which contains a link to a lightbox (a hidden `<div>`). The link targets the id of the hidden `<div>` (#inline-content-print) so the javascript plugin triggers and pulls up the lightbox.

The problem I'm running into is that all of the `<li>`s on the page generate with the same hidden `div` id (I can change this to classes). So no matter which `<li>` href is clicked, it always pulls up the lightbox for the first `<li>` on the page (the first instance of the id). I need a way for the href to say "open #inline-content-print" from THIS `div` (the one the link being clicked lives in)".

```
<li>
<div class="store-buttons-bg hide-print-buttons-{tag_Hide-Print-Buttons}">

<a href="#inline-content-print" class="various store-button">PRINT</a>

        <div style="display: none;" id="inline-content-print">
        CONTENT OF LIGHTBOX
        </div>
        <!-- end inline-content-print -->

</div>
</li>

```

Any advice would be greatly appreciated.
['https://Stackoverflow.com/questions/12410727', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/1669207/']
**If I'm not wrong, when a `before` callback returns `false`, the transaction gets rolled back.**
That's probably what's happening.

```
def check_new_record
    self.is_new = self.new_record?
end

```

When `self.new_record?` returns `false`, it assigns `false` to `self.is_new` and then the method returns `self.is_new`, which is `false` too.

Try this instead:

```
def check_new_record
    self.is_new = self.new_record?
    true
end

```
For one thing, you can get rid of the hack you have to detect if the record is new in the after\_save. If the record is new, the .changed? method will return true.

```
class Video < ActiveRecord::Base
  after_save :index_me

  def index_me
    Resque.enqueue(IndexVideo, self.id) if self.changed?
  end
end

```