<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Think Bohemian &#187; ruby</title>
	<atom:link href="http://www.thinkbohemian.com/tag/ruby/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.thinkbohemian.com</link>
	<description>Secede from Convention in Life and Code</description>
	<lastBuildDate>Tue, 31 Aug 2010 23:37:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Experts Exchange &#8211; Thoughts</title>
		<link>http://www.thinkbohemian.com/2009/10/27/experts-exchange-thoughts/</link>
		<comments>http://www.thinkbohemian.com/2009/10/27/experts-exchange-thoughts/#comments</comments>
		<pubDate>Tue, 27 Oct 2009 13:50:28 +0000</pubDate>
		<dc:creator>Richard Schneeman</dc:creator>
				<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[experts-exchange]]></category>
		<category><![CDATA[forums]]></category>
		<category><![CDATA[gems]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.thinkbohemian.com/?p=126</guid>
		<description><![CDATA[Recently I had a rubygems problem, and after turning to my favorite two forums stack-overflow and ruby-forum was stuck with no answer and no more troubleshooting tips. I kept seeing results for experts exchange in google and while its true you can view answers for free. You have to pay to ask questions.

Figuring that someone [...]]]></description>
			<content:encoded><![CDATA[<p>Recently I had a rubygems problem, and after turning to my favorite two forums <a href="http://stackoverflow.com/">stack-overflow</a> and <a href="http://www.ruby-forum.com/">ruby-forum</a> was stuck with no answer and no more troubleshooting tips. I kept seeing results for experts exchange in google and while its true you can view answers for free. You have to pay to ask questions.</p>
<p><img class="alignleft size-medium wp-image-128" title="experts-exchange" src="http://www.thinkbohemian.com/wp-content/uploads/2009/10/Screen-shot-2009-10-27-at-8.41.36-AM-300x47.png" alt="experts-exchange" width="300" height="47" /></p>
<p>Figuring that someone getting paid to answer my question would provide a little more of a guaranteed response, but after looking into the service, it looks like the only ones getting paid are the fat-cats who set up the site. According to their site <a href="http://www.experts-exchange.com/help.jsp#os=6">help:</a></p>
<blockquote><p>As an Expert you can browse our site ad-free, create your own knowledgebase of useful solutions to 	use throughout your career, build lasting relationships and exchange knowledge with other worldwide 	technology Experts.</p></blockquote>
<p>So much for a dedicated member of the community helping me for money, all they get out of the deal is street-cred which is no different from s<a href="http://stackoverflow.com/">tack-overflow&#8217;s</a> excelent (and free) rating system. The answers turned out to be run of the mill, not bad but certainly not better than other suggestions I had previously received. I ended up figuring out my own obscure answer, and I left learning nothing new about my arch nemesis of systems administration RubyGems.</p>
<p>A rant on RubyGems:</p>
<p>I really dislike rubygems setup, and i&#8217;ve had friends give up trying to learn rails after spending a week trying to install ruby/rails/gems/etc. It would be nice if there was a web-cast for purchase, or really really good site explaining how rubygems works and gets integrated into other applications. There are lots of posts on how to get started, but very few people ever talk about it after they tell you to:</p>
<pre>sudo make install</pre>
<p>If you know anywhere that gives a good healthy overview of how exactly rubygems leverages Ruby and the OS (Unix and OS X )  then please feel free to drop a link in the comments. (And yes i&#8217;ve <a href="http://docs.rubygems.org/read/chapter/2">RTFM</a>)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkbohemian.com/2009/10/27/experts-exchange-thoughts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OnClick Rails Helper for Disqus Style Input Fields</title>
		<link>http://www.thinkbohemian.com/2009/10/11/onclick-rails-helper-for-disqus-style-input-fields/</link>
		<comments>http://www.thinkbohemian.com/2009/10/11/onclick-rails-helper-for-disqus-style-input-fields/#comments</comments>
		<pubDate>Sun, 11 Oct 2009 22:54:25 +0000</pubDate>
		<dc:creator>Richard Schneeman</dc:creator>
				<category><![CDATA[Austin]]></category>
		<category><![CDATA[Musings]]></category>
		<category><![CDATA[Ruby On Rails]]></category>
		<category><![CDATA[Web Development]]></category>
		<category><![CDATA[custom]]></category>
		<category><![CDATA[disqus]]></category>
		<category><![CDATA[form builder]]></category>
		<category><![CDATA[helper method]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[rails]]></category>
		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://www.thinkbohemian.com/?p=87</guid>
		<description><![CDATA[Override the default rails input field text behavior with an intuitive and easy to understand alternative using rails helper methods and simple javascript.]]></description>
			<content:encoded><![CDATA[<p style="text-align: left;">If you haven&#8217;t seen comments by <a href="http://disqus.com/">Disqus</a>, you should probably check them out. If you don&#8217;t care about having programmatic access (as of this post) then its the simplest way of adding a comment system to your website. While their comment widget is pretty neat, i wanted to have the same effects on my input fields that they use, but with all the control and &#8220;flexibility&#8221; that rails gives me.</p>
<p style="text-align: left;">I wanted an input that had the default text grayed out, when you click on it and start typing your text becomes black, and if you delete your text and click outside of the area, the input goes back to its default value. And back to gray. To accomplish this task, i wrote my own custom helper /app/helpers/application_helper.rb:</p>
<pre style="text-align: left;">def default_text_field(name, value)

text_field(name, :value =&gt; value,  :class =&gt; "gray-input", :onfocus =&gt; "if (this.value=='#{value}') this.value = '';this.style.color = 'black';", :onblur =&gt; "if (this.value=='') {this.value = '#{value}';this.style.color = '';}" )

end</pre>
<p style="text-align: left;">So now when i use it in a view like this:</p>
<pre style="text-align: left;">&lt;%= f.default_text_field :website, "Example.com" %&gt;</pre>
<p style="text-align: left;">My view acts like this:</p>
<p style="text-align: center;"><img class="size-medium wp-image-88  alignnone" title="onClickrailsHelper" src="http://www.thinkbohemian.com/wp-content/uploads/2009/10/onClickrailsHelper-300x239.jpg" alt="onClickrailsHelper" width="300" height="239" /></p>
<p style="text-align: left;">The CSS needed for this to work properly is extremely simple:</p>
<pre style="text-align: left;">.gray-input {
color: #7a7a7a;
}</pre>
<p style="text-align: left;">Of course you can use another color if you wish. Hope you enjoyed this little tip, and I hope all your users fall all over themselves at the awesomeness of your sweet new inputs. Good luck, and happy coding.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.thinkbohemian.com/2009/10/11/onclick-rails-helper-for-disqus-style-input-fields/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
