Posts tagged Rails
Jun01
rails railsconf railsconf08 RailsConf RailsConf ‘08 Rails | comments
HTML parse error:
<div class="flair">
<img src="http://farm3.static.flickr.com/2032/2541589315_d20f683b6c_m_d.jpg" width="240" height="180" alt="Baked NYC" /><br />
<div class="text-backing"> </div>
<div class="text">Photo by <a href="http://www.flickr.com/photos/peterhellberg/">Peter Hellberg</a></div>
Continue reading »
May28
rails railsconf railsconf08 RailsConf RailsConf '08 | comments
Just wanted to drop a note in my blog, here, that I will be attending RailsConf from Friday through Sunday. If any lurkers out there are gonna be in attendance, do drop me a note. Let’s meet each other!
Continue reading »
Mar31
Rails ActiveRecord | comments
HTML parse error:
<div class="flair">
<img src="http://farm1.static.flickr.com/28/60990379_d52dd11d69_m_d.jpg" width="240" height="180" alt="Baked NYC" /><br />
<div class="text-backing"> </div>
<div class="text">Photo by <a href="http://www.flickr.com/photos/progoddess/">rachel is ...</a></div>
Continue reading »
Mar29
ActiveResource Rails authorization | comments
As I’ve started to play around here and there with ActiveResource, I’ve noticed lots of complaints about how ActiveResource’s implementation of HTTP basic auth leaves a lot to be desired. Specifically with regard to its lack of support for email addresses as usernames. This won’t work:
Continue reading »
Mar03
Ruby Rails Subversion | comments
My relationship with Subversion is an ever growing one. Right now it is growing itself straight into git. I’m not sure how happy Subversion is with me. It’s complicated.
Continue reading »
Feb28
capistrano rails ruby scm svn Ruby Rails SVN SCM Capistrano | comments
HTML parse error:
<div class="flair">
<img src="http://farm1.static.flickr.com/45/139177165_e3855c6686_m_d.jpg" width="240" height="180" alt="Dung repository" /><br />
<div class="text-backing"> </div>
<div class="text">Photo by <a href="http://flickr.com/photos/cheesygarlicboy/">Chambo25</a></div>
Continue reading »
Jan02
WordPress Ruby on Rails | comments
HTML parse error:
<div class="flair">
<img src="http://farm1.static.flickr.com/4/9183721_1ec8cf6ef4_m.jpg" width="240" height="180" alt="Mad code rewrite" /><br />
<div class="text-backing"> </div>
<div class="text">Photo by <a href="http://flickr.com/photos/zhartley/">zhartley</a></div>
Continue reading »
Dec26
Ruby on Rails Ruby Rails | comments
HTML parse error:
<div class="flair">
<img src="http://farm1.static.flickr.com/49/172347516_064bd42d14_m.jpg" width="240" height="180" alt="Assertive" /><br />
<div class="text-backing"> </div>
<div class="text">Photo by <a href="http://flickr.com/photos/schwarzerwolf/">ausi_blackwolf</a></div>
Continue reading »
Nov28
Ruby Rails programming | comments
So there’s a Category that has many Expenses. The expenses for a category are destroyed when the category is destroyed. Elsewhere in my logic I would like to know if the category is removable based on whether it has any expenses and, if it does, whether any of the expenses it has are greater than zero.
Continue reading »
Nov12
Ruby Rails JavaScript | comments
HTML parse error:
<div class="flair">
<img src="http://farm3.static.flickr.com/2104/1797707604_870dc2f9b1_m.jpg" width="240" height="161" alt="Popup Problems" /><br />
<div class="text-backing"> </div>
<div class="text">Photo by <a href="http://flickr.com/photos/rubbertoe/">rbatina</a></div>
Continue reading »
Nov09
Ruby Rails | comments
Does that title make sense to you? If not, you’re not alone. I dealt with that bit of text for several hours the other day. It’s the beginning of an error message that my pea-sized brain could not parse for the life of me. I received the message while running a simple test involving an assert_select.
Continue reading »
Oct22
Ruby Rails irb script/console readline spacebar problem | comments
Since early this summer, I have had a severely annoying problem with my Ruby consoles (irb and script/console). My spacebar quit functioning, making quick testing of Ruby and Rails functionality quite limited and in some cases impossible. I’ll give you two versions of my story. First the short version.
Continue reading »
Oct15
Rails Ruby single-table inheritance STI | comments
HTML parse error:
<div class="flair">
<img src="http://farm1.static.flickr.com/31/46196140_010d9aeff9_m.jpg" width="240" height="180" alt="Broken Ping-Pong Table" /><br />
<div class="text-backing"> </div>
<div class="text">Photo by <a href="http://flickr.com/photos/darlingsnail/">DarlingSnail</a></div>
Continue reading »
Oct08
Rails Ruby has_many_polymorphs | comments
Previously I discussed getting my feet wet with has_many_polymorphs. In that article I promised a follow-up dealing with checkboxes in a polymorphic world. As I started keying the article, I ran into a much better description of the overall issue by Dylan Fareed (I presume) at I Am Still Alive. Take a look at his has_many_polymorphs overview.
Continue reading »
Oct01
Ruby on Rails Rails model visualization data diagram class visualization class diagram Ruby on Rails Rails model visualization data diagram class visualization class diagram | comments
HTML parse error:
<div class="flair">
<img src="http://farm1.static.flickr.com/218/507682952_8b4eda2922_m.jpg" width="240" height="160" alt="51907_35.jpg" /><br />
<div class="text-backing"> </div>
<div class="text">Photo by <a href="http://flickr.com/photos/always13/">always13</a></div>
Continue reading »
Sep19
Rails has_many_polymorphs Rails | comments
The great thing about my worklife as of late is seemingly every week I get to learn something new. I don’t necessarily have to learn something new, but I certainly want to. My base of experience is growing and I’m arriving at a place where I can recognize when the unknown thing will likely be worth learning to create a more elegant solution. Thankfully I work with people who have a similar grasp on reality.
Continue reading »
Sep12
Ruby on Rails Rails Ruby on Rails Rails | comments
On a recent project, I needed to simulate the YouTube-ish text field selection box. You know the one where you can easily select and copy a link or embed code to send on to your friends. You click in the box, the text is automatically selected, and you can quickly copy the text.
Continue reading »
Sep05
TextMate Rails Ruby on Rails TextMate Rails Ruby on Rails | comments
Update: Don’t bother with the crap I spewed below. Just head over to Rail Spikes. There are a couple options if you read the post and comments.
Continue reading »
Aug29
Ruby on Rails mongrel Slicehost Ruby on Rails mongrel Slicehost | comments
HTML parse error:
<div class="flair">
<img src="http://farm1.static.flickr.com/204/524123975_bed8ab7cbb_m.jpg" width="240" height="160" alt="Cindy" /><br />
<div class="text-backing"> </div>
<div class="text">Photo by <a href="http://flickr.com/photos/georgiap/r">caribbean</a></div>
Continue reading »
Aug27
Ruby on Rails Ruby Rails Ruby on Rails Ruby Rails | comments
HTML parse error:
<div class="flair">
<img src="http://farm2.static.flickr.com/1012/1025919868_ebf0df1a71_m.jpg" width="240" height="160" alt="Matt - rifle" /><br />
<div class="text-backing"> </div>
<div class="text">Photo by <a href="http://flickr.com/photos/amagill/">AMagill</a></div>
Continue reading »
Aug20
Ruby on Rails regular expression Ruby on Rails regular expression | comments
During some freelance work, we had a special requirement that I imagine a lot of people run into. A list of items returned from the database needed to be sorted by name while ignoring English articles: “a,” “an,” and “the.” Though I hate them with a passion, I knew regular expressions were the solution.
Continue reading »
Aug06
Ruby on Rails Apache Ruby on Rails Apache | comments
Recently I implemented a true maintenance page on Scrawlers using Mike Clark’s excellent HOWTO. Clark’s directions show you how to create a more dynamic maintenance page than the standard HTML version we all know and love. It’s a good technique.
Continue reading »
Aug01
logrotate Rails logrotate Rails | comments
Now that I’m managing Scrawlers’ server, I have the power to use a more appropriate Rails log rotation technique than I was allowed at Dreamhost. Specifically, I can use logrotate on my Ubuntu Slicehost slice.
Continue reading »
Jul30
Ruby on Rails programming Ruby on Rails programming | comments
This morning I spent a good while hashing on a problem in some new code I’m updating for a freelance project. I added a couple callbacks to an ActiveRecord model, and things that previously worked were broken. Unfortunately there were no errors in the model or exceptions in the system to give me a hint as to what went wrong. When I finally uncovered the problem, I was thankful that it was something I had never run into before.
Continue reading »
Jul25
Radiant Rails Radiant Rails | comments
On a recent Radiant customization project, I needed to write some tests for a front-end extension. One situation called for a stub object, so I built out the pathing and created the stub object as I’m used to doing in Rails. In extensions/extension_name/test/mocks/test I created a some_mailer.rb object to mock a mailer model, overriding the mailer’s deliver_mail method:
Continue reading »
Mar09
Rails Dreamhost Rails Dreamhost | comments
Following the advice of the Agile Web Development with Rails book, I sought to clear out sessions periodically from the Scrawlers database. I also took a hint from RealityForge.org and put the work directly in Rails, using script/runner to execute. Specifically I created a new model class: SessionCleaner (/app/models/sessioncleaner.rb).
Continue reading »