<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Recent Posts in Rails Recipes | Pragmatic Forums</title>
    <link>http://forums.pragprog.com/forums/8/posts</link>
    <language>en-us</language>
    <ttl>60</ttl>
    <item>
      <title>Mr Fowler's Rails Recipes with Rails 2? posted by Paul Nelligan @ Mon, 27 Oct 2008 20:49:24 -0000</title>
      <description>&lt;p&gt;I concur&amp;#8230; working through the first example right now, but we&amp;#8217;ll see&lt;/p&gt;</description>
      <pubDate>Mon, 27 Oct 2008 20:49:24 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:873:5648</guid>
      <author>Paul Nelligan</author>
      <link>http://forums.pragprog.com/forums/8/topics/873</link>
    </item>
    <item>
      <title>Mr Fowler's Rails Recipes with Rails 2? posted by Reuben Sivan @ Fri, 10 Oct 2008 15:44:40 -0000</title>
      <description>&lt;p&gt;Sadly, the no reply in this thread seems to confirm your feeling (and mine) that RR is outdated.&lt;br /&gt;I&amp;#8217;ve spent the last few hours trying to get the first example running&amp;#8230;. I wonder if I wasted my money in the book (and my time).&lt;/p&gt;</description>
      <pubDate>Fri, 10 Oct 2008 15:44:40 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:873:5107</guid>
      <author>Reuben Sivan</author>
      <link>http://forums.pragprog.com/forums/8/topics/873</link>
    </item>
    <item>
      <title>Mr Fowler's Rails Recipes with Rails 2? posted by Mark Bush @ Sun, 24 Aug 2008 03:34:30 -0000</title>
      <description>&lt;p&gt;Hi Guys!&lt;/p&gt;


	&lt;p&gt;I just finished &lt;span class="caps"&gt;AWDWR&lt;/span&gt; and I am looking to move on. I know the Rails Recipes was published in &amp;#8216;06, and now we have Advanced Rails Recipes. My question? Should I move right to Advanced since it&amp;#8217;s more recent? Will I be fighting with the Rails Recipes code to get it updated? Is Rails Recipes going to be updated, or is Advanced Rails Recipes the &amp;#8220;second iteration&amp;#8221; of the series?&lt;/p&gt;


	&lt;p&gt;Thanks so much! I appreciate it!&lt;/p&gt;</description>
      <pubDate>Sun, 24 Aug 2008 03:34:30 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:873:4296</guid>
      <author>Mark Bush</author>
      <link>http://forums.pragprog.com/forums/8/topics/873</link>
    </item>
    <item>
      <title>(Advanced) Rails Recipes second editions? posted by Mr Dale Cunningham @ Wed, 25 Jun 2008 07:07:55 -0000</title>
      <description>&lt;p&gt;Are Rails 2.0/2.0 versions of these two books planned? I&amp;#8217;m a beginning rails programmer (Have the new version of &lt;span class="caps"&gt;AWDWR&lt;/span&gt;) and would like to get a relevant version of both the Recipes books too, when they become available.&lt;/p&gt;


	&lt;p&gt;Thanks in advance,&lt;/p&gt;</description>
      <pubDate>Wed, 25 Jun 2008 07:07:55 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:586:3334</guid>
      <author>Mr Dale Cunningham</author>
      <link>http://forums.pragprog.com/forums/8/topics/586</link>
    </item>
    <item>
      <title>In place select editor field posted by russell Roberts @ Sun, 13 Apr 2008 11:57:47 -0000</title>
      <description>&lt;p&gt;Hi&lt;/p&gt;


	&lt;p&gt;I am using this succesfully if I follow the example and use the country collection for the select.&lt;/p&gt;


	&lt;p&gt;Should it be possible to edit a has_many field?&lt;/p&gt;


	&lt;p&gt;I have product belongs to category and category has many products&lt;/p&gt;


	&lt;p&gt;So in my show view of the product I have&lt;/p&gt;


	&lt;p&gt;&amp;lt;%=  product.category.name if product.category_id %&amp;gt;&lt;/p&gt;


	&lt;p&gt;and in my new I have&lt;/p&gt;


	&lt;p&gt;&amp;lt;%= f.collection_select :category_id, Category.for_collection,:id,:name %&amp;gt;&lt;/p&gt;


	&lt;p&gt;So I am not sure how to get this to work with In place select editor field.&lt;/p&gt;


	&lt;p&gt;Thank you Russell&lt;/p&gt;</description>
      <pubDate>Sun, 13 Apr 2008 11:57:47 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:366:2585</guid>
      <author>russell Roberts</author>
      <link>http://forums.pragprog.com/forums/8/topics/366</link>
    </item>
    <item>
      <title>Xhtml functionality in Html file posted by Bob Barry @ Fri, 25 Jan 2008 21:04:58 -0000</title>
      <description>&lt;p&gt;Firefox and Internet Explorer appear to look at the incoming file tag to decide whether to treat the file contents as Html or Xhtml. Using Rails, I&amp;#8217;d like to make templates that include Xhtml elements having MathML and &lt;span class="caps"&gt;SVG&lt;/span&gt;. Innocently, I thought I could get the browser to think Xhtml by finding the right &lt;span class="caps"&gt;DOCTYPE&lt;/span&gt; and &lt;span class="caps"&gt;META&lt;/span&gt; lines within a file having tag html. &lt;br /&gt;I still think that must be right, but I haven&amp;#8217;t figured out how to write the &lt;span class="caps"&gt;DOCTYPE&lt;/span&gt; and /or &lt;span class="caps"&gt;META&lt;/span&gt; lines. &lt;br /&gt;All ideas will be welcome.&lt;/p&gt;


	&lt;p&gt;To be clear: A file opened by Firefox containing an &amp;lt;svg&gt; element will render the circle on the browser page &lt;span class="caps"&gt;PROVIDED&lt;/span&gt; the file&amp;#8217;s tag is Xhtml or Xml. Say, &amp;#8216;circle demo.xhtml&amp;#8217;   but if the file tag is changed &amp;#8216;circle demo.html&amp;#8217; then Firefox will not render the circle.  &lt;br /&gt;Thanks.&lt;br /&gt;Bob Barry&lt;/p&gt;</description>
      <pubDate>Fri, 25 Jan 2008 21:04:58 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:238:2227</guid>
      <author>Bob Barry</author>
      <link>http://forums.pragprog.com/forums/8/topics/238</link>
    </item>
    <item>
      <title>Instant rails and Oracle 10G posted by Dante Deero @ Sun, 13 Jan 2008 14:07:55 -0000</title>
      <description>&lt;p&gt;I am a newbie on rails and I was wondering if anyone could help out on how to configure and set up instant rails to connect to oracle 10G database.There seems to be no post about this.&lt;br /&gt;Thanks&lt;/p&gt;</description>
      <pubDate>Sun, 13 Jan 2008 14:07:55 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:216:2164</guid>
      <author>Dante Deero</author>
      <link>http://forums.pragprog.com/forums/8/topics/216</link>
    </item>
    <item>
      <title>Authorizing Users with Roles posted by Karsten Wilke @ Tue, 20 Nov 2007 13:04:31 -0000</title>
      <description>&lt;p&gt;Hi, i downloaded the source for the book and i wanted to look up the source for Authorizing Users with Roles but i can not find it. Does the example come with the code you can download or is it not in there ?&lt;/p&gt;</description>
      <pubDate>Tue, 20 Nov 2007 13:04:31 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:147:1953</guid>
      <author>Karsten Wilke</author>
      <link>http://forums.pragprog.com/forums/8/topics/147</link>
    </item>
    <item>
      <title>Discuss the Book posted by Adam Beguelin @ Mon, 19 Nov 2007 08:57:49 -0000</title>
      <description>&lt;p&gt;In the &amp;#8220;raise() is your friend&amp;#8221; box on page 6, you talk about adding the method set_contact_name.  It would be useful if you mentioned where that should be added.    Does it go in contact_controller.rb?  I tried this and it didn&amp;#8217;t seem to work.  Putting it in the model doesn&amp;#8217;t make sense.  Maybe it goes in the rhtml file somehow&amp;#8230;&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;Regards,
Adam&lt;/code&gt;&lt;/pre&gt;</description>
      <pubDate>Mon, 19 Nov 2007 08:57:49 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1951</guid>
      <author>Adam Beguelin</author>
      <link>http://forums.pragprog.com/forums/8/topics/1</link>
    </item>
    <item>
      <title>Discuss the Book posted by Fora User @ Mon, 10 Sep 2007 22:02:31 -0000</title>
      <description>&lt;p&gt;&amp;#8220;Regarding authorization based on roles/rights as assigned to controller &amp;#38; action (Recipe #32). I am realizing that I have to add an entry for every single method I come up with in my controllers. Is this the intended functionality, or am I twisted around backwards on this? It seems like a heck of a lot of extra inputing/configuring. I just added 6 methods and realized that I can&#8217;t access any of them until I add a row for each one (per accessible role) in rights_roles table.&lt;/p&gt;


	&lt;p&gt;Is there a way to give a single role access to all methods in a controller? Or pehaps by using some sort of naming convention, have it so that any method that starts with &lt;span class="caps"&gt;ADM&lt;/span&gt; is automatically accessible by administrators and any that start with &lt;span class="caps"&gt;USR&lt;/span&gt; is accessible to users?&amp;#8221;&lt;/p&gt;


	&lt;p&gt;@RWalker&lt;/p&gt;


	&lt;p&gt;I agree. I&amp;#8217;m facing this same situation. I have about 10 controllers in my app with at least 4 actions each and that adds up to a lot of rows in the rights table.&lt;/p&gt;


	&lt;p&gt;That&amp;#8217;s not soo bad, if you just automate the insertion in the dev enviroment (I made a simple rake task). However, I&amp;#8217;m even more confused on how to test it. Actually how to add roles to my user in my test fixture. Since User.roles only exists in rails and not in the db, how am I supposed to represent this?&lt;/p&gt;


	&lt;p&gt;administrators:
  id: 1
  name: Administrators
  rights: How do I add a right to the rights array with fixtures?&lt;/p&gt;</description>
      <pubDate>Mon, 10 Sep 2007 22:02:31 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1193</guid>
      <author>Fora User</author>
      <link>http://forums.pragprog.com/forums/8/topics/1</link>
    </item>
    <item>
      <title>Discuss the Book posted by Fora User @ Mon, 10 Sep 2007 19:02:26 -0000</title>
      <description>&lt;p&gt;From what I can gather to date, the acts_as_taggable plugin (the &lt;span class="caps"&gt;DHH&lt;/span&gt; plugin specifically) has been retired and is no longer being maintained. The latest version of the &lt;span class="caps"&gt;README&lt;/span&gt; states that it was intended as a proof-of-concept module, and was not ever intended to be used for production code. A thread in the rubyonrails-core news group supports this. See &lt;a href="http://www.ruby-forum.com/topic/124063#552714"&gt;http://www.ruby-forum.com/topic/124063#552714&lt;/a&gt; for links to both sources.&lt;/p&gt;</description>
      <pubDate>Mon, 10 Sep 2007 19:02:26 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1189</guid>
      <author>Fora User</author>
      <link>http://forums.pragprog.com/forums/8/topics/1</link>
    </item>
    <item>
      <title>Discuss the Book posted by Fora User @ Mon, 10 Sep 2007 10:30:58 -0000</title>
      <description>&lt;p&gt;In all the rails tutorials I&amp;#8217;ve seen they boast about how important and easy it is to hash password in the DB. However, I see none of them address the issue of the password being transmitted in plain text once once the user licks &amp;#8220;Login&amp;#8221; on the client. Is everybody assuming that &lt;span class="caps"&gt;SSL&lt;/span&gt; is in use?&lt;/p&gt;</description>
      <pubDate>Mon, 10 Sep 2007 10:30:58 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1184</guid>
      <author>Fora User</author>
      <link>http://forums.pragprog.com/forums/8/topics/1</link>
    </item>
    <item>
      <title>Discuss the Book posted by Fora User @ Fri, 07 Sep 2007 00:44:57 -0000</title>
      <description>&lt;p&gt;i recently experienced the same problem, but turns out the problem was stupid programmer syndrome&amp;#8230;&lt;/p&gt;


	&lt;p&gt;this error also shows up if you name your migration file something like &amp;#8220;097_CreateAccounts.rb&amp;#8221; instead of &amp;#8220;097_create_accounts.rb&amp;#8221;&lt;/p&gt;


	&lt;p&gt;go figure.  at least fixing this was a heck of a lot easier than reinstalling rails.&lt;/p&gt;</description>
      <pubDate>Fri, 07 Sep 2007 00:44:57 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1177</guid>
      <author>Fora User</author>
      <link>http://forums.pragprog.com/forums/8/topics/1</link>
    </item>
    <item>
      <title>Write Your Own! posted by Fora User @ Sun, 05 Aug 2007 16:34:38 -0000</title>
      <description>&lt;p&gt;Great post, Maxim.&lt;/p&gt;


	&lt;p&gt;To take it even further, you can use any partial to act as a layout:&lt;/p&gt;


&lt;strong&gt;application_helper.rb&lt;/strong&gt;
&lt;pre&gt;&lt;code&gt;
def inside(partial, AMPERSANDblock)
  instance_variable_set(:@content_for_layout, capture(AMPERSANDblock))
  concat(render(:partial =&amp;gt; partial), block.binding)
end
&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;strong&gt;_wrapper.rhtml&lt;/strong&gt; &lt;small&gt;(the outer layout partial)&lt;/small&gt;
&lt;pre&gt;&lt;code&gt;
&amp;lt;div id="wrapper"&amp;gt;
  &amp;lt;%= yield %&amp;gt;
&amp;lt;div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;strong&gt;content.rhtml&lt;/strong&gt; &lt;small&gt;(the actual template)&lt;/small&gt;
&lt;pre&gt;&lt;code&gt;
&amp;lt;% inside "wrapper" do -%&amp;gt;
  Inside the wrapper
&amp;lt;% end -%&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

&lt;strong&gt;Result:&lt;/strong&gt;
&lt;pre&gt;&lt;code&gt;
&amp;lt;div id="wrapper"&amp;gt;
  Inside the wrapper
&amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;br/&gt;

	&lt;p&gt;This is completely compatible with the standard Rails layouts. They&amp;#8217;ll work like they did before.&lt;/p&gt;


	&lt;p&gt;However, I don&amp;#8217;t know if this plays well with page caching. Testing this is left as an exercise for the reader :)&lt;/p&gt;


	&lt;p&gt;&amp;#8212;Andy&lt;/p&gt;</description>
      <pubDate>Sun, 05 Aug 2007 16:34:38 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:2:1125</guid>
      <author>Fora User</author>
      <link>http://forums.pragprog.com/forums/8/topics/2</link>
    </item>
    <item>
      <title>Discuss the Book posted by Fora User @ Thu, 05 Jul 2007 01:11:14 -0000</title>
      <description>&lt;p&gt;OK, last post was in extreme frustration. apologies!&lt;/p&gt;


	&lt;p&gt;Actually this has turned out to be a blessing in diguise. I now know how to do authentication back to front and sideways. So many hours spent working out this one = so much learning!&lt;/p&gt;</description>
      <pubDate>Thu, 05 Jul 2007 01:11:14 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1032</guid>
      <author>Fora User</author>
      <link>http://forums.pragprog.com/forums/8/topics/1</link>
    </item>
    <item>
      <title>Discuss the Book posted by Fora User @ Tue, 03 Jul 2007 18:15:22 -0000</title>
      <description>&lt;p&gt;Oh! it just a typo in the pdf: the write access is &amp;#8217; w&amp;#8217; (with space!)&lt;/p&gt;</description>
      <pubDate>Tue, 03 Jul 2007 18:15:22 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1029</guid>
      <author>Fora User</author>
      <link>http://forums.pragprog.com/forums/8/topics/1</link>
    </item>
    <item>
      <title>Discuss the Book posted by Fora User @ Tue, 03 Jul 2007 17:50:50 -0000</title>
      <description>&lt;p&gt;Hello,&lt;/p&gt;


	&lt;p&gt;When i&amp;#8217;m &amp;#8220;rake&amp;#8221; the task, here the output:&lt;/p&gt;


&lt;blockquote&gt;
	&lt;p&gt;railsroller@linux-lzb0:~/rails_app/trunk&gt; rake extract_expertises_and_their_categories&amp;#8212;trace
	(in /home/railsroller/rails_app/trunk)
	&lt;ul&gt;
	&lt;li&gt;Invoke extract_expertises_and_their_categories (first_time)&lt;/li&gt;
		&lt;li&gt;Invoke environment (first_time)&lt;/li&gt;
		&lt;li&gt;Execute environment&lt;/li&gt;
		&lt;li&gt;Execute extract_expertises_and_their_categories
	rake aborted!&lt;/li&gt;
	&lt;/ul&gt;&lt;/p&gt;

&lt;/blockquote&gt;




&lt;blockquote&gt;
	&lt;p&gt;illegal access mode  w&lt;/p&gt;

&lt;/blockquote&gt;




&lt;blockquote&gt;
	&lt;p&gt;/home/railsroller/rails_app/trunk/config/../lib/tasks/expertises.rake:12:in `initialize&amp;#8217;
	/home/railsroller/rails_app/trunk/config/../lib/tasks/expertises.rake:12:in `open&amp;#8217;
	/home/railsroller/rails_app/trunk/config/../lib/tasks/expertises.rake:12
	/home/railsroller/rails_app/trunk/config/../lib/tasks/expertises.rake:10:in `each&amp;#8217;
	/home/railsroller/rails_app/trunk/config/../lib/tasks/expertises.rake:10
	/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `call&amp;#8217;
	/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute&amp;#8217;
	/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `each&amp;#8217;
	/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:392:in `execute&amp;#8217;
	/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:362:in `invoke&amp;#8217;
	/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `synchronize&amp;#8217;
	/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:355:in `invoke&amp;#8217;
	/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level&amp;#8217;
	/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `each&amp;#8217;
	/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1739:in `top_level&amp;#8217;
	/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in `standard_exception_handling&amp;#8217;
	/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1733:in `top_level&amp;#8217;
	/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1711:in `run&amp;#8217;
	/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1761:in `standard_exception_handling&amp;#8217;
	/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/lib/rake.rb:1708:in `run&amp;#8217;
	/usr/local/lib/ruby/gems/1.8/gems/rake-0.7.3/bin/rake:7
	/usr/local/bin/rake:16:in `load&amp;#8217;
	/usr/local/bin/rake:16&lt;/p&gt;

&lt;/blockquote&gt;




	&lt;p&gt;I had a debt about access right to the fs but i got the same error even with the super user.&lt;/p&gt;</description>
      <pubDate>Tue, 03 Jul 2007 17:50:50 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1025</guid>
      <author>Fora User</author>
      <link>http://forums.pragprog.com/forums/8/topics/1</link>
    </item>
    <item>
      <title>Discuss the Book posted by Fora User @ Tue, 03 Jul 2007 05:55:38 -0000</title>
      <description>&lt;p&gt;Actually I am really pissed&amp;#8230;..&lt;/p&gt;</description>
      <pubDate>Tue, 03 Jul 2007 05:55:38 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1021</guid>
      <author>Fora User</author>
      <link>http://forums.pragprog.com/forums/8/topics/1</link>
    </item>
    <item>
      <title>Discuss the Book posted by Fora User @ Tue, 03 Jul 2007 05:43:23 -0000</title>
      <description>&lt;p&gt;I recently purchased Rails Recipes. It has been a great adition to my many other PP books. However:&lt;/p&gt;


	&lt;p&gt;Recipe 31: Authenticating your users.&lt;/p&gt;


	&lt;p&gt;This is a &amp;#8216;half baked&amp;#8217; recipe. Considering many Rails newbies could be following along, why are we not shown how to display a friendly message if the user or pass are incorrect?&lt;/p&gt;


	&lt;p&gt;This is extremely frustrating. I have tried all the suggestions on this forum and still have no clue. I have wasted nearly a day trying to solve this.&lt;/p&gt;


	&lt;p&gt;Why would I want to display Runtime error instead&amp;#8230;..&lt;/p&gt;</description>
      <pubDate>Tue, 03 Jul 2007 05:43:23 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1016</guid>
      <author>Fora User</author>
      <link>http://forums.pragprog.com/forums/8/topics/1</link>
    </item>
    <item>
      <title>Discuss the Book posted by Fora User @ Sun, 01 Jul 2007 06:05:18 -0000</title>
      <description>&lt;p&gt;Asa, you saved my evening. I&amp;#8217;ve been pulling my hair out trying to figure out why the message_id was there when I was testing locally, but failed on the production server. The difference was smtp vs. sendmail, and your fix corrected it.&lt;/p&gt;


	&lt;p&gt;This app was frozen to Rails 1.2.1, but checking the source for 1.2.3 and edge it does not appear that this has been corrected. Is this a bug in Rails, or is there something other than Asa&amp;#8217;s fix that apps should be doing?&lt;/p&gt;</description>
      <pubDate>Sun, 01 Jul 2007 06:05:18 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1004</guid>
      <author>Fora User</author>
      <link>http://forums.pragprog.com/forums/8/topics/1</link>
    </item>
    <item>
      <title>Discuss the Book posted by Fora User @ Tue, 26 Jun 2007 15:01:05 -0000</title>
      <description>&lt;p&gt;Hi, I cant get this example to work properly with google or yahoo mail clients, I copied code and followed directions, but when I get email in gmail or yahoo its an empty email, when I view details I can see the multipart message but neither of these popular mail clients understand this message.&lt;/p&gt;


	&lt;p&gt;It does look nice for mac mail client :)&lt;/p&gt;


	&lt;p&gt;Also when I try in my app using active record objects passing in I get nil object issues also.&lt;/p&gt;


	&lt;p&gt;Using Rails 1.2.3 and ruby 1.8.4&lt;/p&gt;


	&lt;p&gt;Joel&lt;/p&gt;</description>
      <pubDate>Tue, 26 Jun 2007 15:01:05 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1000</guid>
      <author>Fora User</author>
      <link>http://forums.pragprog.com/forums/8/topics/1</link>
    </item>
    <item>
      <title>Discuss the Book posted by Fora User @ Fri, 22 Jun 2007 06:31:47 -0000</title>
      <description>&lt;p&gt;I was able to use Jeffrey Hicks&amp;#8217; Many-to-Many tutorial to flesh out the roles and rights user interface options.&lt;/p&gt;


	&lt;p&gt;I&amp;#8217;m still having a problem with logging in.  I can login fine, but then I get:
  Routing error
  Need controller and action!&lt;/p&gt;


	&lt;p&gt;I need a way to send everyone to a default page&amp;#8230;  since a new login didn&amp;#8217;t redirect from a particular controller/action&lt;/p&gt;</description>
      <pubDate>Fri, 22 Jun 2007 06:31:47 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:990</guid>
      <author>Fora User</author>
      <link>http://forums.pragprog.com/forums/8/topics/1</link>
    </item>
    <item>
      <title>Discuss the Book posted by Fora User @ Wed, 20 Jun 2007 23:14:12 -0000</title>
      <description>&lt;p&gt;I&amp;#8217;m having a great deal of difficulty getting this to work.  I can login with a base account.  Once I added roles, it worked in a basic way but the explanations and tools leave a lot to be desired.  Things like add-user, assign-roles/rights, etc, would be helpful.&lt;/p&gt;


	&lt;p&gt;Based on the comments in the forum it seems like recipes 31 &amp;#38; 32 are not useful in their present state.&lt;/p&gt;


	&lt;p&gt;Will there be any updates/errata to download for those recipes?&lt;/p&gt;</description>
      <pubDate>Wed, 20 Jun 2007 23:14:12 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1849</guid>
      <author>Fora User</author>
      <link>http://forums.pragprog.com/forums/8/topics/1</link>
    </item>
    <item>
      <title>Discuss the Book posted by Fora User @ Fri, 08 Jun 2007 14:01:26 -0000</title>
      <description>&lt;p&gt;Re: Authentication&lt;/p&gt;


	&lt;p&gt;For those who asked about getting the error raised in the User model in the controller, the following worked for me in my Admin controller:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;def signin 
  if request.post? 
    begin
      session[:user] = User.authenticate(params[:username], params[:password]).id 
      redirect_to "" #you can put your action/controller here
    rescue
      flash[:notice] = "Username or password invalid" 
    end
  end 
end&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;Now my question is:  Is this a good coding practice?  I&amp;#8217;m not sure, but it seems the flash is based on a rescue for all raised errors.  Perhaps there is a better way to have a skinny controller and flag the error in the model?&lt;/p&gt;</description>
      <pubDate>Fri, 08 Jun 2007 14:01:26 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1820</guid>
      <author>Fora User</author>
      <link>http://forums.pragprog.com/forums/8/topics/1</link>
    </item>
    <item>
      <title>Discuss the Book posted by Fora User @ Wed, 06 Jun 2007 23:24:58 -0000</title>
      <description>&lt;p&gt;After much wailing and blood on the forehead I got around the validation issue by adding:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;attr_accessor :password, :password_confirmation&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;to the top of the class then updating the password method to include @password:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;def password=(pwd)
  @password=pwd
  self.password_salt = [Array.new(6){rand(256).chr}.join].pack("m").chomp
  self.password_hash = encrypt(pwd plus self.password_salt)
end&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;Can now validate till me heart&amp;#8217;s content !
Can someone tell me why?&lt;/p&gt;</description>
      <pubDate>Wed, 06 Jun 2007 23:24:58 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1817</guid>
      <author>Fora User</author>
      <link>http://forums.pragprog.com/forums/8/topics/1</link>
    </item>
  </channel>
</rss>
