I have limited screen space for a table that I'm displaying, so I'm showing
a truncated view of a description field:

<td><%= simple_format car.description.truncate(200, :separator => ' ')

I need a mouse over or click event to generate a simple pop up window (an
"alert", a "tool tip", a "dialog", etc.) displaying the full contents of
the car.description field.

I'm an admitted JS rookie. All the JS-Rails tutorials/information that I'm
seeing are focused on unobtrusive JS, focused mostly on AJAX/remote server
interactions. I'm not seeing anything that helps understand how you can
use data from your Rails application in rich JS UI features within your
views. I saw a tool tip gem, but with that gem, tool tip content is
statically generated, and tool tips are held in their own table. No way to
generate a tool tip on the fly, based on a field pulled from the database.

Is there some very, very simple way to have JS pop up the text held in a
Rails field?

You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To view this discussion on the web visit https://groups.google.com/d/msg/rubyonrails-talk/-/nivOQMBsegcJ.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Discussion Posts

Follow ups

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 8 | next ›
Discussion Overview
grouprubyonrails-talk @
postedFeb 19, '12 at 7:11a
activeFeb 20, '12 at 2:49p



site design / logo © 2022 Grokbase