<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:sy="http://purl.org/rss/1.0/modules/syndication/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" version="2.0">
<channel>
	<title>Comments for Ernie Miller</title>
	
	<link>http://erniemiller.org</link>
	<description>No, I don't work in NYC, DC, or the valley, and I'm cool with that.</description>
	<lastBuildDate>Mon, 20 Feb 2012 17:33:00 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/rss+xml" href="http://feeds.feedburner.com/erniemiller-comments" /><feedburner:info uri="erniemiller-comments" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><item>
		<title>Comment on Squeel by Wendel Schultz</title>
		<link>http://feedproxy.google.com/~r/erniemiller-comments/~3/CxzJPffACeM/</link>
		<dc:creator>Wendel Schultz</dc:creator>
		<pubDate>Mon, 20 Feb 2012 17:33:00 +0000</pubDate>
		<guid isPermaLink="false">http://erniemiller.org/?page_id=836#comment-1032</guid>
		<description>I may or may not understand what you're trying to do. I think I've gotten around something similar by creating a Squeel expression string then evaluating it:

    ... // whatever nonsense I do

        case operator
      when 'contains'
        squeel_exp = "proxy.where{ #{filter.attribute_name}.#{sql_operation} ( '%#{value}%' ) }"
      when 'not contains'
        squeel_exp = "proxy.where{ ( #{filter.attribute_name}.eq nil ) | ( #{filter.attribute_name}.#{sql_operation}( '%#{value}%' ) ) }"
    ...
      end

      return eval( squeel_exp )


Let me disclaim that I don't have any good data for performance impact, but right now I'm in the "get it correct" phase, and performance will come later if necessary.</description>
		<content:encoded><![CDATA[<p>I may or may not understand what you&#8217;re trying to do. I think I&#8217;ve gotten around something similar by creating a Squeel expression string then evaluating it:</p>
<p>    &#8230; // whatever nonsense I do</p>
<p>        case operator<br />
      when &#8216;contains&#8217;<br />
        squeel_exp = &#8220;proxy.where{ #{filter.attribute_name}.#{sql_operation} ( &#8216;%#{value}%&#8217; ) }&#8221;<br />
      when &#8216;not contains&#8217;<br />
        squeel_exp = &#8220;proxy.where{ ( #{filter.attribute_name}.eq nil ) | ( #{filter.attribute_name}.#{sql_operation}( &#8216;%#{value}%&#8217; ) ) }&#8221;<br />
    &#8230;<br />
      end</p>
<p>      return eval( squeel_exp )</p>
<p>Let me disclaim that I don&#8217;t have any good data for performance impact, but right now I&#8217;m in the &#8220;get it correct&#8221; phase, and performance will come later if necessary.</p>
<img src="http://feeds.feedburner.com/~r/erniemiller-comments/~4/CxzJPffACeM" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://erniemiller.org/projects/squeel/comment-page-1/#comment-1032</feedburner:origLink></item>
	<item>
		<title>Comment on The Underused collection_singular_ids Method by Scott</title>
		<link>http://feedproxy.google.com/~r/erniemiller-comments/~3/y6JaqSdRKaE/</link>
		<dc:creator>Scott</dc:creator>
		<pubDate>Fri, 10 Feb 2012 17:55:00 +0000</pubDate>
		<guid isPermaLink="false">http://erniemiller.org/?p=599#comment-1031</guid>
		<description>This is a great post - I have recently become aware of the collection_singular_ids method myself.  However, I have a follow up question that I can't seem to resolve: how do you handle it when your association has additional attributes?  In particular, this would involve a has_many :through association in order to allow the join model to have additional attributes, and in my case, the additional attribute is also a foreign key (non-null).  I keep getting an error where the foreign key is null, regardless of if I send it into the params hash using fields_for.  It seems that the collection_singluar_ids method doesn't allow other attributes to be added to the new association.. Have you ever come across this?
thx</description>
		<content:encoded><![CDATA[<p>This is a great post &#8211; I have recently become aware of the collection_singular_ids method myself.  However, I have a follow up question that I can&#8217;t seem to resolve: how do you handle it when your association has additional attributes?  In particular, this would involve a has_many :through association in order to allow the join model to have additional attributes, and in my case, the additional attribute is also a foreign key (non-null).  I keep getting an error where the foreign key is null, regardless of if I send it into the params hash using fields_for.  It seems that the collection_singluar_ids method doesn&#8217;t allow other attributes to be added to the new association.. Have you ever come across this?<br />
thx</p>
<img src="http://feeds.feedburner.com/~r/erniemiller-comments/~4/y6JaqSdRKaE" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://erniemiller.org/2010/10/02/the-underused-collection_singular_ids-method/comment-page-1/#comment-1031</feedburner:origLink></item>
	<item>
		<title>Comment on Squeel by Ross</title>
		<link>http://feedproxy.google.com/~r/erniemiller-comments/~3/5Z4SwjZnbzg/</link>
		<dc:creator>Ross</dc:creator>
		<pubDate>Tue, 07 Feb 2012 04:09:00 +0000</pubDate>
		<guid isPermaLink="false">http://erniemiller.org/?page_id=836#comment-1030</guid>
		<description>Good stuff.
It looks like it might be meant for has_many relations as opposed to belongs_to
because where table names are pluralized joining on a :belongs_to (-eg- belongs_to :role), will result in a table name of 'role' when it should be 'roles'
Is this intended or have I got it wrong.
Ross</description>
		<content:encoded><![CDATA[<p>Good stuff.<br />
It looks like it might be meant for has_many relations as opposed to belongs_to<br />
because where table names are pluralized joining on a :belongs_to (-eg- belongs_to :role), will result in a table name of &#8216;role&#8217; when it should be &#8216;roles&#8217;<br />
Is this intended or have I got it wrong.<br />
Ross</p>
<img src="http://feeds.feedburner.com/~r/erniemiller-comments/~4/5Z4SwjZnbzg" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://erniemiller.org/projects/squeel/comment-page-1/#comment-1030</feedburner:origLink></item>
	<item>
		<title>Comment on Rails 3.1 and the future of MetaWhere and MetaSearch by Valen</title>
		<link>http://feedproxy.google.com/~r/erniemiller-comments/~3/VIuyX5F9vCA/</link>
		<dc:creator>Valen</dc:creator>
		<pubDate>Sun, 05 Feb 2012 21:43:00 +0000</pubDate>
		<guid isPermaLink="false">http://erniemiller.org/?p=978#comment-1029</guid>
		<description>I want to propose additional functionality to 'meta_search' gem.





I work with i18 and usually I keep the translating staff in two places:  in .yml files and in database for models.

Suppose I have model 'Product' with 'name' attribute. I don't have real 'name' attribute in database, but I have instead 'name_ru' and 'name_en' real columns. There are numbers of plugins(translatable_columns, rails-translate) helping to realize this approach. The idea is very simple. We should write in model something like 'translatable_columns :name' and then expression 'Product.first.name' is valid and shows us the 'name_ru' or 'name_en' depending what I18n.locale is. 



So my proposal (I'm sure lots people'll like it)

1. We should write in model something like 'meta_translate :name' and then we should use the same syntax as before without real 'name' attribute in database. If we don't use 'meta_translate :name' in model, everything should work as before.





2. Create class method (let call it 'meta_where')  with the same syntax as 'where' for ActiveRecord, but this method should understand 'name_ru' and 'name_en' . For example Product.meta_where(:name=&gt;'something') should work

even if we don't have real 'name' attribute in database.



Regards, Valen (valenonish@gmail.com)</description>
		<content:encoded><![CDATA[<p>I want to propose additional functionality to &#8216;meta_search&#8217; gem.</p>
<p>I work with i18 and usually I keep the translating staff in two places:  in .yml files and in database for models.</p>
<p>Suppose I have model &#8216;Product&#8217; with &#8216;name&#8217; attribute. I don&#8217;t have real &#8216;name&#8217; attribute in database, but I have instead &#8216;name_ru&#8217; and &#8216;name_en&#8217; real columns. There are numbers of plugins(translatable_columns, rails-translate) helping to realize this approach. The idea is very simple. We should write in model something like &#8216;translatable_columns :name&#8217; and then expression &#8216;Product.first.name&#8217; is valid and shows us the &#8216;name_ru&#8217; or &#8216;name_en&#8217; depending what I18n.locale is. </p>
<p>So my proposal (I&#8217;m sure lots people&#8217;ll like it)</p>
<p>1. We should write in model something like &#8216;meta_translate :name&#8217; and then we should use the same syntax as before without real &#8216;name&#8217; attribute in database. If we don&#8217;t use &#8216;meta_translate :name&#8217; in model, everything should work as before.</p>
<p>2. Create class method (let call it &#8216;meta_where&#8217;)  with the same syntax as &#8216;where&#8217; for ActiveRecord, but this method should understand &#8216;name_ru&#8217; and &#8216;name_en&#8217; . For example Product.meta_where(:name=&gt;&#8217;something&#8217;) should work</p>
<p>even if we don&#8217;t have real &#8216;name&#8217; attribute in database.</p>
<p>Regards, Valen (valenonish@gmail.com)</p>
<img src="http://feeds.feedburner.com/~r/erniemiller-comments/~4/VIuyX5F9vCA" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://erniemiller.org/2011/08/31/rails-3-1-and-the-future-of-metawhere-and-metasearch/comment-page-1/#comment-1029</feedburner:origLink></item>
	<item>
		<title>Comment on Squeel by Ciantainc</title>
		<link>http://feedproxy.google.com/~r/erniemiller-comments/~3/1ti2pKi2gw4/</link>
		<dc:creator>Ciantainc</dc:creator>
		<pubDate>Sun, 29 Jan 2012 17:13:00 +0000</pubDate>
		<guid isPermaLink="false">http://erniemiller.org/?page_id=836#comment-1028</guid>
		<description>Can some clarify this question? How to add 'on' condition to joins in Squeel?</description>
		<content:encoded><![CDATA[<p>Can some clarify this question? How to add &#8216;on&#8217; condition to joins in Squeel?</p>
<img src="http://feeds.feedburner.com/~r/erniemiller-comments/~4/1ti2pKi2gw4" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://erniemiller.org/projects/squeel/comment-page-1/#comment-1028</feedburner:origLink></item>
	<item>
		<title>Comment on Scaling Web Applications: My “3 Questions” Philosophy by Web Application Development</title>
		<link>http://feedproxy.google.com/~r/erniemiller-comments/~3/bzb9_HQDTHg/</link>
		<dc:creator>Web Application Development</dc:creator>
		<pubDate>Tue, 24 Jan 2012 10:59:00 +0000</pubDate>
		<guid isPermaLink="false">http://erniemiller.org/?p=891#comment-1026</guid>
		<description>your 3 questions for scaling web applications are good and answer for this questions are awesome.</description>
		<content:encoded><![CDATA[<p>your 3 questions for scaling web applications are good and answer for this questions are awesome.</p>
<img src="http://feeds.feedburner.com/~r/erniemiller-comments/~4/bzb9_HQDTHg" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://erniemiller.org/2011/06/02/scaling-web-applications-my-3-questions-philosophy/comment-page-1/#comment-1026</feedburner:origLink></item>
	<item>
		<title>Comment on Simplified Active Directory User Authentication by Anonymous</title>
		<link>http://feedproxy.google.com/~r/erniemiller-comments/~3/yKtImI13aQs/</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Fri, 13 Jan 2012 13:01:00 +0000</pubDate>
		<guid isPermaLink="false">http://thebalance.metautonomo.us/?p=15#comment-1023</guid>
		<description>Just a note. with the ruby-net-ldap gem version 0.0.4 code fails with "no connection to server". Using net-ldap gem instead, it works like a charm. Thanks!</description>
		<content:encoded><![CDATA[<p>Just a note. with the ruby-net-ldap gem version 0.0.4 code fails with &#8220;no connection to server&#8221;. Using net-ldap gem instead, it works like a charm. Thanks!</p>
<img src="http://feeds.feedburner.com/~r/erniemiller-comments/~4/yKtImI13aQs" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://erniemiller.org/2008/04/04/simplified-active-directory-authentication/comment-page-1/#comment-1023</feedburner:origLink></item>
	<item>
		<title>Comment on Squeel by Guy Silva</title>
		<link>http://feedproxy.google.com/~r/erniemiller-comments/~3/TzCYDkJlRHU/</link>
		<dc:creator>Guy Silva</dc:creator>
		<pubDate>Wed, 11 Jan 2012 08:51:00 +0000</pubDate>
		<guid isPermaLink="false">http://erniemiller.org/?page_id=836#comment-1022</guid>
		<description>Hi, 
great job with squeel!

I think I found a bug :) 
I have this scope working fine

scope :on_period, -&gt;(start_period, end_period) {
    where{ ((end_date &gt; start_period ) | (end_date == nil) ) &amp; ( start_date (start_period, end_period) {

    where{ (( start_period &lt; end_date ) | (end_date == nil) ) &amp; ( start_date &lt; end_period) }

  }

it stops working resulting in a where conditions like: WHERE (1)

is that suppose to behave like that?</description>
		<content:encoded><![CDATA[<p>Hi,<br />
great job with squeel!</p>
<p>I think I found a bug :)<br />
I have this scope working fine</p>
<p>scope :on_period, -&gt;(start_period, end_period) {<br />
    where{ ((end_date &gt; start_period ) | (end_date == nil) ) &amp; ( start_date (start_period, end_period) {</p>
<p>    where{ (( start_period &lt; end_date ) | (end_date == nil) ) &amp; ( start_date &lt; end_period) }</p>
<p>  }</p>
<p>it stops working resulting in a where conditions like: WHERE (1)</p>
<p>is that suppose to behave like that?</p>
<img src="http://feeds.feedburner.com/~r/erniemiller-comments/~4/TzCYDkJlRHU" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://erniemiller.org/projects/squeel/comment-page-1/#comment-1022</feedburner:origLink></item>
	<item>
		<title>Comment on TextMate 2 + rmate = Awesome by Nicolas Ledez</title>
		<link>http://feedproxy.google.com/~r/erniemiller-comments/~3/1WhKfB1BFpA/</link>
		<dc:creator>Nicolas Ledez</dc:creator>
		<pubDate>Sat, 07 Jan 2012 17:49:00 +0000</pubDate>
		<guid isPermaLink="false">http://erniemiller.org/?p=1035#comment-1021</guid>
		<description>Hello, if you want to have config files for rmate, you can try my pull request:
https://github.com/avian/rmate/pull/2</description>
		<content:encoded><![CDATA[<p>Hello, if you want to have config files for rmate, you can try my pull request:<br />
<a href="https://github.com/avian/rmate/pull/2" rel="nofollow">https://github.com/avian/rmate/pull/2</a></p>
<img src="http://feeds.feedburner.com/~r/erniemiller-comments/~4/1WhKfB1BFpA" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://erniemiller.org/2011/12/12/textmate-2-rmate-awesome/comment-page-1/#comment-1021</feedburner:origLink></item>
	<item>
		<title>Comment on TextMate 2 + rmate = Awesome by Trey Shugart</title>
		<link>http://feedproxy.google.com/~r/erniemiller-comments/~3/Yj2Zk6KTg8s/</link>
		<dc:creator>Trey Shugart</dc:creator>
		<pubDate>Tue, 03 Jan 2012 22:20:00 +0000</pubDate>
		<guid isPermaLink="false">http://erniemiller.org/?p=1035#comment-1020</guid>
		<description>If you use Puppet - which is probably smart if you have 21 servers - why don't you just update your configuration to include that script on all your servers?</description>
		<content:encoded><![CDATA[<p>If you use Puppet &#8211; which is probably smart if you have 21 servers &#8211; why don&#8217;t you just update your configuration to include that script on all your servers?</p>
<img src="http://feeds.feedburner.com/~r/erniemiller-comments/~4/Yj2Zk6KTg8s" height="1" width="1"/>]]></content:encoded>
	<feedburner:origLink>http://erniemiller.org/2011/12/12/textmate-2-rmate-awesome/comment-page-1/#comment-1020</feedburner:origLink></item>
</channel>
</rss>

