tag:blogger.com,1999:blog-30547433.post3824387112538042604..comments2022-03-24T23:57:06.256-04:00Comments on Bucky Bits: Simple Ajax property toggle in Rails 3.0Dave Newtonhttp://www.blogger.com/profile/13420113088393527059noreply@blogger.comBlogger4125tag:blogger.com,1999:blog-30547433.post-76502783192796550602011-11-15T17:03:11.215-05:002011-11-15T17:03:11.215-05:00Awesome tutorial. Just what I was looking for!Awesome tutorial. Just what I was looking for!Joshhttps://www.blogger.com/profile/18209959725187392440noreply@blogger.comtag:blogger.com,1999:blog-30547433.post-6931980532111298402011-10-31T21:39:49.414-04:002011-10-31T21:39:49.414-04:00@Ray: Nope. The "toggle!" function updat...@Ray: Nope. The "toggle!" function updates in the database immediately, so will be reflected in the rendered JavaScript sent back.<br /><br />Are you sure you're reading it right? The link text is the command: if it's approved, the command is to "un-approve", it's not "un-approved".Dave Newtonhttps://www.blogger.com/profile/13420113088393527059noreply@blogger.comtag:blogger.com,1999:blog-30547433.post-86744367021331499852011-10-28T03:16:45.388-04:002011-10-28T03:16:45.388-04:00I'm almost there with this. My toggle link wil...I'm almost there with this. My toggle link will toggle the record in the database, however the text returned is the opposite of that expected - almost as if the approved? statement is tested before the record changes in the database. Did you encounter this problem?Rayhttp://finelysliced.com.aunoreply@blogger.comtag:blogger.com,1999:blog-30547433.post-67892050822954388362011-10-27T05:21:31.735-04:002011-10-27T05:21:31.735-04:00Love it. So simple. Thanks. However the JQuery ref...Love it. So simple. Thanks. However the JQuery references a slightly different ID for the link. 'approve' vs 'approval'.Rayhttp://finelysliced.com.aunoreply@blogger.com