<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="wordpress/2.3.3" -->
<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/"
	>

<channel>
	<title>upstream agile - software</title>
	<link>http://upstream-berlin.com/blog</link>
	<description></description>
	<pubDate>Fri, 25 Apr 2008 14:47:53 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.3.3</generator>
	<language>en</language>
			<item>
		<title>Git commits in the blog sidebar</title>
		<link>http://upstream-berlin.com/blog/2008/04/25/git-commits-in-the-blog-sidebar/</link>
		<comments>http://upstream-berlin.com/blog/2008/04/25/git-commits-in-the-blog-sidebar/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 14:47:53 +0000</pubDate>
		<dc:creator>Alexander Lang</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[blog]]></category>

		<category><![CDATA[commits]]></category>

		<category><![CDATA[github]]></category>

		<category><![CDATA[mashup]]></category>

		<category><![CDATA[open-source]]></category>

		<category><![CDATA[pipes]]></category>

		<category><![CDATA[rss]]></category>

		<category><![CDATA[upstream]]></category>

		<category><![CDATA[yahoo]]></category>

		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/04/25/git-commits-in-the-blog-sidebar/</guid>
		<description><![CDATA[As the careful reader might have noticed, we have added another RSS feed to the blog sidebar. Under the keiala product blog you can now see our commits to all our open source repositories on github. To make this possible I have used yahoo pipes for the first time. The pipe consumes the RSS feeds [...]]]></description>
			<content:encoded><![CDATA[<p>As the careful reader might have noticed, we have added another RSS feed to the blog sidebar. Under the <a href="http://blog.keiala.com">keiala product blog</a> you can now see our commits to all our open source repositories on <a href="http://github.com/langalex">github</a>. To make this possible I have used <a href="http://http://pipes.yahoo.com/">yahoo pipes</a> for the first time. The pipe consumes the RSS feeds of all our open source projects on github, merges these into one, prefixes the titles with the project names and also truncates them, before wordpress consumes that pipe&#8217;s output and displays it in a sidebar widget. That&#8217;s what I call a real mashup. <img src='http://upstream-berlin.com/blog/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> If anyone is interested, here&#8217;s <a href="http://pipes.yahoo.com/pipes/pipe.info?_id=9I7dtOoR3RGi1GANj0nRlg">the pipe</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://upstream-berlin.com/blog/2008/04/25/git-commits-in-the-blog-sidebar/feed/</wfw:commentRss>
		</item>
		<item>
		<title>New Rails Plugin: social feed</title>
		<link>http://upstream-berlin.com/blog/2008/04/25/new-rails-plugin-social-feed/</link>
		<comments>http://upstream-berlin.com/blog/2008/04/25/new-rails-plugin-social-feed/#comments</comments>
		<pubDate>Fri, 25 Apr 2008 14:40:35 +0000</pubDate>
		<dc:creator>Alexander Lang</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[open-source]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[ruby on rails]]></category>

		<category><![CDATA[social feed]]></category>

		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/04/25/new-rails-plugin-social-feed/</guid>
		<description><![CDATA[
This is our latest and also largest plugin for ruby on rails so far. After the installation it adds a social feed as seen in the picture to your rails application. The sources have been extracted from autoki which has had a social feed for a couple of months now, so rest assured we have [...]]]></description>
			<content:encoded><![CDATA[<div style="float:right; margin-left:15px;margin-bottom: 15px"><img src='http://upstream-berlin.com/blog/wp-content/uploads/2008/04/socialfeed.png' alt='socialfeed.png' /></div>
<p>This is our latest and also largest plugin for <a href="htp://rubyonrails.org">ruby on rails</a> so far. After the installation it adds a social feed as seen in the picture to your rails application. The sources have been extracted from <a href="http://autoki.de">autoki</a> which has had a social feed for a couple of months now, so rest assured we have put some thoughts into it over time. <img src='http://upstream-berlin.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Features so far: As a user I can decide what kinds of events I want to see on my social feed and also wether I want to be sent an email when an event occurs. I can also decide wether others will receive a notification on their social feed concerning my own actions.</p>
<p>The plugin includes model extensions for the user, a controller and views for viewing the feed and editing settings as well as a generator to easily create new event types so, getting started only takes a couple of minutes. For more info check out the <a href="http://github.com/langalex/social_feed/tree/master%2FREADME?raw=true">README</a> or <a href="http://github.com/langalex/social_feed/">get the sources from github</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://upstream-berlin.com/blog/2008/04/25/new-rails-plugin-social-feed/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Hiding attachment_fu from your controllers</title>
		<link>http://upstream-berlin.com/blog/2008/04/21/hiding-attachment_fu-from-your-controllers/</link>
		<comments>http://upstream-berlin.com/blog/2008/04/21/hiding-attachment_fu-from-your-controllers/#comments</comments>
		<pubDate>Mon, 21 Apr 2008 10:21:10 +0000</pubDate>
		<dc:creator>Alexander Lang</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[attachment_fu]]></category>

		<category><![CDATA[controller]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[virtual attributes]]></category>

		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/04/21/hiding-attachment_fu-from-your-controllers/</guid>
		<description><![CDATA[Yesterday I was using attachment_fu to attach photos to a couple of models. Since attachment_fu requires you to create an extra model for the photo, you usually have a one to one relationship between the model and the photo.

class Project
  has_one :project_photo
end

But now that you have two models you also have to deal with [...]]]></description>
			<content:encoded><![CDATA[<p>Yesterday I was using <a href="http://svn.techno-weenie.net/projects/plugins/attachment_fu/README">attachment_fu</a> to attach photos to a couple of models. Since attachment_fu requires you to create an extra model for the photo, you usually have a one to one relationship between the model and the photo.</p>
<textarea name="code" class="ruby:showcolumns" cols="60" rows="10">
class Project
  has_one :project_photo
end
</textarea>
<p>But now that you have two models you also have to deal with these in your controller and views, something along the lines of this:</p>
<textarea name="code" class="ruby:showcolumns" cols="60" rows="10">
class ProjectsController
  def new
    @project = Project.new
    @project.build_project_photo
  end

  def create
    @project = Project.new params[:project]
    @project.project_photo = @project.build_project_photo params[:project_photo]

  end
end
</textarea>
<p>Sort of ugly if all you want is to add a photo to the <code>Project</code> model. But fear not, after adding the following piece of code to your model, you can transparently assign the photo to your project model in the view:</p>
<p>The tweaked model:</p>
<textarea name="code" class="ruby:showcolumns" cols="60" rows="10">
class Project
  has_one :project_photo, :dependent => :destroy # the attachment_fu model
  
  # a virtual attribute that saves a new photo in the photo model only when there's a new file uploaded
  def photo=(photo)
    self.project_photo = build_project_photo :uploaded_data => photo unless photo.to_s.blank?
  end
end
</textarea>
<p>Now you can use a standard view:</p>
<textarea name="code" class="ruby:showcolumns" cols="60" rows="10">
< %- form_for(:project) do |f| -%>
  < %= f.file_field :photo %>
< %- end -%>
</textarea>
<p>And a standard controller:</p>
<textarea name="code" class="ruby:showcolumns" cols="60" rows="10">
class ProjectsController
  def new
    @project = Project.new
  end

  def create
    @project = Project.new params[:project]
    @project.save
  end
end
</textarea>
<p>(credits to <a href="http://railscasts.com/episodes/73">this railscast</a> for the idea of using a virtual attribute, I only added a bit of sugar for attachment_fu)</p>
]]></content:encoded>
			<wfw:commentRss>http://upstream-berlin.com/blog/2008/04/21/hiding-attachment_fu-from-your-controllers/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Rails reporting: dead simple reports now supports excel directly</title>
		<link>http://upstream-berlin.com/blog/2008/04/12/rails-reporting-dead-simple-reports-now-supports-excel-directly/</link>
		<comments>http://upstream-berlin.com/blog/2008/04/12/rails-reporting-dead-simple-reports-now-supports-excel-directly/#comments</comments>
		<pubDate>Sat, 12 Apr 2008 20:44:14 +0000</pubDate>
		<dc:creator>Alexander Lang</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[excel]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[reporting]]></category>

		<category><![CDATA[reports]]></category>

		<category><![CDATA[ruby]]></category>

		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/04/12/rails-reporting-dead-simple-reports-now-supports-excel-directly/</guid>
		<description><![CDATA[dead simple reports is a Ruby on Rails plugin that allows you to create reports from your application data within minutes. As of now it can not only generate HTML tables and CSV files but also M$ Excel spreadsheets. This is possible through the use of the spreadsheet-excel gem. You can grab a copy from [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://upstream-berlin.com/blog/open-source/#dead_simple_reports">dead simple reports</a> is a Ruby on Rails plugin that allows you to create reports from your application data within minutes. As of now it can not only generate HTML tables and CSV files but also M$ Excel spreadsheets. This is possible through the use of the <a href="http://rubyforge.org/projects/spreadsheet/">spreadsheet-excel</a> gem. You can grab a copy from the <a href="http://github.com/langalex/dead_simple_reports">git repository</a> or just <a href="http://github.com/langalex/dead_simple_reports/tarball/master">download it</a> from there.</p>
]]></content:encoded>
			<wfw:commentRss>http://upstream-berlin.com/blog/2008/04/12/rails-reporting-dead-simple-reports-now-supports-excel-directly/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Moving to GitHub</title>
		<link>http://upstream-berlin.com/blog/2008/04/11/moving-to-github/</link>
		<comments>http://upstream-berlin.com/blog/2008/04/11/moving-to-github/#comments</comments>
		<pubDate>Fri, 11 Apr 2008 15:07:17 +0000</pubDate>
		<dc:creator>Alexander Lang</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[git]]></category>

		<category><![CDATA[github]]></category>

		<category><![CDATA[subversion]]></category>

		<category><![CDATA[svn]]></category>

		<category><![CDATA[tricks]]></category>

		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/04/11/moving-to-github/</guid>
		<description><![CDATA[
GitHub is out of beta so now we have moved our open source projects there. Actually they already have been there for a while but we have now split them into their own repositories. The upstream subversion will still be online for a while but new commits will only go to git. Apart from being [...]]]></description>
			<content:encoded><![CDATA[<div style="float:right"><a href="http://github.com"><img width="200" src='http://upstream-berlin.com/blog/wp-content/uploads/2008/04/octacat.png' alt='octacat.png' /></a></div>
<p><a href="http://github.com">GitHub</a> is out of beta so now we have moved our open source projects <a href="http://github.com/langalex">there</a>. Actually they already have been there for a while but we have now split them into their own repositories. The upstream subversion will still be online for a while but new commits will only go to git. Apart from being hyped alot these days <a href="http://tomayko.com/writings/the-thing-about-git">git can do some pretty cool things like committing only parts of a file or changing previous commits</a> - well worth checking it out I&#8217;d say.</p>
]]></content:encoded>
			<wfw:commentRss>http://upstream-berlin.com/blog/2008/04/11/moving-to-github/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Monitoring the internals of your Rails application with Nagios</title>
		<link>http://upstream-berlin.com/blog/2008/04/10/monitoring-the-internals-of-your-rails-application-with-nagios/</link>
		<comments>http://upstream-berlin.com/blog/2008/04/10/monitoring-the-internals-of-your-rails-application-with-nagios/#comments</comments>
		<pubDate>Thu, 10 Apr 2008 09:03:19 +0000</pubDate>
		<dc:creator>Alexander Lang</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[monitoring]]></category>

		<category><![CDATA[nagios]]></category>

		<category><![CDATA[plugins]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[ruby]]></category>

		<category><![CDATA[scout]]></category>

		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/04/10/monitoring-the-internals-of-your-rails-application-with-nagios/</guid>
		<description><![CDATA[
autoki has recently grown into a more and more complex application. Besides two clusters of mongrels and the mysql database we have a memcached server, ferret and starling plus clients for asynchronous processing. WIth so many services running (and sometimes not running) the need to monitor all these grew. We decided to set up nagios [...]]]></description>
			<content:encoded><![CDATA[<div style="float:right"><img src="http://nagios.sourceforge.net/images/screens/new/service-detail.png" width="250"/></div>
<p>autoki has recently grown into a more and more complex application. Besides two clusters of mongrels and the mysql database we have a <a href="http://www.danga.com/memcached/">memcached</a> server, <a href="http://projects.jkraemer.net/acts_as_ferret/wiki">ferret</a> and <a href="http://www.slideshare.net/Blaine/scaling-twitter">starling</a> plus <a href="http://playtype.net/past/2008/2/6/starling_and_asynchrous_tasks_in_ruby_on_rails/">clients for asynchronous processing</a>. WIth so many services running (and sometimes not running) the need to monitor all these grew. We decided to set up <a href="http://www.nagios.org/">nagios</a> on one of the servers - it&#8217;s ugly but it lets you monitor all sorts of stuff pretty easily via remote agents that run on each monitored server.</p>
<p>With nagios we have access to quite a number of monitoring plugins, e.g. for monitoring TCP ports (e.g. for checking memcached is still alive), HTTP, server load, free disk space etc. Yesterday I came to a point where I wanted to monitor something nagios couldn&#8217;t: When a user uploads a bunch of photos, the task of creating copies of the photos in different sizes is put in a starling queue for asycnhronous processing. If something with that processing goes wrong and the queue gets too big I want nagios to pick this up and notify me. Time for my own nagios plugin.</p>
<p><a href="http://nagiosplug.sourceforge.net/developer-guidelines.html">Nagios plugins are actually very simple</a>. All you have to provide is something that can be executed in a shell and that returns either 0, 1 or 2 for an OK, Warning or Critical state of the monitored service. So here&#8217;s the source code for monitoring the number of photo uploads in the queue (<em>RAILS_ROOT/lib/check_photo_uploads.rb</em>):</p>
<textarea name="code" class="ruby:showcolumns" cols="60" rows="10">
#!/usr/bin/env ruby

# load rails
RAILS_ENV = 'production'
require File.dirname(__FILE__) + '/../config/environment'

# print out a warning if the queue has 10, critical when 20 entries
warn_count = 10
fatal_count = 20
actual_count = PhotosUpload.count
error = 0

print "photo_uploads "

if actual_count < warn_count
  print "OK"
elsif actual_count >= fatal_count
  print "CRITICAL"
  error = 2
elsif actual_count >= warn_count
  print 'WARNING'
  error = 1
end

puts " #{actual_count} uploads in queue"
exit error # exit with the error code that is then interpreted by nagios
</textarea>
<p>At autoki the server that runs the asynchronous processes is called jobs1 and this is also where the queue should be checked, so I added this to the /etc/nagios/nrpe.cfg file (the config file for the remote nagios agent):</p>
<textarea name="code" class="ruby:showcolumns" cols="60" rows="10">
command[check_photo_uploads]=/usr/bin/ruby /var/www/production/current/lib/check_photo_uploads.rb
</textarea>
<p>Then I had to add the service to the nagios configuration on the monitoring server:</p>
<textarea name="code" class="ruby:showcolumns" cols="60" rows="10">
define service {
        host jobs1
        service_description photo_uploads
        check_command check_nrpe_1arg!check_photo_uploads
        use generic-service
}
</textarea>
<p>Well, that was it, and this is how it looks - ugly but it works <img src='http://upstream-berlin.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p><img src='http://upstream-berlin.com/blog/wp-content/uploads/2008/04/nagios_photo_uploads.png' alt='nagios_photo_uploads.png' width="550" /></p>
<p>(I recently signup with <a href="http://www.scoutapp.com/">scout</a> - looks much prettier and the setup is much easier than nagios, plugins are written as ruby classes and it comes as a ruby gem - sweet concept so far, could have been my idea, more on that later)</p>
]]></content:encoded>
			<wfw:commentRss>http://upstream-berlin.com/blog/2008/04/10/monitoring-the-internals-of-your-rails-application-with-nagios/feed/</wfw:commentRss>
		</item>
		<item>
		<title>4-Tage-Woche und Kreditkarten für alle</title>
		<link>http://upstream-berlin.com/blog/2008/03/10/4-tage-woche-und-kreditkarten-fur-alle/</link>
		<comments>http://upstream-berlin.com/blog/2008/03/10/4-tage-woche-und-kreditkarten-fur-alle/#comments</comments>
		<pubDate>Mon, 10 Mar 2008 10:19:28 +0000</pubDate>
		<dc:creator>Alexander Lang</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[37signals]]></category>

		<category><![CDATA[4-tage-woche]]></category>

		<category><![CDATA[arbeit]]></category>

		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/03/10/4-tage-woche-und-kreditkarten-fur-alle/</guid>
		<description><![CDATA[Das klingt so gut, das machen wir auch: 37signals haben beschlossen, im Sommer nur 4 Tage die Woche zu arbeiten - nach 3 Tagen Wochenende ist man einfach entspannter, glücklicher ergo produktiver. Kreditkarten für alle und finanzielle Beteiligung an den Hobbys der Mitarbeiter - klingt auch nicht schlecht, aber so richtige Mitarbeiter haben wir ja [...]]]></description>
			<content:encoded><![CDATA[<p>Das klingt so gut, das machen wir auch: <a href="http://www.37signals.com/svn/posts/893-workplace-experiments">37signals haben beschlossen, im Sommer nur 4 Tage die Woche zu arbeiten</a> - nach 3 Tagen Wochenende ist man einfach entspannter, glücklicher ergo produktiver. Kreditkarten für alle und finanzielle Beteiligung an den Hobbys der Mitarbeiter - klingt auch nicht schlecht, aber so richtige Mitarbeiter haben wir ja gar nicht, da müssen wir uns was anderes überlegen.</p>
]]></content:encoded>
			<wfw:commentRss>http://upstream-berlin.com/blog/2008/03/10/4-tage-woche-und-kreditkarten-fur-alle/feed/</wfw:commentRss>
		</item>
		<item>
		<title>upstream auf github</title>
		<link>http://upstream-berlin.com/blog/2008/03/04/upstream-auf-github/</link>
		<comments>http://upstream-berlin.com/blog/2008/03/04/upstream-auf-github/#comments</comments>
		<pubDate>Tue, 04 Mar 2008 19:06:44 +0000</pubDate>
		<dc:creator>Alexander Lang</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[git]]></category>

		<category><![CDATA[github]]></category>

		<category><![CDATA[open-source]]></category>

		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/03/04/upstream-auf-github/</guid>
		<description><![CDATA[Nach kurzer Wartezeit habe ich heute meine Einladung zum Betatest von GitHub bekommen und das erst gestern eröffnete public upstream subversion ins public upstream git repository kopiert. Man kann unser großartiges dead simple reports plugin jetzt also auch über git ziehen.
Der Einstieg in github war schonmal sehr angenehm. Um das erste Repository anzulegen bekam ich [...]]]></description>
			<content:encoded><![CDATA[<p>Nach kurzer Wartezeit habe ich heute meine Einladung zum Betatest von <a href="http://github.com">GitHub</a> bekommen und das erst gestern eröffnete <a href="http://public_svn.upstream-berlin.com">public upstream subversion</a> ins <a href="http://github.com/langalex/upstream-open-source">public upstream git repository</a> kopiert. Man kann unser großartiges dead simple reports plugin jetzt also auch über git ziehen.</p>
<p>Der Einstieg in github war schonmal sehr angenehm. Um das erste Repository anzulegen bekam ich erstmal die benötigten Kommandos angezeigt und konnte die gleich in mein Terminal kopieren. Von den diversen git tutorials und <a href="https://peepcode.com/products/git">screencasts</a> ist bei mir leider nicht viel hängen geblieben, sodass ich git wohl erst im Laufe des Praxiseinsatzes richtig kapieren werden. Ein sehr spannender Ansatz bei github ist auf jeden Fall die Möglichkeit, bestehende Repositories zu forken und dann darin zu entwickeln. Statt also irgendwelche Patches an Open Source-Projekte zu senden, forkt man einfach nur noch deren Repository, werkelt darauf herum und kann dann ggf. die Änderungen in das Main-Repository hochladen.</p>
]]></content:encoded>
			<wfw:commentRss>http://upstream-berlin.com/blog/2008/03/04/upstream-auf-github/feed/</wfw:commentRss>
		</item>
		<item>
		<title>upstream goes open source: dead simple reports</title>
		<link>http://upstream-berlin.com/blog/2008/03/03/upstream-goes-open-source-dead-simple-reports/</link>
		<comments>http://upstream-berlin.com/blog/2008/03/03/upstream-goes-open-source-dead-simple-reports/#comments</comments>
		<pubDate>Mon, 03 Mar 2008 15:48:32 +0000</pubDate>
		<dc:creator>Alexander Lang</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[open-source]]></category>

		<category><![CDATA[plugin]]></category>

		<category><![CDATA[rails]]></category>

		<category><![CDATA[reports]]></category>

		<category><![CDATA[ruby]]></category>

		<category><![CDATA[upstream]]></category>

		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/03/03/upstream-goes-open-source-dead-simple-reports/</guid>
		<description><![CDATA[Na endlich. Nach all den Jahren des nur-Geldverdienens und Open Source-Ausnutzens haben wir es geschafft, ein paar erste Zeilen Code in die Freiheit zu entlassen: dead simple reports, ein Rails-Plugin, das Reports generieren kann. Mehr dazu im neuen Bereich Open Source
]]></description>
			<content:encoded><![CDATA[<p>Na endlich. Nach all den Jahren des nur-Geldverdienens und Open Source-Ausnutzens haben wir es geschafft, ein paar erste Zeilen Code in die Freiheit zu entlassen: <a href="http://public_svn.upstream-berlin.com/dead_simple_reports/">dead simple reports</a>, ein Rails-Plugin, das Reports generieren kann. Mehr dazu im neuen Bereich <a href="http://upstream-berlin.com/blog/open-source/">Open Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://upstream-berlin.com/blog/2008/03/03/upstream-goes-open-source-dead-simple-reports/feed/</wfw:commentRss>
		</item>
		<item>
		<title>Delete considered harmful</title>
		<link>http://upstream-berlin.com/blog/2008/02/28/delete-considered-harmful/</link>
		<comments>http://upstream-berlin.com/blog/2008/02/28/delete-considered-harmful/#comments</comments>
		<pubDate>Thu, 28 Feb 2008 11:10:43 +0000</pubDate>
		<dc:creator>Alexander Lang</dc:creator>
		
		<category><![CDATA[Uncategorized]]></category>

		<category><![CDATA[delete]]></category>

		<category><![CDATA[harmful]]></category>

		<category><![CDATA[rails]]></category>

		<guid isPermaLink="false">http://upstream-berlin.com/blog/2008/02/28/delete-considered-harmful/</guid>
		<description><![CDATA[We just encountered a bug in one of our rails applications where we had accidentally used some_mode.delete instead of some_model.destroy. I think delete should not be a public method on ActiveRecord. After all it&#8217;s just some evil means to circumvent all those rails callbacks and stuff to gain some more performance when deleting objects. It [...]]]></description>
			<content:encoded><![CDATA[<p>We just encountered a bug in one of our rails applications where we had accidentally used <code>some_mode.delete</code> instead of <code>some_model.destroy</code>. I think <code>delete</code> should not be a public method on ActiveRecord. After all it&#8217;s just some evil means to circumvent all those rails callbacks and stuff to gain some more performance when deleting objects. It should be a protected method or something so that requires some effort (i.e. model.send(:delete)) to call it so you don&#8217;t use it accidentally when you actually want to call <code>destroy</code>.</p>
]]></content:encoded>
			<wfw:commentRss>http://upstream-berlin.com/blog/2008/02/28/delete-considered-harmful/feed/</wfw:commentRss>
		</item>
	</channel>
</rss>
