<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0"><channel><title>ThetaCom - The Daily Grind - Latest Comments</title><link xmlns="http://www.w3.org/2005/Atom" rel="http://api.friendfeed.com/2008/03#sup" href="http://disqus.com/sup/all.sup#forumcomments-b043afb8" type="application/json"/><link>http://thetacom.disqus.com/</link><description>A touch of everything</description><language>en</language><lastBuildDate>Tue, 12 May 2009 02:36:35 -0000</lastBuildDate><item><title>Re: It&amp;#8217;s moving time!   ***House For Sale***</title><link>http://thetacom.info/2008/08/15/its-moving-time-house-for-sale/#comment-9236008</link><description>Thank you for the feedback, but my household goods have already been safely moved.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">thetacom</dc:creator><pubDate>Tue, 12 May 2009 02:36:35 -0000</pubDate></item><item><title>Re: It&amp;#8217;s moving time!   ***House For Sale***</title><link>http://thetacom.info/2008/08/15/its-moving-time-house-for-sale/#comment-9160159</link><description>If you're seeking for some help to transfer your appliances then&lt;br&gt;may i refer you to one of the best house movers in town.&lt;br&gt;They assure your appliances will be safely transferred to your new home.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">securemovers</dc:creator><pubDate>Sat, 09 May 2009 12:48:30 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-5369063</link><description>Hi Cynthia&lt;br&gt;&lt;br&gt;I don't know if you're still working with this, but for anyone else, I worked out how to pass the related item in as a string and display it properly.&lt;br&gt;&lt;br&gt;Use your awesome pastie code, then apply the following: &lt;a href="http://pastie.org/364828" rel="nofollow"&gt;http://pastie.org/364828&lt;/a&gt; and you should be good to go.&lt;br&gt;&lt;br&gt;Unfortunately it doesn't pre-select the current item in the dropdown, but what the heck, it's a minor UI thing that most users won't notice.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Les</dc:creator><pubDate>Mon, 19 Jan 2009 14:10:10 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-5267914</link><description>Did anyone get this part of the plugin working?&lt;br&gt;&lt;br&gt;The entry I'm displaying the in_place_editor_select_field on, has a related gallery, which is stored as gallery_id in the entry table.&lt;br&gt;&lt;br&gt;I'm passing in the entry and gallery id, as per the instructions, but it's only showing the id, and not the name of the related gallery:&lt;br&gt;&lt;br&gt;in_place_editor_select_field :entry, 'gallery_id', {},{:collection =&amp;gt; @galleries_collection.inspect}&lt;br&gt;&lt;br&gt;If anyone has a fix for this I'd be very appreciative!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Les</dc:creator><pubDate>Sun, 18 Jan 2009 13:21:46 -0000</pubDate></item><item><title>Re: My favorite rails plugins</title><link>http://thetacom.info/2008/02/17/my-10-favorite-rails-plugins/#comment-4146493</link><description>Thanks for the information. Keep it coming. will be waiting for the new updates.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">edinburgh accommodation</dc:creator><pubDate>Wed, 03 Dec 2008 10:31:38 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-3569035</link><description>I have switched to this particular plugin as I need validation associated with my in place editing.  However, I found a problem, whereby I am sometimes getting multiple errors returned from my model.&lt;br&gt;&lt;br&gt;I modified in_place_editing.rb::in_place_edit_for method's failure case to this:&lt;br&gt;          errors = ' ' + @item.errors.on(attribute)&lt;br&gt;          if @item.errors.on(attribute).respond_to?(:join)&lt;br&gt;            errors = @item.errors.on(attribute).join("\n")&lt;br&gt;          end&lt;br&gt;&lt;br&gt;          display_value = attribute.to_s.humanize + ' ' + errors || 'Oooops!'&lt;br&gt;&lt;br&gt;I also plan to jigger the response to allow the resultant text to be displayed somewhere other than the existing span, however, I have not figured that out yet.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Nathan Feger</dc:creator><pubDate>Thu, 06 Nov 2008 10:05:00 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-3469613</link><description>Thanks for the extension!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Ferit</dc:creator><pubDate>Tue, 04 Nov 2008 03:54:26 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-1847814</link><description>What does your controller and view code look like, and what are you trying to get as a response. The default response is the current value of the method that is inserted back into the field that was edited.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">thetacom</dc:creator><pubDate>Tue, 26 Aug 2008 02:49:30 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-1847808</link><description>I have updated this page. Please get the new code for the plugin from the pasties link at the top. I was having issue with wordpress garbling large blocks of code. But I know the code from the pastie works.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">thetacom</dc:creator><pubDate>Tue, 26 Aug 2008 02:48:46 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-1847805</link><description>It's just a wrapper for the scriptaculous in place collection editor, which I don't believe will let you add options. If you are looking for an alternative with more features, I suggest trying the dojo inline editor. See my dojo_helper plugin for more information.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">thetacom</dc:creator><pubDate>Tue, 26 Aug 2008 02:47:59 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-1847803</link><description>Cynthia:&lt;br&gt;From what I understand, this is something like what you would want to do:&lt;br&gt;&lt;br&gt;#item_controller&lt;br&gt;&lt;br&gt;#This would provide you with @categories = [[1, "People"],[2, "Animals"]]&lt;br&gt;@categories = Category.find(:all, :select =&amp;gt; "id, name").map {|c| [c.id, c.name] }&lt;br&gt;&lt;br&gt;#item_view&lt;br&gt;&amp;lt; %= in_place_editor_select_field :item, ‘category’, {},{:collection =&amp;gt; @categories.inspect } %&amp;gt;&lt;br&gt;&lt;br&gt;Hope This helps</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">thetacom</dc:creator><pubDate>Tue, 26 Aug 2008 02:47:08 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-1847799</link><description>Cynthia:&lt;br&gt;The array is a set of value key pairs i.e. [[value, "key"], [value, "key"]]&lt;br&gt;I could be wrong about the order, if the value is getting displayed then swap the position of values and keys, then the key should get displayed and the value will get submitted.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">thetacom</dc:creator><pubDate>Tue, 26 Aug 2008 02:46:07 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-1847796</link><description>Cynthia,&lt;br&gt;I believe I understand what your problem is now. Unfortunately, I am in the middle of moving and don't have the time to patch the plugin. If your up to it, I suggest modifying the in_place_edit_field by adding a value parameter, so that you can override the default value. Eventually I plan to setup a github fork to make things a little smoother. But until then, good luck.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">thetacom</dc:creator><pubDate>Tue, 26 Aug 2008 02:45:25 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-1847729</link><description>I guess my question was unclear. I am not having any trouble with the select options - nor with the actual editing. Thanks so much for publishing your code - it works perfectly. &lt;br&gt;&lt;br&gt;What I am struggling with is that my select is for editing a foreign key field. So rather than displaying the value from the database (e.g. 2), I want to display the name of the other object represented by the id 2. If I were really clever, I might be able to extend in_place_edit_for to deal with both a case where I want to display the value OR the case where  I want to show an attribute from the associated model. But I concluded it was easier to create a separate method to deal with updates representing foreign keys. I have things sort of working - except I have not found the correct place to edit to get the initial display value I want. But once I have edited, the code here returns the name of the foreign object rather than the foreign key: &lt;a href="http://pastie.org/253838" rel="nofollow"&gt;http://pastie.org/253838&lt;/a&gt;&lt;br&gt;&lt;br&gt;Note that that code also contains edits I use to have in_place_edits respect validates. And additions so that there can be a default value if the field is initially empty. This still isn't completely done - the initial value still shows up as the id. But I'll update my pastie when I figure that out.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Cynthia</dc:creator><pubDate>Fri, 15 Aug 2008 17:05:35 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-1847725</link><description>Sorry that some of my previous comment disappeared - I should have thought to escape my html-ish tags. &lt;br&gt;&lt;br&gt;@categories.inspect worked perfectly. Thanks!&lt;br&gt;&lt;br&gt;About my second issue - the id being displayed rather than the name - is that how your code behaves? From my reading of the source code, the value displayed before the drop down appears is controlled by in_place_edit_for (in in_place_editing.rb) Did you have to make any changes in that function to display "Red" rather than 1 - and yet still have the select form pass 1 to the set_user_theme_color method? If I am reading that method correctly, I would have to create different setter methods depending on whether my collection for the select options is an array or an array of arrays (that is, is just values or key,value pairs). Is that true?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Cynthia</dc:creator><pubDate>Wed, 13 Aug 2008 13:39:04 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-1847727</link><description>I think I am missing a couple of things here. First, any change you could update your example to take the collection from a variable? I am trying to use your InPlaceCollectionEditor to update a foreign key. It works pretty well if my collection is a string litteral in the view file. But when I try to create a variable to hold that data, I can't get the quoting right to have it interpreted as an array of arrays in JavaScript. &lt;br&gt;&lt;br&gt;This works: &lt;br&gt;  "[[1, 'People'], [2, 'Animals']]"} %&amp;gt;&lt;br&gt;&lt;br&gt;This is the closest I come: &lt;br&gt; @categories} %&amp;gt;&lt;br&gt;&lt;br&gt;but @categories gets flattened into 1People2Animals if I use the bare @categories. If I try quoting it in any way, I just end up with the litteral @categories.&lt;br&gt;&lt;br&gt;My other problem is I can't figure out how to display "Animals" but pass 2. Is there a way to do this? I have tried altering the code in in_place_editor_select_field but no luck. I am wondering if instead, I need to create a custom in_place_edit_for method for foreign key fields - since that is where the display value for the clickable field is created.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Cynthia</dc:creator><pubDate>Tue, 12 Aug 2008 22:12:59 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-1847723</link><description>I had some trouble using this with a collection local in a partial.  There's no way to get an instance to the internal InstanceTag, and InstanceTag.object tries to find an object by using instance_variable_get().  What I wanted was to use the selector  for each item in a collection, rendered in a partial.  But the partial loop variable is a local, not an instance variable, so the InstanceTag ends up with a nil object.&lt;br&gt;&lt;br&gt;The only workaround I found was to tweak the code to let me pass an instance to in_place_editor_select_field explicitly.  Is there a better way?&lt;br&gt;&lt;br&gt;(Also, it's useful to have in_place_collection_editor forward the :value option, which it doesn't currently.)&lt;br&gt;&lt;br&gt;Overall though, this saved me some time.  Thanks for putting it together.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Reach</dc:creator><pubDate>Sun, 27 Apr 2008 16:00:47 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-1847722</link><description>Is it possible to use this on a select where you can add a new item</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Martin</dc:creator><pubDate>Sun, 20 Apr 2008 17:33:01 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-1847721</link><description>Sorry, to clarify my last comment, you need to make the change on line 20 of the in_place_editing.rb file (found in the lib directory of the plugin)&lt;br&gt;&lt;br&gt;If anyone has a faster/more efficient way to find out if the attribute is a relationship, please do tell.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andrew P</dc:creator><pubDate>Tue, 15 Apr 2008 22:43:27 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-1847719</link><description>I'm using this for a bulk edit form, with associations, and i've had to make the following change at like 20. &lt;br&gt;replace&lt;br&gt;          @item.update_attribute(attribute, params[:value])&lt;br&gt;with &lt;br&gt;        begin&lt;br&gt;          @item.update_attribute(attribute, params[:value])&lt;br&gt;        rescue&lt;br&gt;          @item.update_attribute("#{attribute}_id", params[:value])&lt;br&gt;        end&lt;br&gt;&lt;br&gt;then call the in place edit with the association type ('type' rather than 'type_id')&lt;br&gt;&lt;br&gt;Also, from your assoc model, you can add the following&lt;br&gt;&lt;br&gt;  &lt;br&gt;  def self.model_for_inplace_select&lt;br&gt;    "[" + Model.find(:all).collect{ |t| "[#{t.id},'#{t.name}']" }.join(',') + "]"&lt;br&gt;  end&lt;br&gt;  &lt;br&gt;which you can then call to generate the select options. &lt;br&gt;&lt;br&gt;Thanks for the extension!</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Andrew P</dc:creator><pubDate>Tue, 15 Apr 2008 17:19:06 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-1847720</link><description>Hi Do you have an example site showing this working for a select box?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Martin</dc:creator><pubDate>Tue, 15 Apr 2008 14:43:51 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-1847718</link><description>Hello! In spite of the including the full content of ‘in_place_macros_helper.rb’ I still get the error about invalid authenticity token. Does somebody know what may be the reason?</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">gth</dc:creator><pubDate>Mon, 14 Apr 2008 05:12:58 -0000</pubDate></item><item><title>Re: Bookmarks for March 22nd through March 23rd</title><link>http://thetacom.info/2008/03/23/march-22nd-march-23rd/#comment-1847731</link><description>Thanks for the paperclip link.  I'll be crossing that bridge soon on a project, so it is very timely for me.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Barrett</dc:creator><pubDate>Fri, 28 Mar 2008 00:26:23 -0000</pubDate></item><item><title>Re: Who&amp;#8217;s gonna have the last laugh?</title><link>http://thetacom.info/2008/03/15/whos-gonna-have-the-last-laugh/#comment-1847708</link><description>Try the blue path. Ignorance is bliss.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">TJ</dc:creator><pubDate>Mon, 24 Mar 2008 15:01:59 -0000</pubDate></item><item><title>Re: Rails in place editing plugin w/ selection</title><link>http://thetacom.info/2008/03/21/rails-in-place-editing-plugin-w-selection/#comment-1847716</link><description>OK.  I got it.  Here's the deal.  In addition to this extension to the in_place_edit, I am also using a custom_in_place_editing (&lt;a href="http://www.pluitsolutions.com/2007/03/20/custom-in_place_edit-with-validation/" rel="nofollow"&gt;http://www.pluitsolutions.com/2007/03/20/custom...&lt;/a&gt;) s.t. the validation error messages appear in an alert.  &lt;br&gt;&lt;br&gt;I also had textboxes with the in place edit barfing the RJS at me, so I was thinking that somewhere through the layers of additional customization something was off.&lt;br&gt;&lt;br&gt;Yes and No.  I was leaving something out from the in_place_edit that is kind of important for "edge rails" -- this originally came out with a 1.x version of rails.  The :script =&amp;gt; true bit is important.  Doh!&lt;br&gt;&lt;br&gt;The other thing that was amiss is that this does not seem to work with the custom_in_place_editing, but it doesn't need to.  The validations (at least in MY model) are irrelevant because you can only select one of the choices.  There is no need for them to be unique, so there are no additional validations.  So for that one field I have just the in_place_edit for in the controller.  I issue that after I loop through the content fields to issue the in_place_edit_with_validation_for.&lt;br&gt;&lt;br&gt;I have enough hooks in this now that I may just post my own blog entry on how I have mine all tied together.&lt;br&gt;&lt;br&gt;Thanks again for the extension to the in_place_edit.</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Barrett</dc:creator><pubDate>Sun, 23 Mar 2008 22:34:50 -0000</pubDate></item></channel></rss>