<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/css" href="/stylesheets/rss.css"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:trackback="http://madskills.com/public/xml/rss/module/trackback/">
  <channel>
    <title>a.muse: Tag rails</title>
    <link>http://www.jessirae.com/blog/articles/tag/rails</link>
    <language>en-us</language>
    <ttl>40</ttl>
    <description></description>
    <item>
      <title>Sitemap with Rails</title>
      <description>&lt;p&gt;I finally got around to generating a &lt;a href="http://www.jessirae.com/blog/sitemap.xml"&gt;sitemap&lt;/a&gt; for this site.  I used &lt;a href="http://blog.ipangels.com/blog/_archives/2005/6/18/951620.html"&gt;these instructions&lt;/a&gt; for creating sitemaps in rails.  Very simple and straight forward instructions.&lt;/p&gt;


	&lt;p&gt;Unfortunately, the sitemap created isn&amp;#8217;t valid according to google.  The xml document created has &lt;code&gt;&amp;lt;link&amp;gt;&lt;/code&gt; tags instead of &lt;code&gt;&amp;lt;loc&amp;gt;&lt;/code&gt; tags which &lt;a href="https://www.google.com/webmasters/tools/docs/en/protocol.html"&gt;google webmaster&lt;/a&gt; requires.&lt;/p&gt;


	&lt;p&gt;&lt;img src="http://jessirae.com/blog/files/sitemap_errors.png" alt="" /&gt;&lt;/p&gt;


	&lt;p&gt;I am guessing that these errors mean that my sitemap is useless to Google.  Still looking for a solution and will post an update as soon as I find one.&lt;/p&gt;
</description>
      <pubDate>Sat, 20 Jan 2007 18:07:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:0eebc750-875c-4354-9ed2-da7aa39f02d8</guid>
      <author>Jessica</author>
      <link>http://www.jessirae.com/blog/articles/2007/01/20/sitemap-with-rails</link>
      <category>technology</category>
      <category>ruby &amp; rails</category>
      <category>google</category>
      <category>xml</category>
      <category>sitemap</category>
      <category>rails</category>
      <category>ruby</category>
      <trackback:ping>http://www.jessirae.com/blog/articles/trackback/7971</trackback:ping>
    </item>
    <item>
      <title>Typo Tweaks</title>
      <description>&lt;p&gt;There are some annoying things about Typo that are relatively easy to fix.  Here are two changes that I have made.  Pointers to other posts or sites documenting Typo fixes would be appreciated.&lt;/p&gt;


	&lt;p&gt;&lt;em&gt;&lt;strong&gt;Change pagination on Articles page&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;


Find the contents_controller.rb file in typo/app/controller/admin.  Change 
&lt;code&gt;:per_page =&amp;gt; 15&lt;/code&gt; to &lt;code&gt;:per_page =&amp;gt; 35&lt;/code&gt; or how ever many posts you want to see at a time.

	&lt;p&gt;&lt;em&gt;&lt;strong&gt;Save As Draft&lt;/strong&gt;&lt;/em&gt;&lt;/p&gt;


	&lt;p&gt;In order the save posts as drafts in Typo, you can change the published date to some date in the future.  Instead of doing this manually everytime you want to create a draft, you can create a link that will automatically save whatever post you are working on with a publish date far in the future.  The following Typo changes add a link that allows you to create a draft post.  The draft post will be save with a publish date approximately one year from the current date.&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;Make a copy of new.rhtml, name it draft.rhtml and change the action in the form tag from &amp;#8220;new&amp;#8221; to &amp;#8220;draft&amp;#8221;.&lt;/li&gt;
	&lt;/ul&gt;


	&lt;ul&gt;
	&lt;li&gt;Add the following code to typo/app/helpers/admin/base_helper.rb&lt;/li&gt;
	&lt;/ul&gt;


&lt;pre class="code"&gt;  
def task_draft(title)
    task(title, 'draft')
 end&lt;/pre&gt;

	&lt;ul&gt;
	&lt;li&gt;Add the following code to typo/app/views/admin/content/list.rhtml:&lt;/li&gt;
	&lt;/ul&gt;


&lt;pre class="code"&gt;  &amp;lt;div id="draft" style="display:none;position:absolute;"&amp;gt;
    &amp;lt;%= render :partial =&amp;gt; "admin/content/draft" %&amp;gt;
  &amp;lt;/div&amp;gt;
&lt;/pre&gt;

	&lt;ul&gt;
	&lt;li&gt;Also on the list.rhtml page, make sure you add the link from the list page to the draft page, like this:&lt;/li&gt;
	&lt;/ul&gt;


&lt;pre class="code"&gt;
&amp;lt;%= task_draft('Draft') %&amp;gt;
&lt;/pre&gt;

	&lt;ul&gt;
	&lt;li&gt;Replace the get_or_build_article method in typo/app/controllers/admin/content_controller.rb with the following code:&lt;/li&gt;
	&lt;/ul&gt;


&lt;pre class="code"&gt;
def get_or_build_article
    @article = case params[:action]
               when 'new'
                 art = this_blog.articles.build
                 art.allow_comments =  this_blog.default_allow_comments
                 art.allow_pings    = this_blog.default_allow_pings
                 art.published      = true
                 art
               when 'edit'
                 this_blog.articles.find(params[:id])
               when 'draft'
         art = this_blog.articles.build
                 art.allow_comments = this_blog.default_allow_comments
                 art.allow_pings    = this_blog.default_allow_pings
                 art.published      = true
         t = Time.now + (365 * 24 * 60 * 60)
         art.published_at = t
                 art
           else
                 raise "Don't know how to get article for action: #{params[:action]}" 
               end
  end
&lt;/pre&gt;
&lt;br /&gt;
More to come; any requests?
&lt;br /&gt;
&lt;br /&gt;

&lt;strong&gt;Tweaks Elsewhere&lt;/strong&gt;
	&lt;ul&gt;
	&lt;li&gt;&lt;a href="http://www.michaelbuffington.com/articles/2006/01/24/small-tweak-for-typo"&gt;Subdirectories for Typo&amp;#8217;s image folder:&lt;/a&gt; &lt;em&gt;Now you have no excuse for having a messy image folder!&lt;/em&gt;&lt;/li&gt;
		&lt;li&gt;&lt;a href="http://e.cactuswax.net/articles/2006/04/29/typo-on-dreamhost-tweaks/"&gt;Speed Up Typo on Dreamhost&lt;/a&gt;&lt;/li&gt;
	&lt;/ul&gt;
</description>
      <pubDate>Wed, 15 Nov 2006 14:13:00 -0600</pubDate>
      <guid isPermaLink="false">urn:uuid:fb69ed02-99be-4d82-8960-70ab066fd44a</guid>
      <author>Jessica</author>
      <link>http://www.jessirae.com/blog/articles/2006/11/15/typo-tweaks</link>
      <category>technology</category>
      <category>ruby &amp; rails</category>
      <category>ruby</category>
      <category>rails</category>
      <category>blogging</category>
      <category>updates</category>
      <category>tweaks</category>
      <category>typo</category>
      <trackback:ping>http://www.jessirae.com/blog/articles/trackback/399</trackback:ping>
    </item>
    <item>
      <title>Mephisto</title>
      <description>&lt;center&gt;&lt;img src="http://jessirae.com/blog/files/mephisto.png" alt="" /&gt;&lt;/center&gt;

	&lt;p&gt;I was looking for the instructions to upgrade to Typo 4.0 (for my other blog).  And my search for &amp;#8220;upgrade typo&amp;#8221; resulted in a link to Mephisto, which I have been wanting to try.  So, I installed Mephisto on my local machine.  Here are my first impressions:&lt;/p&gt;


	&lt;ul&gt;
	&lt;li&gt;I liked that when you log out of Mephisto you are sent straight to your blog instead of some weird &amp;#8220;Where would you like to go?&amp;#8221; page.  I am guessing that you could change this in Typo fairly easily.  &lt;/li&gt;
		&lt;li&gt;I didn&amp;#8217;t like that tags have to be separated with commas&lt;/li&gt;
		&lt;li&gt;I was left wondering, &amp;#8220;What was so wrong about Typo that would make you write something like Mephisto?  I mean from a UI design perspective Mephisto isn&amp;#8217;t that much better than Typo 4.0.&amp;#8221; &lt;/li&gt;
		&lt;li&gt;But I am sure the Mephisto people are working on new features as I type this.  So, I am considering upgrading my other blog to Mephisto and keeping this one on Typo.  But which one should I try to write plugins/additions for?&lt;/li&gt;
	&lt;/ul&gt;


&lt;strong&gt;Things that Mephisto has that Typo does not&lt;/strong&gt;:
	&lt;ol&gt;
	&lt;li&gt;Theme uploading and editing&lt;/li&gt;
		&lt;li&gt;You can subscribe to your own Overview feed, which includes upcoming as well as already published posts&lt;/li&gt;
		&lt;li&gt;Mephisto has sections rather than categories, which I think will help users think of ways of &lt;a href="http://mephisto.stikipad.com/help/show/Create+a+site+that+isn%27t+a+blog+with+Mephisto"&gt;using Mephisto to manage sites that aren&amp;#8217;t blogs&lt;/a&gt;&lt;/li&gt;
		&lt;li&gt;A &lt;em&gt;Save As Draft&lt;/em&gt; Option&lt;/li&gt;
		&lt;li&gt;A Bucket to use as a temporary place to toss some assets while browsing in the asset manager&lt;/li&gt;
	&lt;/ol&gt;


	&lt;p&gt;If you know of any cool Mephisto features that I haven&amp;#8217;t listed here, please post them.&lt;/p&gt;
</description>
      <pubDate>Tue, 24 Oct 2006 19:03:00 -0500</pubDate>
      <guid isPermaLink="false">urn:uuid:efabc88a-3399-4c88-a766-ea904cc243b0</guid>
      <author>Jessica</author>
      <link>http://www.jessirae.com/blog/articles/2006/10/24/mephisto</link>
      <category>technology</category>
      <category>ruby &amp; rails</category>
      <category>rails</category>
      <category>blogging</category>
      <category>mephisto</category>
      <trackback:ping>http://www.jessirae.com/blog/articles/trackback/255</trackback:ping>
    </item>
  </channel>
</rss>
