This post is obsolete. Snippets 0.3 has been released. This post is staying here for historical purposes only.
A new version of Snippets has hit the streets. It now has a fluid design, persistent login, comments, and other scrummy features. Still lots of work to be done, but it's nicely usable now. The source is also available for download here.
PLEASE NOTE THAT SNIPPETS 0.2 IS NOT RAILS 0.13 COMPATIBLE. Rails 0.13 has made some changes that bust Snippets.
You can make it compatible by downloading Snippets 0.21/fixes and unpacking it iin the app/controllers folder. It replaces application.rb and comments_controller.rb, and also provides a replacement routes.rb file you can copy to /config. It also fixes a bug with commenting.
Or if you already have 0.2 and want to patch by HAND...
1) Go into /config/routes.rb and change all integers to quoted.. so :rss => 1, becomes :rss => "1" .. this is due to Routes changing in 0.13.
2) Go into /app/controller/application.rb and find the redirect_back function.. make it look like so:
def redirect_back(default)
if @session['prevpage'].nil?
if default
redirect_to default
else
redirect_to :controller => "", :action => ""
end
else
redirect_to_url @session['prevpage']
end
end
Snippets 0.3 will have more than this, but these are the quick fixes to get it running on Rails 0.13.
Thank you!!!! I am trying to build an application that uses tags, and I was having some SQL troubles. Snippets does something similar, so the source code helped big time. Nice work, by the way.
Posted by: Matt Moriarity at May 22, 2005 01:08 PMThanks for sharing the source. It's great to be able to look at the source of quality apps like Snippets and learn how Rails works.
Posted by: Jon at July 17, 2005 10:20 PMReturn to the homepage.
Privacy Policy