<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0">
  <channel>
    <title>Recent Posts in 'Discuss the Book' | Pragmatic Forums</title>
    <link>http://forums.pragprog.com/forums/8/topics/1</link>
    <language>en-us</language>
    <ttl>60</ttl>
    <description></description>
    <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>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>
    <item>
      <title>Discuss the Book posted by Fora User @ Wed, 06 Jun 2007 07:45:40 -0000</title>
      <description>&lt;p&gt;I struggled with an issue like this one that I spent quite some time on. What you need to do is to do something like this:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;def password=( string )
    write_attribute( :password, encrypt( string ) )
end&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;Also make another method in the model that looks like this:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;def password_confirmation=( string )
    @password_confirmation = encrypt( string )
end&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;Rails will use these methods to compare the two password strings in a validates_confirmation_of but also counts on the instance variable being there for the password_confirmation.&lt;/p&gt;


	&lt;p&gt;Remember: write_attribute for the actual password &lt;span class="caps"&gt;AND&lt;/span&gt; set the instance variable for the confirmation.&lt;/p&gt;


	&lt;p&gt;If you need any help feel free to email me at: john{at}myquire.com as I will not be checking this page.&lt;/p&gt;</description>
      <pubDate>Wed, 06 Jun 2007 07:45:40 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1814</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 @ Thu, 31 May 2007 20:55:36 -0000</title>
      <description>&lt;p&gt;I heartily second Mike M&amp;#8217;s request for info on creating a good UI for many-to-many relationships, especially where the relationship itself requires use of has_many through. I&amp;#8217;ve found only minimal information on the web.&lt;/p&gt;


	&lt;p&gt;Along these lines, there is a nice has_many_through gem, see &lt;a href="http://hasmanythrough.rubyforge.org"&gt;http://hasmanythrough.rubyforge.org&lt;/a&gt;.&lt;/p&gt;</description>
      <pubDate>Thu, 31 May 2007 20:55:36 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1809</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, 21 May 2007 03:16:22 -0000</title>
      <description>&lt;p&gt;I have the same problem as some of the other posters &amp;#8211; I cannot make the recipe work for the registration process: my user records are created without any password or salt entries.&lt;/p&gt;


	&lt;p&gt;I wonder why the author left this (one would have thought essential) element out of the recipe?&lt;/p&gt;


	&lt;p&gt;More disturbing, I see posters with this problem dating back to October &amp;#8211; It is now May and I don&amp;#8217;t see any posts with a fix.&lt;/p&gt;


	&lt;p&gt;Does anyone who knows anything about &lt;span class="caps"&gt;RAILS&lt;/span&gt; ever looik at this site, or are we just typing into space?&lt;/p&gt;</description>
      <pubDate>Mon, 21 May 2007 03:16:22 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1450</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, 21 May 2007 00:59:09 -0000</title>
      <description>&lt;p&gt;Ummm, is it just me?  Where is the code to actually create a user?  In the example the user is created manually and though this works, I need this to work from a registration screen.  At present the user record is created with blank hashed password and salt fields and I cannot see how I get these fields into the file&amp;#8230;&lt;/p&gt;


	&lt;p&gt;The model code is as per the book (field names differ slightly)
The controller code is:&lt;/p&gt;
	&lt;pre&gt;&lt;code&gt;def customercreate
    @customer = Customer.new(params[:customer])
    if @customer.save
    session[:loginstatus] = "Logged in" 
      flash[:notice] = "Thank you #{params[:firstname]}, you are now registered and logged in." 
      redirect_to :action =&amp;gt; :index and return
    else
      render :action =&amp;gt; :index
    end
end&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;I guess the hashed_password and salt fields are not in the params list.  Since I use a password field on the form in the view that makes sense but i can&amp;#8217;t figure out how to make this work.&lt;/p&gt;</description>
      <pubDate>Mon, 21 May 2007 00:59:09 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1447</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, 20 May 2007 22:40:34 -0000</title>
      <description>&lt;p&gt;Chad,&lt;/p&gt;


	&lt;p&gt;I have just bought the Recipe book.  It looks like it&amp;#8217;s choc full of stuff that will be very useful as I learn Rails.&lt;/p&gt;


	&lt;p&gt;One thing I spotted straight away was lack of page numbers on the Chapter title pages.  I was looking through for &amp;#8220;Trim Static Pages with Ajax&amp;#8221; on page 43 and missed it a few times because there are no page numbers between 40 and 47 inclusive &amp;#8211; several short chapters.  I know the chapter title is staring me straight in the face, but I wasn&amp;#8217;t looking for that, I was looking for the page number.&lt;/p&gt;


	&lt;p&gt;No biggy, but I think the book would be easier to navigate if every page had a number (call me old fashioned ;)&lt;/p&gt;


	&lt;p&gt;Off to actually read the book now,&lt;/p&gt;


	&lt;p&gt;Ivan&lt;/p&gt;</description>
      <pubDate>Sun, 20 May 2007 22:40:34 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1445</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, 02 May 2007 16:34:24 -0000</title>
      <description>&lt;p&gt;played with page options and rjs a little bit and found that
arrived at the working version of session_expiry:&lt;/p&gt;


	&lt;pre&gt;&lt;code&gt;def session_expiry
  @time_left = (session[:expires_at] - Time.now).to_i
  unless @time_left &amp;gt; 0
    reset_session
    #render 'signin/redirect'
    render :update do |page|
      page.redirect_to signin_url
    end
  end
end&lt;/code&gt;&lt;/pre&gt;


	&lt;p&gt;strangely, putting &amp;#8220;page.redirect_to signin_url&amp;#8221; into redirect.rjs doesn&amp;#8217;t have the effect &amp;#8211; javascripts is displayed on the page, but no redirect occurs.&lt;/p&gt;


	&lt;p&gt;Rails: 1.1.6, Mongrel
OS: Linux &lt;span class="caps"&gt;FC2&lt;/span&gt;
Browsers: Mozilla, Firefox&lt;/p&gt;</description>
      <pubDate>Wed, 02 May 2007 16:34:24 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1419</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, 02 May 2007 15:33:29 -0000</title>
      <description>&lt;p&gt;Tried to implement this recipe and failed :(
example works fine standalone, but when put in an application, redirect doesn&amp;#8217;t work. Just shows content of rjs on the page but never goes to signin page&lt;/p&gt;


	&lt;p&gt;this is what I see on a page:&lt;/p&gt;


	&lt;p&gt;try { window.location = &amp;#8216;&lt;a href="http://localhost:5000/signin/form"&gt;http://localhost:5000/signin/form&lt;/a&gt;&amp;#8217;; } catch (e) { alert(&amp;#8216;RJS error:\n\n&amp;#8217; + e.toString()); alert(&amp;#8216;window.location = \&amp;#8217;&lt;a href="http://localhost:5000/signin/form"&gt;http://localhost:5000/signin/form&lt;/a&gt;\&amp;#8217;;&amp;#8217;); throw e }&lt;/p&gt;


	&lt;p&gt;My application has a layout, so bank account page will be put within it&amp;#8230;&lt;/p&gt;


	&lt;p&gt;Any suggestions appreciated&lt;/p&gt;</description>
      <pubDate>Wed, 02 May 2007 15:33:29 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1415</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, 13 Apr 2007 00:39:09 -0000</title>
      <description>&lt;p&gt;Chad, I would like to second the comments made by Mark.  I am new to Ruby on Rails but have 30 years experience in the industry, much of that time cutting code in one form or another.&lt;/p&gt;


	&lt;p&gt;As with almost every Ruby/Rails book (and I now have 9 of them), every example I look at seems to assume knowledge that I do not have.&lt;/p&gt;


	&lt;p&gt;This is incredibly frustrating for someone who is new to this environment.&lt;/p&gt;


	&lt;p&gt;After 4 solid months of working on a website, I still find almost every example leaves something essential out.&lt;/p&gt;


	&lt;p&gt;Example: I have modified the Depot application to be a full-blown e-commerce website with now 13 tables and an entirely new look.  I want to allow customers to log in or not as they choose while they shop &amp;#8211; so i am trying to make your example 31 work: Authenticating your users.  My customers are separate to my admin users &amp;#8211; so they are in a new table.&lt;/p&gt;


	&lt;p&gt;In your example, the first thing I came across was &amp;#8220;raise &amp;#8220;Username or password invalid&amp;#8221; &amp;#8211; What is this?  How does this work?  Where is this syntax explained?  Why use this instead of flash[:notice] = &amp;#8220;Invalid user/password combination&amp;#8221; as they do in the depot application?&lt;/p&gt;


	&lt;p&gt;The sessions table is now stored in a database &amp;#8211; is this why I am getting &amp;#8220;you have a nil object&amp;#8221; when I try to authenticate.&lt;/p&gt;


	&lt;p&gt;It is all very well to suggest that those new to Ruby on Rails to have the Agile Web Development book handy.  I do.   But you are using different techniques without any explanation.&lt;/p&gt;


	&lt;p&gt;Also, in your discussion &amp;#8220;now go and try this&amp;#8221; you sound like a teacher giving out homework.  Where are the solutions to the problems you pose?&lt;/p&gt;</description>
      <pubDate>Fri, 13 Apr 2007 00:39:09 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1395</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 @ Thu, 08 Mar 2007 19:26:30 -0000</title>
      <description>&lt;p&gt;&lt;span class="caps"&gt;THANK YOU SO MUCH FOR THIS FIX &lt;/span&gt;DocPneumo!!!&lt;/p&gt;


	&lt;p&gt;I spent the entire day trying to figure out how/why I was getting old information in a new form after the old form had been submitted and saved.  This was driving me &lt;span class="caps"&gt;NUTS&lt;/span&gt;!&lt;/p&gt;


	&lt;p&gt;&lt;strong&gt;I&amp;#8217;m putting some text here at the bottom of my post for the search engines&lt;/strong&gt; rails form still filled in with old information recipe post-back&lt;/p&gt;</description>
      <pubDate>Thu, 08 Mar 2007 19:26:30 -0000</pubDate>
      <guid isPermaLink="false">forums.pragprog.com:8:1:1271</guid>
      <author>Fora User</author>
      <link>http://forums.pragprog.com/forums/8/topics/1</link>
    </item>
  </channel>
</rss>
