Forum: Ruby on Rails SuperInPlaceControl

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
53be54e5db4dc58e4980db5a8255621b?d=identicon&s=25 Harold (Guest)
on 2008-12-05 06:51
(Received via mailing list)
In Rails 2.1, I am using the SuperInPlaceControl plugin to render an
in_place_select on an instance of a model with a has_many
relationship. So far so good, except that when I click on OK to save
the user's selection, the ajax call is posted, the record is updated,
but the label on the view never gets updated. In fact, it blanks out.

I am using render :text in the controller method, and Firebug reports
the text being returned to the client after the ajax call.

Any idea why the label does not update? I would be happy with simply
looking at some example demo, post, etc.

Thanks,
-H
53be54e5db4dc58e4980db5a8255621b?d=identicon&s=25 Harold (Guest)
on 2008-12-05 21:52
(Received via mailing list)
Bump...

The fact that I get no response tells me that nobody is using
SuperInPlaceControls. What's out there for in place select editing on
Rails 2.1? Any pointers or comments welcome.
Thanks.
Bee69cfed999cd13e3bff73d472a39ee?d=identicon&s=25 Hassan Schroeder (Guest)
on 2008-12-05 22:43
(Received via mailing list)
On Fri, Dec 5, 2008 at 12:51 PM, Harold <harold.gimenez@gmail.com>
wrote:

> The fact that I get no response tells me that nobody is using
> SuperInPlaceControls. What's out there for in place select editing on
> Rails 2.1? Any pointers or comments welcome.

I think if you had a reproducible test case, it wouldn't be that hard
to get some help fixing the problem -- it's just JavaScript :-)

>> In Rails 2.1, I am using theSuperInPlaceControlplugin to render an
>> in_place_select on an instance of a model with a has_many
>> relationship. So far so good, except that when I click on OK to save
>> the user's selection, the ajax call is posted, the record is updated,
>> but the label on the view never gets updated. In fact, it blanks out.

Sounds to me like it might be getting updated with an empty value...

FWIW,
--
Hassan Schroeder ------------------------ hassan.schroeder@gmail.com
53be54e5db4dc58e4980db5a8255621b?d=identicon&s=25 Harold A. Giménez Ch. (Guest)
on 2008-12-06 20:04
(Received via mailing list)
You are absolutely right, it's just JavaScript, and digging under the
hood
uncovered my error. I also modified the plugin slightly to accept a :url
parameter in order to specify a controller, action, etc. Just more
flexible.

Thanks,
-H

On Fri, Dec 5, 2008 at 4:42 PM, Hassan Schroeder
<hassan.schroeder@gmail.com
This topic is locked and can not be replied to.