<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-4056961807189001841</id><updated>2012-01-28T06:29:37.581-08:00</updated><title type='text'>Ruby on Rails</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><link rel='next' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default?start-index=101&amp;max-results=100'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>29363</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-5325941821530649434</id><published>2012-01-28T06:29:00.001-08:00</published><updated>2012-01-28T06:29:37.610-08:00</updated><title type='text'>[Rails] trouble in storing dates from localized form text fields...</title><content type='html'>[Rails 3.1.3 / ruby 1.9.2 ]&lt;p&gt;I am trying to manage localized dates and I don&amp;#39;t actually understand&lt;br&gt;how it&amp;#39;s managed w Rails 3.1 ... I thought there was no more issues w&lt;br&gt;I18n..&lt;p&gt;my locale is defined : I18n.locale  =&amp;gt; :fr&lt;br&gt;I am using a localized version of  jQuery DatePicker , so it displays&lt;br&gt;selected dates in the text field like :   01/02/2012   (Feb first )&lt;br&gt;i.e.  ( in generated html):&lt;br&gt;&amp;lt;input&amp;#160;id=&amp;quot;start_shooting_date&amp;quot;&amp;#160;class=&amp;quot;text&lt;br&gt;hasDatepicker&amp;quot;&amp;#160;type=&amp;quot;text&amp;quot;&amp;#160;value=&amp;quot;01/02/2012&amp;quot;&amp;#160;name=&amp;quot;project[start_shooting_date]&amp;quot;&amp;gt;&lt;p&gt;in my Project model , date validations are OK, then I store the&lt;br&gt;updated project&lt;br&gt;@project.update_attributes(params[:project])&lt;p&gt;and I get stored in the DB :   start_shooting_date: &amp;quot;2012-01-02&lt;br&gt;00:00:00&amp;quot;  (Jan 2nd)   rather than  &amp;quot;2012-02-01 00:00:00&amp;quot; ( Feb&lt;br&gt;first )&lt;p&gt;I&amp;#39;ll appreciated your feedback ...&lt;p&gt;I defined in environment.rb ( don&amp;#39;t know if necessary.. for input .&lt;br&gt;but it seems to be for output, or is it redundant with defaults .yml&lt;br&gt;files ?)&lt;br&gt;# if locale french&lt;br&gt;Date::DATE_FORMATS.merge!(  :default =&amp;gt; &amp;quot;%d/%m/%Y&amp;quot; )&lt;p&gt;I also defined the I18n default format in the .yml files&lt;p&gt;fr:&lt;br&gt;  date:&lt;br&gt;    formats:&lt;br&gt;      default: &amp;quot;%d/%m/%Y&amp;quot;&lt;br&gt;      short: &amp;quot;%e %b&amp;quot;&lt;br&gt;      long: &amp;quot;%e %B %Y&amp;quot;&lt;br&gt;      full: &amp;quot;%A %d %B %Y&amp;quot;&lt;br&gt;  time:&lt;br&gt;    formats:&lt;br&gt;      default: &amp;quot;%d %B %Y %H:%M:%S&amp;quot;&lt;br&gt;      short: &amp;quot;%d %b %H:%M&amp;quot;&lt;br&gt;      long: &amp;quot;%A %d %B %Y %H:%M&amp;quot;&lt;br&gt;    am: &amp;#39;am&amp;#39;&lt;br&gt;    pm: &amp;#39;pm&amp;#39;&lt;p&gt;en:&lt;br&gt;  date:&lt;br&gt;    formats:&lt;br&gt;      default: &amp;quot;%Y-%m-%d&amp;quot;&lt;br&gt;      short: &amp;quot;%b %d&amp;quot;&lt;br&gt;      long: &amp;quot;%B %d, %Y&amp;quot;&lt;br&gt;      full: &amp;quot;%A %B %d, %Y&amp;quot;&lt;br&gt;  time:&lt;br&gt;    formats:&lt;br&gt;      default: &amp;quot;%a, %d %b %Y %H:%M:%S %z&amp;quot;&lt;br&gt;      short: &amp;quot;%d %b %H:%M&amp;quot;&lt;br&gt;      long: &amp;quot;%B %d, %Y %H:%M&amp;quot;&lt;br&gt;    am: &amp;quot;am&amp;quot;&lt;br&gt;    pm: &amp;quot;pm&amp;quot;&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-5325941821530649434?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/5325941821530649434/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-trouble-in-storing-dates-from.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/5325941821530649434'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/5325941821530649434'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-trouble-in-storing-dates-from.html' title='[Rails] trouble in storing dates from localized form text fields...'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-4079955634289093654</id><published>2012-01-28T05:46:00.001-08:00</published><updated>2012-01-28T05:46:30.192-08:00</updated><title type='text'>[Rails] Why Unicorn don't want to make .pid file?</title><content type='html'>I use VirtualBox with gem Vagrant, (lucid32, rvm 1.10.2, ruby 1.9.2,&lt;br&gt;rails 3.1.0, nginx 1.0.11 + gem Unicorn) and Capistrano .&lt;br&gt;Which configured with the tutorial&lt;br&gt;&lt;a href="http://ariejan.net/2011/09/14/lighting-fast-zero-downtime-deployments-with-git-capistrano-nginx-and-unicorn"&gt;http://ariejan.net/2011/09/14/lighting-fast-zero-downtime-deployments-with-git-capistrano-nginx-and-unicorn&lt;/a&gt;&lt;br&gt;And my Unicorn don&amp;#39;t want to start =(&lt;p&gt;After cap deploy i get this:&lt;br&gt;&lt;a href="https://gist.github.com/1694320"&gt;https://gist.github.com/1694320&lt;/a&gt;&lt;br&gt;   There&amp;#39;s no .pid file, no .log files&lt;br&gt;   Manually i created all folders, so no effect =(&lt;p&gt;Who have experience with Virtual Machines and Vagrant?&lt;br&gt;Probably, met the problem before?&lt;p&gt;If i will not be annoying for You I can give the package.&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-4079955634289093654?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/4079955634289093654/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-why-unicorn-dont-want-to-make-pid.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/4079955634289093654'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/4079955634289093654'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-why-unicorn-dont-want-to-make-pid.html' title='[Rails] Why Unicorn don&apos;t want to make .pid file?'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-7130981321355039549</id><published>2012-01-28T03:32:00.001-08:00</published><updated>2012-01-28T03:32:25.700-08:00</updated><title type='text'>[Rails] How to migrate from md5 to bcrypt?</title><content type='html'>I would like to migrate users from my old phpfusion site but I have there hash password md5(md5) how to convert this passwords to bcrypt?&lt;br&gt;I creating Sinatra app whre i use this passwords with Warden.&lt;br&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To view this discussion on the web visit &lt;a href="https://groups.google.com/d/msg/rubyonrails-talk/-/KMxi3wD_tTsJ"&gt;https://groups.google.com/d/msg/rubyonrails-talk/-/KMxi3wD_tTsJ&lt;/a&gt;.&lt;br /&gt;  To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-7130981321355039549?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/7130981321355039549/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-how-to-migrate-from-md5-to-bcrypt.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/7130981321355039549'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/7130981321355039549'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-how-to-migrate-from-md5-to-bcrypt.html' title='[Rails] How to migrate from md5 to bcrypt?'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-5066147299066222360</id><published>2012-01-28T03:11:00.001-08:00</published><updated>2012-01-28T03:11:38.891-08:00</updated><title type='text'>Re: [Rails] Re: Polymorphic association</title><content type='html'>I mean that, and any other material you are using to learn. Read it properly and understand it. If there&amp;#39;s something you don&amp;#39;t understand, ask away!&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To view this discussion on the web visit &lt;a href="https://groups.google.com/d/msg/rubyonrails-talk/-/87wdgHfirskJ"&gt;https://groups.google.com/d/msg/rubyonrails-talk/-/87wdgHfirskJ&lt;/a&gt;.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-5066147299066222360?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/5066147299066222360/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_28.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/5066147299066222360'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/5066147299066222360'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_28.html' title='Re: [Rails] Re: Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-1368155770932322957</id><published>2012-01-28T02:05:00.001-08:00</published><updated>2012-01-28T02:05:38.979-08:00</updated><title type='text'>[Rails] Re: Problem with Asset Pipeline</title><content type='html'>Today I tried to replace jammit with asset pipeline in 3.1 again. This&lt;br&gt;time I got much further, the app could server JS and images correctly&lt;br&gt;from assets/ folder.&lt;p&gt;But I was not able to make the CSS right. I used stylesheet_link_tag,&lt;br&gt;but it kept serving CSS from /stylesheets/ instead of /assets/. Anyone&lt;br&gt;has an idea about this problem?&lt;p&gt;Thanks!&lt;p&gt;On Dec 21 2011, 5:20&amp;#160;am, Stewart &amp;lt;&lt;a href="mailto:stewart.mathe...@gmail.com"&gt;stewart.mathe...@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; +1 to thisproblem. I updated from 3.0.0 followed the instructions on&lt;br&gt;&amp;gt; the rails guides page for updating and have the exact same issue. I&lt;br&gt;&amp;gt; tried discussing it in a ticket but have not herd anything back. Did&lt;br&gt;&amp;gt; you find a fix for this?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; On Nov 22, 2:09&amp;#160;am, Ben &amp;lt;&lt;a href="mailto:benzhe...@gmail.com"&gt;benzhe...@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; I had aproblemwhen I tried to upgrade from Rails 3.0 + Jammit to&lt;br&gt;&amp;gt; &amp;gt; Rails 3.1AssetPipeline. I created app/assets folder, under it I have&lt;br&gt;&amp;gt; &amp;gt; both javascripts/application.js.coffee and stylesheets/&lt;br&gt;&amp;gt; &amp;gt; application.css.scss. I included both usingstylesheet_link_tagand&lt;br&gt;&amp;gt; &amp;gt; javascript_include_tag, but it just could not load the CSS correctly.&lt;br&gt;&amp;gt; &amp;gt; The application keeps trying to load css from /stylesheets/&lt;br&gt;&amp;gt; &amp;gt; application.css which is a 404 error (the js loads fine from assets/&lt;br&gt;&amp;gt; &amp;gt; application.js). I am using the latest rails 3.1.1 and other&lt;br&gt;&amp;gt; &amp;gt; libraries. So what is theproblemhere?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;gt; Thanks!&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-1368155770932322957?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/1368155770932322957/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-problem-with-asset-pipeline.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/1368155770932322957'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/1368155770932322957'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-problem-with-asset-pipeline.html' title='[Rails] Re: Problem with Asset Pipeline'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-5479168799183497276</id><published>2012-01-28T01:20:00.000-08:00</published><updated>2012-01-28T01:21:17.928-08:00</updated><title type='text'>Re: [Rails] password encryption is not working..</title><content type='html'>i think you should read this link for this problem :-&lt;br&gt;&lt;a href="http://ruby.railstutorial.org/chapters/modeling-and-viewing-users-two#sec:secure_passwords"&gt;http://ruby.railstutorial.org/chapters/modeling-and-viewing-users-two#sec:secure_passwords&lt;/a&gt;&lt;br&gt; &lt;br&gt;&lt;div class="gmail_quote"&gt;On Sat, Jan 28, 2012 at 2:21 PM, Colin Law &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:clanlaw@googlemail.com"&gt;clanlaw@googlemail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"&gt; &lt;div class="im"&gt;On 28 January 2012 07:45, uma ya &amp;lt;&lt;a href="mailto:lists@ruby-forum.com"&gt;lists@ruby-forum.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt; &amp;gt; I am using require &amp;#39;digest/sha1&amp;#39; to encrypt my password and save into&lt;br&gt; &amp;gt; database. During login it is showing the following error-&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; undefined local variable or method `encrypted_password&amp;#39; for&lt;br&gt; &amp;gt; #&amp;lt;Signin:0x992c990&lt;br&gt; &lt;br&gt; &lt;/div&gt;You have tried to access a method encrypted_password on the Signin&lt;br&gt; class.  Either the signins table does not have a column of that name,&lt;br&gt; or you are calling encrypted_password on the wrong class type.&lt;br&gt; &lt;br&gt; Colin&lt;br&gt; &lt;div class="HOEnZb"&gt;&lt;div class="h5"&gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; code:&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; before_save :encrypt_password&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; def has_password?(submitted_password)&lt;br&gt; &amp;gt;  encrypted_password == encrypt(submitted_password)&lt;br&gt; &amp;gt; end&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;  private&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;     def encrypt_password&lt;br&gt; &amp;gt;       self.salt = make_salt unless has_password?(password)&lt;br&gt; &amp;gt;       self.encrypted_password = encrypt(password)&lt;br&gt; &amp;gt;     end&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;     def encrypt(string)&lt;br&gt; &amp;gt;       secure_hash(&amp;quot;#{salt}--#{string}&amp;quot;)&lt;br&gt; &amp;gt;     end&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;     def make_salt&lt;br&gt; &amp;gt;       secure_hash(&amp;quot;#{Time.now.utc}--#{password}&amp;quot;)&lt;br&gt; &amp;gt;     end&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;     def secure_hash(string)&lt;br&gt; &amp;gt;       Digest::SHA2.hexdigest(string)&lt;br&gt; &amp;gt;     end&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; Please help me dis !&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; --&lt;br&gt; &amp;gt; Posted via &lt;a href="http://www.ruby-forum.com/" target="_blank"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; --&lt;br&gt; &amp;gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; &amp;gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &amp;gt;&lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;/div&gt;&lt;/div&gt;&lt;span class="HOEnZb"&gt;&lt;font color="#888888"&gt;--&lt;br&gt; &lt;a href="http://gplus.to/clanlaw" target="_blank"&gt;gplus.to/clanlaw&lt;/a&gt;&lt;br&gt; &lt;/font&gt;&lt;/span&gt;&lt;div class="HOEnZb"&gt;&lt;div class="h5"&gt;&lt;br&gt; --&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &lt;br&gt; &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-5479168799183497276?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/5479168799183497276/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-password-encryption-is-not_8748.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/5479168799183497276'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/5479168799183497276'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-password-encryption-is-not_8748.html' title='Re: [Rails] password encryption is not working..'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-4016604543939540430</id><published>2012-01-28T00:51:00.000-08:00</published><updated>2012-01-28T00:52:22.850-08:00</updated><title type='text'>Re: [Rails] password encryption is not working..</title><content type='html'>On 28 January 2012 07:45, uma ya &amp;lt;&lt;a href="mailto:lists@ruby-forum.com"&gt;lists@ruby-forum.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; I am using require &amp;#39;digest/sha1&amp;#39; to encrypt my password and save into&lt;br&gt;&amp;gt; database. During login it is showing the following error-&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; undefined local variable or method `encrypted_password&amp;#39; for&lt;br&gt;&amp;gt; #&amp;lt;Signin:0x992c990&lt;p&gt;You have tried to access a method encrypted_password on the Signin&lt;br&gt;class.  Either the signins table does not have a column of that name,&lt;br&gt;or you are calling encrypted_password on the wrong class type.&lt;p&gt;Colin&lt;p&gt;&amp;gt;&lt;br&gt;&amp;gt; code:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; before_save :encrypt_password&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; def has_password?(submitted_password)&lt;br&gt;&amp;gt; &amp;#160;encrypted_password == encrypt(submitted_password)&lt;br&gt;&amp;gt; end&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160;private&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; def encrypt_password&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; self.salt = make_salt unless has_password?(password)&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; self.encrypted_password = encrypt(password)&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; end&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; def encrypt(string)&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; secure_hash(&amp;quot;#{salt}--#{string}&amp;quot;)&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; end&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; def make_salt&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; secure_hash(&amp;quot;#{Time.now.utc}--#{password}&amp;quot;)&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; end&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; def secure_hash(string)&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; Digest::SHA2.hexdigest(string)&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; end&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Please help me dis !&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;&amp;gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;&amp;gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;&amp;gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;&amp;gt;&lt;p&gt;&lt;p&gt;-- &lt;br&gt;&lt;a href="http://gplus.to/clanlaw"&gt;gplus.to/clanlaw&lt;/a&gt;&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-4016604543939540430?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/4016604543939540430/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-password-encryption-is-not_28.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/4016604543939540430'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/4016604543939540430'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-password-encryption-is-not_28.html' title='Re: [Rails] password encryption is not working..'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-7377131891447392316</id><published>2012-01-28T00:40:00.001-08:00</published><updated>2012-01-28T00:40:58.213-08:00</updated><title type='text'>Re: [Rails] ActionMailer and Ruby SMTP causing a segmentation fault!</title><content type='html'>On 27 January 2012 23:14, Don &amp;lt;&lt;a href="mailto:don.leatham@gmail.com"&gt;don.leatham@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; I just activated Devise&amp;#39; :confirmable option in my User model. &amp;#160;As Devise&lt;br&gt;&amp;gt; tries to send out the confirmation-link email I get a segmentation-fault&lt;br&gt;&amp;gt; error in Ruby&amp;#39;s SMTP library:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; ... lib/ruby/1.9.1/net/smtp.rb:583: [BUG] Segmentation fault&lt;p&gt;If you are using ruby 1.9.1 then upgrade to 1.9.2 (or 1.9.3 though&lt;br&gt;maybe it is still a bit new) or go back to 1.8.7&lt;br&gt;1.9.1 did not play well with Rails&lt;p&gt;Colin&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-7377131891447392316?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/7377131891447392316/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-actionmailer-and-ruby-smtp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/7377131891447392316'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/7377131891447392316'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-actionmailer-and-ruby-smtp.html' title='Re: [Rails] ActionMailer and Ruby SMTP causing a segmentation fault!'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-1857681101440538203</id><published>2012-01-27T23:56:00.000-08:00</published><updated>2012-01-27T23:57:00.532-08:00</updated><title type='text'>Re: [Rails] password encryption is not working..</title><content type='html'>you are not declared &amp;#39;encrypted_password&amp;#39;&amp;#39; variable. so first declared that variable in model and use it.&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Sat, Jan 28, 2012 at 1:15 PM, uma ya &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:lists@ruby-forum.com"&gt;lists@ruby-forum.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt; &lt;blockquote class="gmail_quote" style="margin:0pt 0pt 0pt 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"&gt;I am using require &amp;#39;digest/sha1&amp;#39; to encrypt my password and save into&lt;br&gt; database. During login it is showing the following error-&lt;br&gt; &lt;br&gt; undefined local variable or method `encrypted_password&amp;#39; for&lt;br&gt; #&amp;lt;Signin:0x992c990&lt;br&gt; &lt;br&gt; code:&lt;br&gt; &lt;br&gt; before_save :encrypt_password&lt;br&gt; &lt;br&gt; def has_password?(submitted_password)&lt;br&gt;   encrypted_password == encrypt(submitted_password)&lt;br&gt; end&lt;br&gt; &lt;br&gt;   private&lt;br&gt; &lt;br&gt;      def encrypt_password&lt;br&gt;        self.salt = make_salt unless has_password?(password)&lt;br&gt;        self.encrypted_password = encrypt(password)&lt;br&gt;      end&lt;br&gt; &lt;br&gt;      def encrypt(string)&lt;br&gt;        secure_hash(&amp;quot;#{salt}--#{string}&amp;quot;)&lt;br&gt;      end&lt;br&gt; &lt;br&gt;      def make_salt&lt;br&gt;        secure_hash(&amp;quot;#{Time.now.utc}--#{password}&amp;quot;)&lt;br&gt;      end&lt;br&gt; &lt;br&gt;      def secure_hash(string)&lt;br&gt;        Digest::SHA2.hexdigest(string)&lt;br&gt;      end&lt;br&gt; &lt;br&gt; &lt;br&gt; &lt;br&gt; Please help me dis !&lt;br&gt; &lt;span class="HOEnZb"&gt;&lt;font color="#888888"&gt;&lt;br&gt; --&lt;br&gt; Posted via &lt;a href="http://www.ruby-forum.com/" target="_blank"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;br&gt; &lt;br&gt; --&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &lt;br&gt; &lt;/font&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-1857681101440538203?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/1857681101440538203/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-password-encryption-is-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/1857681101440538203'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/1857681101440538203'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-password-encryption-is-not.html' title='Re: [Rails] password encryption is not working..'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-8070455265529325763</id><published>2012-01-27T23:45:00.001-08:00</published><updated>2012-01-27T23:45:34.508-08:00</updated><title type='text'>[Rails] password encryption is not working..</title><content type='html'>I am using require &amp;#39;digest/sha1&amp;#39; to encrypt my password and save into&lt;br&gt;database. During login it is showing the following error-&lt;p&gt;undefined local variable or method `encrypted_password&amp;#39; for&lt;br&gt;#&amp;lt;Signin:0x992c990&lt;p&gt;code:&lt;p&gt;before_save :encrypt_password&lt;p&gt;def has_password?(submitted_password)&lt;br&gt;  encrypted_password == encrypt(submitted_password)&lt;br&gt;end&lt;p&gt;  private&lt;p&gt;     def encrypt_password&lt;br&gt;       self.salt = make_salt unless has_password?(password)&lt;br&gt;       self.encrypted_password = encrypt(password)&lt;br&gt;     end&lt;p&gt;     def encrypt(string)&lt;br&gt;       secure_hash(&amp;quot;#{salt}--#{string}&amp;quot;)&lt;br&gt;     end&lt;p&gt;     def make_salt&lt;br&gt;       secure_hash(&amp;quot;#{Time.now.utc}--#{password}&amp;quot;)&lt;br&gt;     end&lt;p&gt;     def secure_hash(string)&lt;br&gt;       Digest::SHA2.hexdigest(string)&lt;br&gt;     end&lt;p&gt;&lt;p&gt;Please help me dis !&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-8070455265529325763?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/8070455265529325763/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-password-encryption-is-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8070455265529325763'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8070455265529325763'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-password-encryption-is-not.html' title='[Rails] password encryption is not working..'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-4454803685407206982</id><published>2012-01-27T20:14:00.001-08:00</published><updated>2012-01-27T20:14:57.877-08:00</updated><title type='text'>[Rails] Re: Redirecting to create new page with input</title><content type='html'>Thanks for your explanation.  It is exactly what I wanted.&lt;p&gt;in search.html.erb, I added&lt;p&gt;  &amp;lt;%= link_to(&amp;#39;RegisterThisMovie&amp;#39;, {:controller =&amp;gt; &amp;#39;video&amp;#39;, :action =&amp;gt; &lt;br&gt;&amp;#39;new&amp;#39;, :url =&amp;gt; y }) %&amp;gt;&lt;p&gt;&amp;#39;y&amp;#39; contains the url of the movie after executing the search.&lt;p&gt;in video_controller.rb, I added&lt;p&gt;  def new&lt;br&gt;    @video = Video.new&lt;br&gt;    @video.url = params[:url]                 #&amp;lt;---HERE&lt;br&gt;    respond_to do |format|&lt;br&gt;      format.html # new.html.erb&lt;br&gt;      format.json { render json: @video }&lt;br&gt;    end&lt;br&gt;  end&lt;p&gt;then it worked fine!&lt;br&gt;Thanks for your help.&lt;p&gt;soichi&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-4454803685407206982?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/4454803685407206982/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-redirecting-to-create-new-page.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/4454803685407206982'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/4454803685407206982'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-redirecting-to-create-new-page.html' title='[Rails] Re: Redirecting to create new page with input'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-2275773275969445469</id><published>2012-01-27T20:10:00.001-08:00</published><updated>2012-01-27T20:10:37.887-08:00</updated><title type='text'>[Rails] Re: Skipping the First Line when reading in a text file</title><content type='html'>Hai!&lt;p&gt;  That is depending upon gem. if you use csv then follow about steps and &lt;br&gt;if you use fastercsv then follows this link&lt;p&gt; &lt;a href="http://fastercsv.rubyforge.org/"&gt;http://fastercsv.rubyforge.org/&lt;/a&gt;&lt;p&gt;Bye:)&lt;br&gt;bdeveloper01&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-2275773275969445469?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/2275773275969445469/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-skipping-first-line-when_27.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/2275773275969445469'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/2275773275969445469'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-skipping-first-line-when_27.html' title='[Rails] Re: Skipping the First Line when reading in a text file'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-5360241101895706569</id><published>2012-01-27T17:22:00.001-08:00</published><updated>2012-01-27T17:22:27.040-08:00</updated><title type='text'>Re: [Rails] Re: Polymorphic association</title><content type='html'>When you say documentation you mean the Rails Guide?&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Fri, Jan 27, 2012 at 7:37 PM, Mohamad El-Husseini &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:husseini.mel@gmail.com"&gt;husseini.mel@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt; &lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt;I&amp;#39;ll second what Colin said. I&amp;#39;ll also emphasize the need to &amp;quot;hold your horses&amp;quot;. There&amp;#39;s nothing more frustrating than having to wade through a ton of stuff before you start building something. But it&amp;#39;s absolutely worth it, and it will save you a ton of time in the long run.&lt;br&gt; &lt;br&gt;If I had spent 10% of my time reading documentation, I would have saved the other 90% that I wasted editing lines of code, scanning hurriedly over tutorials, asking a ton of questions, etc... it really is true. It&amp;#39;s frustrating at first, but it pays off and saves you a ton of time in the long term.&lt;div class="im"&gt; &lt;br&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;&lt;/div&gt; To view this discussion on the web visit &lt;a href="https://groups.google.com/d/msg/rubyonrails-talk/-/gpfZEWYqkawJ" target="_blank"&gt;https://groups.google.com/d/msg/rubyonrails-talk/-/gpfZEWYqkawJ&lt;/a&gt;.&lt;div class="HOEnZb"&gt;&lt;div class="h5"&gt; &lt;br&gt;  To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-5360241101895706569?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/5360241101895706569/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_4643.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/5360241101895706569'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/5360241101895706569'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_4643.html' title='Re: [Rails] Re: Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-1755079209454159062</id><published>2012-01-27T15:46:00.000-08:00</published><updated>2012-01-27T15:47:12.437-08:00</updated><title type='text'>[Rails] Warden - how to setup custom encryptor</title><content type='html'>I`m writting sinatra app and i would like to setup encryption in Warden&lt;br&gt;like i did it in devise when i used Rails.&lt;p&gt;  module Devise&lt;br&gt;    module Encryptors&lt;br&gt;      class Md5 &amp;lt; Base&lt;br&gt;        def self.digest(password, stretches, salt, pepper)&lt;br&gt;          str = [password].flatten.compact.join&lt;br&gt;          Digest::MD5.hexdigest(Digest::MD5.hexdigest(str))&lt;br&gt;        end&lt;br&gt;      end&lt;br&gt;    end&lt;br&gt;  end&lt;p&gt;Where I can setup this module ??&lt;br&gt;How to set Warden to use MD5 encryption?&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-1755079209454159062?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/1755079209454159062/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-warden-how-to-setup-custom.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/1755079209454159062'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/1755079209454159062'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-warden-how-to-setup-custom.html' title='[Rails] Warden - how to setup custom encryptor'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-4885120349826932120</id><published>2012-01-27T15:14:00.001-08:00</published><updated>2012-01-27T15:14:34.069-08:00</updated><title type='text'>[Rails] ActionMailer and Ruby SMTP causing a segmentation fault!</title><content type='html'>I just activated Devise' :confirmable option in my User model. &amp;nbsp;As Devise tries to send out the confirmation-link email I get a segmentation-fault error in Ruby's SMTP library:&amp;nbsp;&lt;br&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;pre class="lang-rb prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 255); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow-x: auto; overflow-y: auto; width: auto; max-height: 600px; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;...&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; lib&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;/&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;ruby&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;/&lt;/span&gt;&lt;span class="lit" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;1.9&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;.&lt;/span&gt;&lt;span class="lit" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;1&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;/&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;net&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;/&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;smtp&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;.&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;rb&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;:&lt;/span&gt;&lt;span class="lit" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;583&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;:&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;[&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;BUG&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;]&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="typ" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(43, 145, 175); background-position: initial initial; background-repeat: initial initial; "&gt;Segmentation&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; fault&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;&lt;div&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 255); clear: both; word-wrap: break-word; color: rgb(0, 0, 0); font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial; "&gt;My&amp;nbsp;&lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 1px; padding-right: 5px; padding-bottom: 1px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial initial; background-repeat: initial initial; "&gt;config/environments/development.rb&lt;/code&gt;&amp;nbsp;file has the following:&lt;/p&gt;&lt;p style="margin-top: 0px; margin-right: 0px; margin-bottom: 1em; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 255); clear: both; word-wrap: break-word; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "&gt;&lt;font class="Apple-style-span" face="Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif"&gt;&lt;span class="Apple-style-span" style="white-space: pre; "&gt;&lt;/span&gt;&lt;/font&gt;&lt;/p&gt;&lt;pre class="lang-rb prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 255); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow-x: auto; overflow-y: auto; width: auto; max-height: 600px; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;font class="Apple-style-span" face="Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif"&gt;&lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&amp;nbsp; config&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;.&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;action_mailer&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;.&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;delivery_method &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;:&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;smtp&lt;br&gt;&amp;nbsp; config&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;.&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;action_mailer&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;.&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;raise_delivery_errors &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="kwd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 139); background-position: initial initial; background-repeat: initial initial; "&gt;true&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&amp;nbsp; config&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;.&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;action_mailer&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;.&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;default_url_options &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;{&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;:&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;host &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&amp;gt;&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;'localhost:3000'&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;}&lt;/span&gt;&lt;/code&gt;&lt;/font&gt;&lt;/pre&gt;&lt;p&gt;&lt;/p&gt;&lt;/div&gt;&lt;div&gt;&lt;span style="color: rgb(0, 0, 0); font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none; "&gt;My&amp;nbsp;&lt;/span&gt;&lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 1px; padding-right: 5px; padding-bottom: 1px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 255); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial; "&gt;/config/initializers/setup_mail.rb&lt;/code&gt;&lt;span style="color: rgb(0, 0, 0); font-family: Arial, 'Liberation Sans', 'DejaVu Sans', sans-serif; font-size: 14px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; white-space: normal; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-color: rgb(255, 255, 255); display: inline !important; float: none; "&gt;&amp;nbsp;file:&lt;/span&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;pre class="lang-rb prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 255); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow-x: auto; overflow-y: auto; width: auto; max-height: 600px; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;span class="typ" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(43, 145, 175); background-position: initial initial; background-repeat: initial initial; "&gt;ActionMailer&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;::&lt;/span&gt;&lt;span class="typ" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(43, 145, 175); background-position: initial initial; background-repeat: initial initial; "&gt;Base&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;.&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;smtp_settings &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;{&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;:&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;address &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&amp;gt;&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;"smtp.gmail.com"&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;,&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;:&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;port &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&amp;gt;&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="lit" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;587&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;,&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;:&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;domain &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&amp;gt;&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;"mydomain.com"&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;,&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;:&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;user_name &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&amp;gt;&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;"[redacted]"&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;,&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;:&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;password &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&amp;gt;&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;"[redacted]"&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;,&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;:&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;authentication &amp;nbsp; &amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&amp;gt;&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;"plain"&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;,&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;:&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;enable_starttls_auto &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&amp;gt;&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="kwd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 139); background-position: initial initial; background-repeat: initial initial; "&gt;true&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;}&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&lt;/span&gt;&lt;span class="typ" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(43, 145, 175); background-position: initial initial; background-repeat: initial initial; "&gt;ActionMailer&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;::&lt;/span&gt;&lt;span class="typ" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(43, 145, 175); background-position: initial initial; background-repeat: initial initial; "&gt;Base&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;.&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;default_url_options&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;[:&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;host&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;]&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;"localhost:3000"&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;pre class="lang-rb prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 255); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow-x: auto; overflow-y: auto; width: auto; max-height: 600px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "&gt;&lt;font class="Apple-style-span" color="#800000"&gt;&lt;span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; line-height: normal; white-space: normal; "&gt;The relevant code in smtp.rb &amp;nbsp; are these two methods:&lt;/span&gt;&lt;br&gt;&lt;/font&gt;&lt;/pre&gt;&lt;pre class="lang-rb prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 255); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow-x: auto; overflow-y: auto; width: auto; max-height: 600px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "&gt;&lt;font class="Apple-style-span" color="#800000"&gt;&lt;span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; line-height: normal; white-space: normal; "&gt;&lt;pre class="lang-rb prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 255); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow-x: auto; overflow-y: auto; width: auto; max-height: 600px; color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;span class="kwd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 139); background-position: initial initial; background-repeat: initial initial; "&gt;def&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; ssl_socket&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;(&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;socket&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;,&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; context&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;)&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="typ" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(43, 145, 175); background-position: initial initial; background-repeat: initial initial; "&gt;OpenSSL&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;::&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;SSL&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;::&lt;/span&gt;&lt;span class="typ" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(43, 145, 175); background-position: initial initial; background-repeat: initial initial; "&gt;SSLSocket&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;.&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;new socket&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;,&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; context&lt;br&gt;&lt;/span&gt;&lt;span class="kwd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 139); background-position: initial initial; background-repeat: initial initial; "&gt;end&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&lt;br&gt;&lt;/span&gt;&lt;span class="kwd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 139); background-position: initial initial; background-repeat: initial initial; "&gt;def&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; tlsconnect&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;(&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;s&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;)&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&amp;nbsp; verified &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="kwd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 139); background-position: initial initial; background-repeat: initial initial; "&gt;false&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&amp;nbsp; s &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; ssl_socket&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;(&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;s&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;,&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="lit" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;@ssl_context&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;)&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&amp;nbsp; logging &lt;/span&gt;&lt;span class="str" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;"TLS connection started"&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&amp;nbsp; s&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;.&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;sync_close &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="kwd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 139); background-position: initial initial; background-repeat: initial initial; "&gt;true&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&amp;nbsp; s&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;.&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;connect &amp;nbsp;&lt;/span&gt;&lt;span class="com" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: gray; background-position: initial initial; background-repeat: initial initial; "&gt;# THIS IS LINE 583&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 139); background-position: initial initial; background-repeat: initial initial; "&gt;if&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="lit" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;@ssl_context&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;.&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;verify_mode &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;!=&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="typ" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(43, 145, 175); background-position: initial initial; background-repeat: initial initial; "&gt;OpenSSL&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;::&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;SSL&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;::&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;VERIFY_NONE&lt;br&gt;&amp;nbsp; &amp;nbsp; s&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;.&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;post_connection_check&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;(&lt;/span&gt;&lt;span class="lit" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(128, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;@address&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;)&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&amp;nbsp; &lt;/span&gt;&lt;span class="kwd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 139); background-position: initial initial; background-repeat: initial initial; "&gt;end&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&amp;nbsp; verified &lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;=&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; &lt;/span&gt;&lt;span class="kwd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 139); background-position: initial initial; background-repeat: initial initial; "&gt;true&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&amp;nbsp; s&lt;br&gt;&lt;/span&gt;&lt;span class="kwd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 139); background-position: initial initial; background-repeat: initial initial; "&gt;ensure&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;&lt;br&gt;&amp;nbsp; s&lt;/span&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;.&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt;close &lt;/span&gt;&lt;span class="kwd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 139); background-position: initial initial; background-repeat: initial initial; "&gt;unless&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); background-position: initial initial; background-repeat: initial initial; "&gt; verified&lt;br&gt;&lt;/span&gt;&lt;span class="kwd" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; border-image: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 139); background-position: initial initial; background-repeat: initial initial; "&gt;end&lt;/span&gt;&lt;/code&gt;&lt;/pre&gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;&lt;pre class="lang-rb prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 255); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow-x: auto; overflow-y: auto; width: auto; max-height: 600px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "&gt;&lt;font class="Apple-style-span" color="#800000"&gt;&lt;span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; line-height: normal; white-space: normal; "&gt;I've tried setting&amp;nbsp;&lt;/span&gt;&lt;/font&gt;&lt;span class="Apple-style-span" style="color: rgb(0, 0, 0); "&gt;&lt;code style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; vertical-align: baseline; border-style: initial; border-color: initial; font-size: 14px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(238, 238, 238); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; "&gt;&lt;span class="pun" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; vertical-align: baseline; border-style: initial; border-color: initial; font-size: 14px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); "&gt;:&lt;/span&gt;&lt;span class="pln" style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; padding-top: 0px; padding-right: 0px; padding-bottom: 0px; padding-left: 0px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; vertical-align: baseline; border-style: initial; border-color: initial; font-size: 14px; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: transparent; color: rgb(0, 0, 0); "&gt;enable_starttls_auto to false.  I don't get a segmentation fault, but no mail goes out either.  I can get a session going with the gmail smtp host via the command line.  I'm running on the latest version of Mac OS.  &lt;/span&gt;&lt;/code&gt;&lt;/span&gt;&lt;/pre&gt;&lt;pre class="lang-rb prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 255); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow-x: auto; overflow-y: auto; width: auto; max-height: 600px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "&gt;&lt;font class="Apple-style-span" color="#000000"&gt;Never had to debug a segmentation fault before.  Pretty intimidating.  Any thoughts, ideas, approaches?&lt;/font&gt;&lt;/pre&gt;&lt;pre class="lang-rb prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 255); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow-x: auto; overflow-y: auto; width: auto; max-height: 600px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "&gt;&lt;font class="Apple-style-span" color="#800000"&gt;&lt;span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; line-height: normal; white-space: normal; "&gt;&lt;br&gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;&lt;pre class="lang-rb prettyprint" style="margin-top: 0px; margin-right: 0px; margin-bottom: 10px; margin-left: 0px; padding-top: 5px; padding-right: 5px; padding-bottom: 5px; padding-left: 5px; border-top-width: 0px; border-right-width: 0px; border-bottom-width: 0px; border-left-width: 0px; border-style: initial; border-color: initial; font-size: 14px; vertical-align: baseline; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(255, 255, 255); font-family: Consolas, Menlo, Monaco, 'Lucida Console', 'Liberation Mono', 'DejaVu Sans Mono', 'Bitstream Vera Sans Mono', 'Courier New', monospace, serif; overflow-x: auto; overflow-y: auto; width: auto; max-height: 600px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: 18px; orphans: 2; text-align: left; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; "&gt;&lt;font class="Apple-style-span" color="#800000"&gt;&lt;span class="Apple-style-span" style="color: rgb(34, 34, 34); font-family: Arial, Helvetica, sans-serif; line-height: normal; white-space: normal; "&gt;&lt;br&gt;&lt;/span&gt;&lt;/font&gt;&lt;/pre&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To view this discussion on the web visit &lt;a href="https://groups.google.com/d/msg/rubyonrails-talk/-/u3_xUrLe3nsJ"&gt;https://groups.google.com/d/msg/rubyonrails-talk/-/u3_xUrLe3nsJ&lt;/a&gt;.&lt;br /&gt;  To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-4885120349826932120?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/4885120349826932120/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-actionmailer-and-ruby-smtp.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/4885120349826932120'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/4885120349826932120'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-actionmailer-and-ruby-smtp.html' title='[Rails] ActionMailer and Ruby SMTP causing a segmentation fault!'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-6781556957337378865</id><published>2012-01-27T13:42:00.000-08:00</published><updated>2012-01-27T13:43:43.065-08:00</updated><title type='text'>Re: [Rails] Re: Polymorphic association</title><content type='html'>On 27 January 2012 21:26, Colin Law &amp;lt;&lt;a href="mailto:clanlaw@googlemail.com"&gt;clanlaw@googlemail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; On 27 January 2012 21:18, Rodrigo Ruiz &amp;lt;&lt;a href="mailto:rodrigo.ruiz7@gmail.com"&gt;rodrigo.ruiz7@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt;&amp;gt; Could you recommend me a more complete book that I can read so I understand&lt;br&gt;&amp;gt;&amp;gt; the basics?&lt;br&gt;&amp;gt;&amp;gt; I really feel like I don&amp;#39;t right now.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; When you say you have read the rails tutorial book is that the one&lt;br&gt;&amp;gt; that goes with &lt;a href="http://railstutorial.org"&gt;railstutorial.org&lt;/a&gt;? &amp;#160;If so then reading it is not&lt;br&gt;&amp;gt; enough. &amp;#160;Work right through it doing all the examples and so on. &amp;#160;Make&lt;br&gt;&amp;gt; sure you understand every line of code.&lt;p&gt;When I say work through it I mean actually entering the code and&lt;br&gt;getting it to work of course.&lt;p&gt;Colin&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-6781556957337378865?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/6781556957337378865/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_6699.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/6781556957337378865'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/6781556957337378865'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_6699.html' title='Re: [Rails] Re: Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-8072099420725953236</id><published>2012-01-27T13:37:00.000-08:00</published><updated>2012-01-27T13:38:24.126-08:00</updated><title type='text'>Re: [Rails] Re: Polymorphic association</title><content type='html'>I'll second what Colin said. I'll also emphasize the need to "hold your horses". There's nothing more frustrating than having to wade through a ton of stuff before you start building something. But it's absolutely worth it, and it will save you a ton of time in the long run.&lt;br&gt;&lt;br&gt;If I had spent 10% of my time reading documentation, I would have saved the other 90% that I wasted editing lines of code, scanning hurriedly over tutorials, asking a ton of questions, etc... it really is true. It's frustrating at first, but it pays off and saves you a ton of time in the long term.&lt;br&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To view this discussion on the web visit &lt;a href="https://groups.google.com/d/msg/rubyonrails-talk/-/gpfZEWYqkawJ"&gt;https://groups.google.com/d/msg/rubyonrails-talk/-/gpfZEWYqkawJ&lt;/a&gt;.&lt;br /&gt;  To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-8072099420725953236?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/8072099420725953236/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_6976.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8072099420725953236'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8072099420725953236'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_6976.html' title='Re: [Rails] Re: Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-5597587760863842050</id><published>2012-01-27T13:34:00.001-08:00</published><updated>2012-01-27T13:34:46.439-08:00</updated><title type='text'>Re: [Rails] Re: Polymorphic association</title><content type='html'>Don't let that daunt you. I was in the same boat as you were not long ago. I'll tell you what I did:&lt;br&gt;&lt;br&gt;Completed http://ruby.railstutorial.org/ -- twice! It does an awesome job of explaining things.&lt;br&gt;Rails for Zombies I, a screen cast series on codeschool.com (I think--you'll have to google it).&lt;br&gt;Rails Casts&lt;br&gt;Rails Guides&lt;br&gt;&lt;br&gt;I actually started with Programming Ruby 1.9, the Pragmatic Programmers Guide. I didn't finish it. I read enough to get the basics of Ruby syntax. Knowing the Ruby syntax is essential since, to me, it looked nothing like anything I've seen before. Bracket were often omitted, and so were semi-colons, blocks, etc... understanding the syntax made understanding easier.&lt;br&gt;&lt;br&gt;After getting through 200 pages, I switched to Agile Web Development with Rails 4th Ed. Frankly, I thought it was a waste of money at that point. It just told you to do stuff without explaining much of what you were doing. Especially when it came to testing. I quit and switched to Rails Tutorial. I don't think it's beginner friendly.Rails Tutorial I thought was brilliant. But it was hard to follow because of some issues. There was no mention that Heroku did not support SQLite for example. But the book does an awesome job of explaining the basics. Read it carefully. And it's free.&lt;br&gt;&lt;br&gt;I'm planning on Reading Rails AntiPatterns and The Rails 3 Way next... &lt;br&gt;&lt;br&gt;&lt;br&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To view this discussion on the web visit &lt;a href="https://groups.google.com/d/msg/rubyonrails-talk/-/3jADydlM6VYJ"&gt;https://groups.google.com/d/msg/rubyonrails-talk/-/3jADydlM6VYJ&lt;/a&gt;.&lt;br /&gt;  To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-5597587760863842050?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/5597587760863842050/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_4619.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/5597587760863842050'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/5597587760863842050'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_4619.html' title='Re: [Rails] Re: Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-3975828400062498148</id><published>2012-01-27T13:26:00.001-08:00</published><updated>2012-01-27T13:26:48.362-08:00</updated><title type='text'>Re: [Rails] Re: Polymorphic association</title><content type='html'>On 27 January 2012 21:18, Rodrigo Ruiz &amp;lt;&lt;a href="mailto:rodrigo.ruiz7@gmail.com"&gt;rodrigo.ruiz7@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; Could you recommend me a more complete book that I can read so I understand&lt;br&gt;&amp;gt; the basics?&lt;br&gt;&amp;gt; I really feel like I don&amp;#39;t right now.&lt;p&gt;When you say you have read the rails tutorial book is that the one&lt;br&gt;that goes with &lt;a href="http://railstutorial.org"&gt;railstutorial.org&lt;/a&gt;?  If so then reading it is not&lt;br&gt;enough.  Work right through it doing all the examples and so on.  Make&lt;br&gt;sure you understand every line of code.  You may think that the&lt;br&gt;application it develops is not what you want but that does not matter,&lt;br&gt;it will show you a wide range of techniques.  Make sure that you have&lt;br&gt;installed the version of rails that matches that used by any tutorial&lt;br&gt;you use.&lt;p&gt;Colin&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-3975828400062498148?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/3975828400062498148/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_4632.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/3975828400062498148'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/3975828400062498148'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_4632.html' title='Re: [Rails] Re: Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-2366090857759218863</id><published>2012-01-27T13:18:00.000-08:00</published><updated>2012-01-27T13:19:05.104-08:00</updated><title type='text'>Re: [Rails] Re: Polymorphic association</title><content type='html'>Could you recommend me a more complete book that I can read so I understand the basics?&lt;div&gt;I really feel like I don&amp;#39;t right now.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thank you.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Fri, Jan 27, 2012 at 7:12 PM, Mohamad El-Husseini &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:husseini.mel@gmail.com"&gt;husseini.mel@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt; &lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt;Well, frankly, if I were you, I would read the documentation again. It doesn&amp;#39;t seem like you know what a polymorphic association is. You described a standard has_many relationship.&lt;br&gt; &lt;br&gt;Polymorphic association is when one model belongs to several different models. For example, to use the Rails casts episode, a comment can belong to a Photo, a Post, or a Product.&lt;br&gt;&lt;br&gt;From what you have written so far, it seems like you want a standard has_many and belongs_to association.&lt;br&gt; &lt;br&gt;User has_many :posts will let you do @user.posts, and a Post belongs_to :user will let you do post.user. If you want customize the name of the association, as in post.author, then I think you need to use the :class_name&lt;div class="im"&gt; &lt;br&gt;&lt;br&gt;&lt;br&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;&lt;/div&gt; To view this discussion on the web visit &lt;a href="https://groups.google.com/d/msg/rubyonrails-talk/-/hwFc1eURfFwJ" target="_blank"&gt;https://groups.google.com/d/msg/rubyonrails-talk/-/hwFc1eURfFwJ&lt;/a&gt;.&lt;div class="HOEnZb"&gt;&lt;div class="h5"&gt; &lt;br&gt;  To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-2366090857759218863?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/2366090857759218863/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_1884.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/2366090857759218863'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/2366090857759218863'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_1884.html' title='Re: [Rails] Re: Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-3965189800162336585</id><published>2012-01-27T13:12:00.001-08:00</published><updated>2012-01-27T13:12:47.497-08:00</updated><title type='text'>Re: [Rails] Re: Polymorphic association</title><content type='html'>Well, frankly, if I were you, I would read the documentation again. It doesn't seem like you know what a polymorphic association is. You described a standard has_many relationship.&lt;br&gt;&lt;br&gt;Polymorphic association is when one model belongs to several different models. For example, to use the Rails casts episode, a comment can belong to a Photo, a Post, or a Product.&lt;br&gt;&lt;br&gt;From what you have written so far, it seems like you want a standard has_many and belongs_to association.&lt;br&gt;&lt;br&gt;User has_many :posts will let you do @user.posts, and a Post belongs_to :user will let you do post.user. If you want customize the name of the association, as in post.author, then I think you need to use the :class_name&lt;br&gt;&lt;br&gt;&lt;br&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To view this discussion on the web visit &lt;a href="https://groups.google.com/d/msg/rubyonrails-talk/-/hwFc1eURfFwJ"&gt;https://groups.google.com/d/msg/rubyonrails-talk/-/hwFc1eURfFwJ&lt;/a&gt;.&lt;br /&gt;  To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-3965189800162336585?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/3965189800162336585/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_3840.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/3965189800162336585'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/3965189800162336585'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_3840.html' title='Re: [Rails] Re: Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-7337577454694476056</id><published>2012-01-27T12:42:00.001-08:00</published><updated>2012-01-27T12:42:46.757-08:00</updated><title type='text'>Re: [Rails] Re: Polymorphic association</title><content type='html'>I read the Rails Tutorial book, but I does not teach anything related to customizing that much, thats why I&amp;#39;m constantly search google and asking questions here (when I don&amp;#39;t find it on google).&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt; I&amp;#39;m still searching google, but couldn&amp;#39;t find my answer for the current question.&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Fri, Jan 27, 2012 at 5:50 PM, Mohamad El-Husseini &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:husseini.mel@gmail.com"&gt;husseini.mel@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt; &lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt;I suggest you pick up a book and start following a tutorial. Otherwise you&amp;#39;ll spend most of your time here waiting for people to answer your questions. This becomes frustrating very quickly.&lt;br&gt; &lt;br&gt;Trust me, it may seem easier to come here and ask extremely simple questions (the answers of which are obvious in the docs) but it&amp;#39;s not. In the long term, you&amp;#39;ll be thankful you took the extra few minutes to read and understand the docs. The books are extremely helpful and will answer most of your basic questions. I started learning Ruby and RoR about two weeks ago, and I&amp;#39;m very glad I took the time to read through and complete a tutorial.&lt;br&gt; &lt;br&gt;Just visit &lt;a href="http://amazon.com" target="_blank"&gt;amazon.com&lt;/a&gt; and type rails books and you&amp;#39;ll have a great selection to choose from. Also, try this, which I started with: &lt;a href="http://ruby.railstutorial.org/chapters/static-pages" target="_blank"&gt;http://ruby.railstutorial.org/chapters/static-pages&lt;/a&gt; --avoid the shortcuts and don&amp;#39;t rush. It pays off in the end.&lt;div class="im"&gt; &lt;br&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;&lt;/div&gt; To view this discussion on the web visit &lt;a href="https://groups.google.com/d/msg/rubyonrails-talk/-/SaT5HAQHi1EJ" target="_blank"&gt;https://groups.google.com/d/msg/rubyonrails-talk/-/SaT5HAQHi1EJ&lt;/a&gt;.&lt;div class="HOEnZb"&gt;&lt;div class="h5"&gt; &lt;br&gt;  To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-7337577454694476056?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/7337577454694476056/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_5274.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/7337577454694476056'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/7337577454694476056'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_5274.html' title='Re: [Rails] Re: Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-2858749584291536858</id><published>2012-01-27T12:09:00.000-08:00</published><updated>2012-01-27T12:10:21.225-08:00</updated><title type='text'>Re: [Rails] Controller validation and duck trading! How would you do it?</title><content type='html'>On 27 January 2012 19:40, Michael Pavling &amp;lt;&lt;a href="mailto:pavling@gmail.com"&gt;pavling@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; On 27 January 2012 18:21, Mohamad El-Husseini &amp;lt;&lt;a href="mailto:husseini.mel@gmail.com"&gt;husseini.mel@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt;&amp;gt; It&amp;#39;s always tricky to decide when logic belongs in the model.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Not really that tricky.. business logic *always* belongs in the model ;-)&lt;p&gt;The problem sometimes comes in deciding what is business logic and what is not.&lt;p&gt;Colin&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-2858749584291536858?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/2858749584291536858/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-controller-validation-and-duck_4976.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/2858749584291536858'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/2858749584291536858'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-controller-validation-and-duck_4976.html' title='Re: [Rails] Controller validation and duck trading! How would you do it?'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-5334710382150975713</id><published>2012-01-27T11:50:00.001-08:00</published><updated>2012-01-27T11:50:46.654-08:00</updated><title type='text'>Re: [Rails] Re: Polymorphic association</title><content type='html'>I suggest you pick up a book and start following a tutorial. Otherwise you'll spend most of your time here waiting for people to answer your questions. This becomes frustrating very quickly.&lt;br&gt;&lt;br&gt;Trust me, it may seem easier to come here and ask extremely simple questions (the answers of which are obvious in the docs) but it's not. In the long term, you'll be thankful you took the extra few minutes to read and understand the docs. The books are extremely helpful and will answer most of your basic questions. I started learning Ruby and RoR about two weeks ago, and I'm very glad I took the time to read through and complete a tutorial.&lt;br&gt;&lt;br&gt;Just visit amazon.com and type rails books and you'll have a great selection to choose from. Also, try this, which I started with: http://ruby.railstutorial.org/chapters/static-pages --avoid the shortcuts and don't rush. It pays off in the end.&lt;br&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To view this discussion on the web visit &lt;a href="https://groups.google.com/d/msg/rubyonrails-talk/-/SaT5HAQHi1EJ"&gt;https://groups.google.com/d/msg/rubyonrails-talk/-/SaT5HAQHi1EJ&lt;/a&gt;.&lt;br /&gt;  To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-5334710382150975713?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/5334710382150975713/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_4868.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/5334710382150975713'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/5334710382150975713'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_4868.html' title='Re: [Rails] Re: Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-7473257538726958520</id><published>2012-01-27T11:40:00.000-08:00</published><updated>2012-01-27T11:41:03.717-08:00</updated><title type='text'>Re: [Rails] Controller validation and duck trading! How would you do it?</title><content type='html'>On 27 January 2012 18:21, Mohamad El-Husseini &amp;lt;&lt;a href="mailto:husseini.mel@gmail.com"&gt;husseini.mel@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; It&amp;#39;s always tricky to decide when logic belongs in the model.&lt;p&gt;Not really that tricky.. business logic *always* belongs in the model ;-)&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-7473257538726958520?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/7473257538726958520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-controller-validation-and-duck_5584.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/7473257538726958520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/7473257538726958520'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-controller-validation-and-duck_5584.html' title='Re: [Rails] Controller validation and duck trading! How would you do it?'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-8077616333675972691</id><published>2012-01-27T10:53:00.001-08:00</published><updated>2012-01-27T10:53:33.232-08:00</updated><title type='text'>Re: [Rails] Re: Polymorphic association</title><content type='html'>Hey, I just manage to do what I wanted, but I had to add a owner_type column on my Posts migration with the content:&lt;div&gt;:owner_type =&amp;gt; &amp;#39;User&amp;#39;&lt;br&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks for everyone, and is there a better way than saving another varchar(255) to my database?&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-8077616333675972691?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/8077616333675972691/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_6749.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8077616333675972691'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8077616333675972691'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_6749.html' title='Re: [Rails] Re: Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-8429132773094847000</id><published>2012-01-27T10:39:00.001-08:00</published><updated>2012-01-27T10:39:19.257-08:00</updated><title type='text'>Re: [Rails] Re: Polymorphic association</title><content type='html'>I did, also, it gives me the error: &amp;quot;SQLite3::SQLException: no such column: protests.owner_type:&amp;quot;&lt;div&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Fri, Jan 27, 2012 at 4:37 PM, Benjamin Iandavid Rodriguez &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:ian.rgz@gmail.com"&gt;ian.rgz@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt; &lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt;You might want to take a look at the rails guides on active record associations&lt;br&gt;&lt;br&gt;&lt;a href="http://guides.rubyonrails.org/association_basics.html" target="_blank"&gt;http://guides.rubyonrails.org/association_basics.html&lt;/a&gt;&lt;div class="HOEnZb"&gt; &lt;div class="h5"&gt;&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt; 2012/1/27 Rodrigo Ruiz &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:rodrigo.ruiz7@gmail.com" target="_blank"&gt;rodrigo.ruiz7@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt;  That didn&amp;#39;t work.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;class Post&lt;/div&gt;&lt;div&gt;  belongs_to :owner, :polymorphic =&amp;gt; true&lt;/div&gt;&lt;div&gt;end&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;class User&lt;/div&gt;&lt;div&gt;  has_many :my_posts, :class_name =&amp;gt; &amp;#39;Post&amp;#39;, :as =&amp;gt; :owner&lt;/div&gt;   &lt;div&gt;end&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I can&amp;#39;t do: Post.first.owner or User.first.my_posts&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Fri, Jan 27, 2012 at 3:25 PM, Dheeraj Kumar &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:a.dheeraj.kumar@gmail.com" target="_blank"&gt;a.dheeraj.kumar@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;   &lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt;                 &lt;div&gt;Sure does :D&lt;span&gt;&lt;font color="#888888"&gt;&lt;br&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;span&gt;&lt;font color="#888888"&gt;                 &lt;div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Dheeraj Kumar&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/font&gt;&lt;/span&gt;&lt;div&gt;&lt;div&gt;                                   &lt;p style="color:#a0a0a8"&gt;On Friday 27 January 2012 at 10:52 PM, Rodrigo Ruiz wrote:&lt;/p&gt;                 &lt;blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px"&gt;                     &lt;span&gt;&lt;div&gt;&lt;div&gt;Yes, exactly! Does that :class_name works for has_many?&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I&amp;#39;ll try that now anyway.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thank you&lt;br&gt;&lt;br&gt;&lt;div&gt;On Fri, Jan 27, 2012 at 3:20 PM, Dheeraj Kumar &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:a.dheeraj.kumar@gmail.com" target="_blank"&gt;a.dheeraj.kumar@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;   &lt;blockquote type="cite"&gt;&lt;div&gt;                 &lt;div&gt;You can use :class_name and :foreign_key if that&amp;#39;s what you&amp;#39;re looking for.&lt;span&gt;&lt;font color="#888888"&gt;&lt;br&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;span&gt;&lt;font color="#888888"&gt;                 &lt;div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Dheeraj Kumar&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/font&gt;&lt;/span&gt;&lt;div&gt;&lt;div&gt;                                    &lt;p style="color:#a0a0a8"&gt;On Friday 27 January 2012 at 10:45 PM, Rodrigo Ruiz wrote:&lt;/p&gt;&lt;blockquote type="cite"&gt;&lt;div&gt;                     &lt;span&gt;&lt;div&gt;&lt;div&gt;I want this because I&amp;#39;m going to have to has_many associations to comments (to follow to same example):&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;class User&lt;/div&gt;&lt;div&gt;  has_many :my_comments&lt;/div&gt;&lt;div&gt;  has_many :comments_that_i_follow&lt;/div&gt;     &lt;div&gt;end&lt;br&gt;&lt;br&gt;&lt;div&gt;On Fri, Jan 27, 2012 at 3:08 PM, Greg Akins &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:angrygreg@gmail.com" target="_blank"&gt;angrygreg@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote type="cite"&gt;&lt;div&gt; &lt;div&gt;On Fri, Jan 27, 2012 at 12:05 PM, Rodrigo Ruiz &amp;lt;&lt;a href="mailto:rodrigo.ruiz7@gmail.com" target="_blank"&gt;rodrigo.ruiz7@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt; &amp;gt; I did, and it goes like:&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; @commentable.comments&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; but I want something like:&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; @commentable.my_comments&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; and not change the Comment model name&lt;br&gt; &lt;br&gt; &lt;/div&gt;def my_comments&lt;br&gt;     return comments&lt;br&gt; end&lt;br&gt; &lt;div&gt;&lt;div&gt;&lt;br&gt; --&lt;br&gt; Greg Akins&lt;br&gt; &lt;a href="http://twitter.com/akinsgre" target="_blank"&gt;http://twitter.com/akinsgre&lt;/a&gt;&lt;br&gt; &lt;br&gt; --&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &lt;br&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk+unsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/span&gt;                                                                                             &lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;                     &lt;br&gt;                 &lt;/div&gt;                &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk+unsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/span&gt;                                                                                         &lt;/blockquote&gt;                                   &lt;div&gt;                     &lt;br&gt;                 &lt;/div&gt;               &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-8429132773094847000?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/8429132773094847000/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_2667.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8429132773094847000'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8429132773094847000'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_2667.html' title='Re: [Rails] Re: Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-1185296547925064308</id><published>2012-01-27T10:37:00.000-08:00</published><updated>2012-01-27T10:38:02.835-08:00</updated><title type='text'>Re: [Rails] Re: Polymorphic association</title><content type='html'>You might want to take a look at the rails guides on active record associations&lt;br&gt;&lt;br&gt;&lt;a href="http://guides.rubyonrails.org/association_basics.html"&gt;http://guides.rubyonrails.org/association_basics.html&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt; 2012/1/27 Rodrigo Ruiz &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:rodrigo.ruiz7@gmail.com"&gt;rodrigo.ruiz7@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt; That didn&amp;#39;t work.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;class Post&lt;/div&gt;&lt;div&gt;  belongs_to :owner, :polymorphic =&amp;gt; true&lt;/div&gt;&lt;div&gt;end&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;class User&lt;/div&gt;&lt;div&gt;  has_many :my_posts, :class_name =&amp;gt; &amp;#39;Post&amp;#39;, :as =&amp;gt; :owner&lt;/div&gt;  &lt;div&gt;end&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I can&amp;#39;t do: Post.first.owner or User.first.my_posts&lt;/div&gt;&lt;div class="HOEnZb"&gt;&lt;div class="h5"&gt;&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Fri, Jan 27, 2012 at 3:25 PM, Dheeraj Kumar &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:a.dheeraj.kumar@gmail.com" target="_blank"&gt;a.dheeraj.kumar@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;  &lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt;                 &lt;div&gt;Sure does :D&lt;span&gt;&lt;font color="#888888"&gt;&lt;br&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;span&gt;&lt;font color="#888888"&gt;                 &lt;div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Dheeraj Kumar&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/font&gt;&lt;/span&gt;&lt;div&gt;&lt;div&gt;                                   &lt;p style="color:#a0a0a8"&gt;On Friday 27 January 2012 at 10:52 PM, Rodrigo Ruiz wrote:&lt;/p&gt;                 &lt;blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px"&gt;                     &lt;span&gt;&lt;div&gt;&lt;div&gt;Yes, exactly! Does that :class_name works for has_many?&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I&amp;#39;ll try that now anyway.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thank you&lt;br&gt;&lt;br&gt;&lt;div&gt;On Fri, Jan 27, 2012 at 3:20 PM, Dheeraj Kumar &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:a.dheeraj.kumar@gmail.com" target="_blank"&gt;a.dheeraj.kumar@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;  &lt;blockquote type="cite"&gt;&lt;div&gt;                 &lt;div&gt;You can use :class_name and :foreign_key if that&amp;#39;s what you&amp;#39;re looking for.&lt;span&gt;&lt;font color="#888888"&gt;&lt;br&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;span&gt;&lt;font color="#888888"&gt;                 &lt;div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Dheeraj Kumar&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/font&gt;&lt;/span&gt;&lt;div&gt;&lt;div&gt;                                    &lt;p style="color:#a0a0a8"&gt;On Friday 27 January 2012 at 10:45 PM, Rodrigo Ruiz wrote:&lt;/p&gt;&lt;blockquote type="cite"&gt;&lt;div&gt;                     &lt;span&gt;&lt;div&gt;&lt;div&gt;I want this because I&amp;#39;m going to have to has_many associations to comments (to follow to same example):&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;class User&lt;/div&gt;&lt;div&gt;  has_many :my_comments&lt;/div&gt;&lt;div&gt;  has_many :comments_that_i_follow&lt;/div&gt;    &lt;div&gt;end&lt;br&gt;&lt;br&gt;&lt;div&gt;On Fri, Jan 27, 2012 at 3:08 PM, Greg Akins &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:angrygreg@gmail.com" target="_blank"&gt;angrygreg@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote type="cite"&gt;&lt;div&gt; &lt;div&gt;On Fri, Jan 27, 2012 at 12:05 PM, Rodrigo Ruiz &amp;lt;&lt;a href="mailto:rodrigo.ruiz7@gmail.com" target="_blank"&gt;rodrigo.ruiz7@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt; &amp;gt; I did, and it goes like:&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; @commentable.comments&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; but I want something like:&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; @commentable.my_comments&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; and not change the Comment model name&lt;br&gt; &lt;br&gt; &lt;/div&gt;def my_comments&lt;br&gt;     return comments&lt;br&gt; end&lt;br&gt; &lt;div&gt;&lt;div&gt;&lt;br&gt; --&lt;br&gt; Greg Akins&lt;br&gt; &lt;a href="http://twitter.com/akinsgre" target="_blank"&gt;http://twitter.com/akinsgre&lt;/a&gt;&lt;br&gt; &lt;br&gt; --&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &lt;br&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk+unsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/span&gt;                                                                                             &lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;                     &lt;br&gt;                 &lt;/div&gt;                &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk+unsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/span&gt;                                                                                         &lt;/blockquote&gt;                                   &lt;div&gt;                     &lt;br&gt;                 &lt;/div&gt;               &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-1185296547925064308?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/1185296547925064308/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_7494.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/1185296547925064308'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/1185296547925064308'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_7494.html' title='Re: [Rails] Re: Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-522371619439304896</id><published>2012-01-27T10:28:00.000-08:00</published><updated>2012-01-27T10:29:03.186-08:00</updated><title type='text'>Re: [Rails] Re: Polymorphic association</title><content type='html'>That didn&amp;#39;t work.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;class Post&lt;/div&gt;&lt;div&gt;  belongs_to :owner, :polymorphic =&amp;gt; true&lt;/div&gt;&lt;div&gt;end&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;class User&lt;/div&gt;&lt;div&gt;  has_many :my_posts, :class_name =&amp;gt; &amp;#39;Post&amp;#39;, :as =&amp;gt; :owner&lt;/div&gt; &lt;div&gt;end&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I can&amp;#39;t do: Post.first.owner or User.first.my_posts&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Fri, Jan 27, 2012 at 3:25 PM, Dheeraj Kumar &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:a.dheeraj.kumar@gmail.com"&gt;a.dheeraj.kumar@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt; &lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt;                 &lt;div&gt;Sure does :D&lt;span class="HOEnZb"&gt;&lt;font color="#888888"&gt;&lt;br&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="HOEnZb"&gt;&lt;font color="#888888"&gt;                 &lt;div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Dheeraj Kumar&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/font&gt;&lt;/span&gt;&lt;div class="HOEnZb"&gt;&lt;div class="h5"&gt;                                   &lt;p style="color:#a0a0a8"&gt;On Friday 27 January 2012 at 10:52 PM, Rodrigo Ruiz wrote:&lt;/p&gt;                 &lt;blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px"&gt;                     &lt;span&gt;&lt;div&gt;&lt;div&gt;Yes, exactly! Does that :class_name works for has_many?&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I&amp;#39;ll try that now anyway.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thank you&lt;br&gt;&lt;br&gt;&lt;div&gt;On Fri, Jan 27, 2012 at 3:20 PM, Dheeraj Kumar &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:a.dheeraj.kumar@gmail.com" target="_blank"&gt;a.dheeraj.kumar@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt; &lt;blockquote type="cite"&gt;&lt;div&gt;                 &lt;div&gt;You can use :class_name and :foreign_key if that&amp;#39;s what you&amp;#39;re looking for.&lt;span&gt;&lt;font color="#888888"&gt;&lt;br&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;span&gt;&lt;font color="#888888"&gt;                 &lt;div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Dheeraj Kumar&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/font&gt;&lt;/span&gt;&lt;div&gt;&lt;div&gt;                                    &lt;p style="color:#a0a0a8"&gt;On Friday 27 January 2012 at 10:45 PM, Rodrigo Ruiz wrote:&lt;/p&gt;&lt;blockquote type="cite"&gt;&lt;div&gt;                     &lt;span&gt;&lt;div&gt;&lt;div&gt;I want this because I&amp;#39;m going to have to has_many associations to comments (to follow to same example):&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;class User&lt;/div&gt;&lt;div&gt;  has_many :my_comments&lt;/div&gt;&lt;div&gt;  has_many :comments_that_i_follow&lt;/div&gt;   &lt;div&gt;end&lt;br&gt;&lt;br&gt;&lt;div&gt;On Fri, Jan 27, 2012 at 3:08 PM, Greg Akins &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:angrygreg@gmail.com" target="_blank"&gt;angrygreg@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote type="cite"&gt;&lt;div&gt; &lt;div&gt;On Fri, Jan 27, 2012 at 12:05 PM, Rodrigo Ruiz &amp;lt;&lt;a href="mailto:rodrigo.ruiz7@gmail.com" target="_blank"&gt;rodrigo.ruiz7@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt; &amp;gt; I did, and it goes like:&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; @commentable.comments&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; but I want something like:&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; @commentable.my_comments&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; and not change the Comment model name&lt;br&gt; &lt;br&gt; &lt;/div&gt;def my_comments&lt;br&gt;     return comments&lt;br&gt; end&lt;br&gt; &lt;div&gt;&lt;div&gt;&lt;br&gt; --&lt;br&gt; Greg Akins&lt;br&gt; &lt;a href="http://twitter.com/akinsgre" target="_blank"&gt;http://twitter.com/akinsgre&lt;/a&gt;&lt;br&gt; &lt;br&gt; --&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &lt;br&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk+unsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/span&gt;                                                                                             &lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;                     &lt;br&gt;                 &lt;/div&gt;                &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk+unsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/span&gt;                                                                                         &lt;/blockquote&gt;                                   &lt;div&gt;                     &lt;br&gt;                 &lt;/div&gt;               &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-522371619439304896?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/522371619439304896/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_27.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/522371619439304896'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/522371619439304896'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association_27.html' title='Re: [Rails] Re: Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-704952134567409873</id><published>2012-01-27T10:21:00.001-08:00</published><updated>2012-01-27T10:21:29.510-08:00</updated><title type='text'>Re: [Rails] Controller validation and duck trading! How would you do it?</title><content type='html'>Thanks everyone. I appreciate the input. It's always tricky to decide when logic belongs in the model. I wish there was a clean and obvious definition. I guess it comes with experience.&lt;br&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To view this discussion on the web visit &lt;a href="https://groups.google.com/d/msg/rubyonrails-talk/-/go6g1SkGk80J"&gt;https://groups.google.com/d/msg/rubyonrails-talk/-/go6g1SkGk80J&lt;/a&gt;.&lt;br /&gt;  To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-704952134567409873?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/704952134567409873/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-controller-validation-and-duck_27.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/704952134567409873'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/704952134567409873'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-controller-validation-and-duck_27.html' title='Re: [Rails] Controller validation and duck trading! How would you do it?'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-850620171306050390</id><published>2012-01-27T09:22:00.000-08:00</published><updated>2012-01-27T09:23:00.277-08:00</updated><title type='text'>Re: [Rails] Re: Polymorphic association</title><content type='html'>Yes, exactly! Does that :class_name works for has_many?&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I&amp;#39;ll try that now anyway.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thank you&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Fri, Jan 27, 2012 at 3:20 PM, Dheeraj Kumar &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:a.dheeraj.kumar@gmail.com"&gt;a.dheeraj.kumar@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt; &lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt;                 &lt;div&gt;You can use :class_name and :foreign_key if that&amp;#39;s what you&amp;#39;re looking for.&lt;span class="HOEnZb"&gt;&lt;font color="#888888"&gt;&lt;br&gt;&lt;/font&gt;&lt;/span&gt;&lt;/div&gt;&lt;span class="HOEnZb"&gt;&lt;font color="#888888"&gt;                 &lt;div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Dheeraj Kumar&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/font&gt;&lt;/span&gt;&lt;div class="HOEnZb"&gt;&lt;div class="h5"&gt;                                   &lt;p style="color:#a0a0a8"&gt;On Friday 27 January 2012 at 10:45 PM, Rodrigo Ruiz wrote:&lt;/p&gt;                 &lt;blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px"&gt;                     &lt;span&gt;&lt;div&gt;&lt;div&gt;I want this because I&amp;#39;m going to have to has_many associations to comments (to follow to same example):&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;class User&lt;/div&gt;&lt;div&gt;  has_many :my_comments&lt;/div&gt;&lt;div&gt;  has_many :comments_that_i_follow&lt;/div&gt;  &lt;div&gt;end&lt;br&gt;&lt;br&gt;&lt;div&gt;On Fri, Jan 27, 2012 at 3:08 PM, Greg Akins &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:angrygreg@gmail.com" target="_blank"&gt;angrygreg@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote type="cite"&gt;&lt;div&gt; &lt;div&gt;On Fri, Jan 27, 2012 at 12:05 PM, Rodrigo Ruiz &amp;lt;&lt;a href="mailto:rodrigo.ruiz7@gmail.com" target="_blank"&gt;rodrigo.ruiz7@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt; &amp;gt; I did, and it goes like:&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; @commentable.comments&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; but I want something like:&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; @commentable.my_comments&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; and not change the Comment model name&lt;br&gt; &lt;br&gt; &lt;/div&gt;def my_comments&lt;br&gt;     return comments&lt;br&gt; end&lt;br&gt; &lt;div&gt;&lt;div&gt;&lt;br&gt; --&lt;br&gt; Greg Akins&lt;br&gt; &lt;a href="http://twitter.com/akinsgre" target="_blank"&gt;http://twitter.com/akinsgre&lt;/a&gt;&lt;br&gt; &lt;br&gt; --&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &lt;br&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk+unsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/span&gt;                                                                                         &lt;/blockquote&gt;                                   &lt;div&gt;                     &lt;br&gt;                 &lt;/div&gt;               &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-850620171306050390?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/850620171306050390/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/850620171306050390'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/850620171306050390'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-polymorphic-association.html' title='Re: [Rails] Re: Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-1088414829536657781</id><published>2012-01-27T09:20:00.001-08:00</published><updated>2012-01-27T09:20:44.849-08:00</updated><title type='text'>[Rails] Re: Polymorphic association</title><content type='html'>                 &lt;div&gt;You can use :class_name and :foreign_key if that's what you're looking for.&lt;br&gt;&lt;/div&gt;                 &lt;div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Dheeraj Kumar&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;                                   &lt;p style="color: #A0A0A8;"&gt;On Friday 27 January 2012 at 10:45 PM, Rodrigo Ruiz wrote:&lt;/p&gt;                 &lt;blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;"&gt;                     &lt;span&gt;&lt;div&gt;&lt;div&gt;I want this because I'm going to have to has_many associations to comments (to follow to same example):&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;class User&lt;/div&gt;&lt;div&gt;&amp;nbsp; has_many :my_comments&lt;/div&gt;&lt;div&gt;&amp;nbsp; has_many :comments_that_i_follow&lt;/div&gt; &lt;div&gt;end&lt;br&gt;&lt;br&gt;&lt;div&gt;On Fri, Jan 27, 2012 at 3:08 PM, Greg Akins &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:angrygreg@gmail.com"&gt;angrygreg@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote type="cite"&gt;&lt;div&gt; &lt;div&gt;On Fri, Jan 27, 2012 at 12:05 PM, Rodrigo Ruiz &amp;lt;&lt;a href="mailto:rodrigo.ruiz7@gmail.com"&gt;rodrigo.ruiz7@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt; &amp;gt; I did, and it goes like:&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; @commentable.comments&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; but I want something like:&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; @commentable.my_comments&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; and not change the Comment model name&lt;br&gt; &lt;br&gt; &lt;/div&gt;def my_comments&lt;br&gt;  &amp;nbsp; &amp;nbsp;return comments&lt;br&gt; end&lt;br&gt; &lt;div&gt;&lt;div&gt;&lt;br&gt; --&lt;br&gt; Greg Akins&lt;br&gt; &lt;a href="http://twitter.com/akinsgre" target="_blank"&gt;http://twitter.com/akinsgre&lt;/a&gt;&lt;br&gt; &lt;br&gt; --&lt;br&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &lt;br&gt; &lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk+unsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/span&gt;                                                                                         &lt;/blockquote&gt;                                   &lt;div&gt;                     &lt;br&gt;                 &lt;/div&gt;               &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-1088414829536657781?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/1088414829536657781/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-polymorphic-association.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/1088414829536657781'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/1088414829536657781'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-polymorphic-association.html' title='[Rails] Re: Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-7329405757359724310</id><published>2012-01-27T09:15:00.001-08:00</published><updated>2012-01-27T09:15:16.102-08:00</updated><title type='text'>Re: [Rails] Polymorphic association</title><content type='html'>I want this because I&amp;#39;m going to have to has_many associations to comments (to follow to same example):&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;class User&lt;/div&gt;&lt;div&gt;  has_many :my_comments&lt;/div&gt;&lt;div&gt;  has_many :comments_that_i_follow&lt;/div&gt; &lt;div&gt;end&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Fri, Jan 27, 2012 at 3:08 PM, Greg Akins &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:angrygreg@gmail.com"&gt;angrygreg@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt; &lt;div class="im"&gt;On Fri, Jan 27, 2012 at 12:05 PM, Rodrigo Ruiz &amp;lt;&lt;a href="mailto:rodrigo.ruiz7@gmail.com"&gt;rodrigo.ruiz7@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt; &amp;gt; I did, and it goes like:&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; @commentable.comments&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; but I want something like:&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; @commentable.my_comments&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; and not change the Comment model name&lt;br&gt; &lt;br&gt; &lt;/div&gt;def my_comments&lt;br&gt;     return comments&lt;br&gt; end&lt;br&gt; &lt;div class="HOEnZb"&gt;&lt;div class="h5"&gt;&lt;br&gt; --&lt;br&gt; Greg Akins&lt;br&gt; &lt;a href="http://twitter.com/akinsgre" target="_blank"&gt;http://twitter.com/akinsgre&lt;/a&gt;&lt;br&gt; &lt;br&gt; --&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &lt;br&gt; &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-7329405757359724310?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/7329405757359724310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-polymorphic-association_842.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/7329405757359724310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/7329405757359724310'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-polymorphic-association_842.html' title='Re: [Rails] Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-7642471639506288187</id><published>2012-01-27T09:08:00.001-08:00</published><updated>2012-01-27T09:08:44.979-08:00</updated><title type='text'>Re: [Rails] Polymorphic association</title><content type='html'>On Fri, Jan 27, 2012 at 12:05 PM, Rodrigo Ruiz &amp;lt;&lt;a href="mailto:rodrigo.ruiz7@gmail.com"&gt;rodrigo.ruiz7@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; I did, and it goes like:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; @commentable.comments&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; but I want something like:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; @commentable.my_comments&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; and not change the Comment model name&lt;p&gt;def my_comments&lt;br&gt;    return comments&lt;br&gt;end&lt;p&gt;-- &lt;br&gt;Greg Akins&lt;br&gt;&lt;a href="http://twitter.com/akinsgre"&gt;http://twitter.com/akinsgre&lt;/a&gt;&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-7642471639506288187?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/7642471639506288187/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-polymorphic-association_45.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/7642471639506288187'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/7642471639506288187'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-polymorphic-association_45.html' title='Re: [Rails] Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-4703568630018476976</id><published>2012-01-27T09:05:00.000-08:00</published><updated>2012-01-27T09:06:03.299-08:00</updated><title type='text'>Re: [Rails] Polymorphic association</title><content type='html'>I did, and it goes like:&lt;div&gt;&lt;span class="Apple-style-span" style="color:rgb(230,224,219);font-family:Menlo,&amp;#39;Courier New&amp;#39;,Terminal,monospace;font-size:13px;line-height:17px"&gt;&lt;pre style="font-family:Menlo,&amp;#39;Courier New&amp;#39;,Terminal,monospace;background-color:rgb(35,35,35);color:rgb(230,224,219);margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px"&gt; &lt;span class="iv" style="color:rgb(208,207,254)"&gt;@commentable&lt;/span&gt;.comments&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;but I want something like:&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span" style="color:rgb(230,224,219);font-family:Menlo,&amp;#39;Courier New&amp;#39;,Terminal,monospace;font-size:13px;line-height:17px"&gt;&lt;pre style="font-family:Menlo,&amp;#39;Courier New&amp;#39;,Terminal,monospace;background-color:rgb(35,35,35);color:rgb(230,224,219);margin-top:0px;margin-right:0px;margin-bottom:0px;margin-left:0px;padding-top:0px;padding-right:0px;padding-bottom:0px;padding-left:0px"&gt; &lt;span class="iv" style="color:rgb(208,207,254)"&gt;@commentable&lt;/span&gt;.my_comments&lt;/pre&gt;&lt;/span&gt;&lt;/div&gt;&lt;div&gt;and not change the Comment model name&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Fri, Jan 27, 2012 at 2:53 PM, Greg Akins &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:angrygreg@gmail.com"&gt;angrygreg@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt; &lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt;&lt;div class="im"&gt;On Fri, Jan 27, 2012 at 11:52 AM, Greg Akins &amp;lt;&lt;a href="mailto:angrygreg@gmail.com"&gt;angrygreg@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;  &amp;gt; On Fri, Jan 27, 2012 at 11:44 AM, Rodrigo Ruiz &amp;lt;&lt;a href="mailto:rodrigo.ruiz7@gmail.com"&gt;rodrigo.ruiz7@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt; &amp;gt;&amp;gt; Hi, I want to do a polymorphic association like that:&lt;br&gt; &lt;br&gt; &lt;/div&gt;Try this railscast  &lt;a href="http://railscasts.com/episodes/154-polymorphic-association" target="_blank"&gt;http://railscasts.com/episodes/154-polymorphic-association&lt;/a&gt;&lt;br&gt; &lt;div class="HOEnZb"&gt;&lt;div class="h5"&gt;&lt;br&gt; &lt;br&gt; --&lt;br&gt; Greg Akins&lt;br&gt; &lt;a href="http://twitter.com/akinsgre" target="_blank"&gt;http://twitter.com/akinsgre&lt;/a&gt;&lt;br&gt; &lt;br&gt; --&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &lt;br&gt; &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-4703568630018476976?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/4703568630018476976/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-polymorphic-association_7453.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/4703568630018476976'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/4703568630018476976'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-polymorphic-association_7453.html' title='Re: [Rails] Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-4360373942692321096</id><published>2012-01-27T08:58:00.000-08:00</published><updated>2012-01-27T08:59:03.116-08:00</updated><title type='text'>Re: [Rails] Skipping the First Line when reading in a text file</title><content type='html'>On Jan 26, 2012, at 8:18 PM, Bala TS wrote:&lt;p&gt;&amp;gt; I am using csv...&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; it is work:&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; if you are interested try this way:&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; require &amp;#39;csv&amp;#39;&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; reader = CSV.open(&amp;quot;file_location&amp;quot;, &amp;quot;r&amp;quot;)&lt;br&gt;&amp;gt; reader.shift # this line is used to skipped first header line&lt;br&gt;&amp;gt; reader.each{|row|&lt;br&gt;&amp;gt; first_field = row[0]&lt;br&gt;&amp;gt; second_field = row[1]&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; Module_Name.create(&lt;br&gt;&amp;gt;  :attribute1 =&amp;gt; first_field,&lt;br&gt;&amp;gt;  :attribute2 =&amp;gt; second_field&lt;br&gt;&amp;gt;  )&lt;br&gt;&amp;gt; }&lt;p&gt;I don&amp;#39;t know if CSV has the option, but FasterCSV has an option you can pass to inform it that the first line is the header row and it will skip it automatically...&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-4360373942692321096?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/4360373942692321096/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-skipping-first-line-when.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/4360373942692321096'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/4360373942692321096'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-skipping-first-line-when.html' title='Re: [Rails] Skipping the First Line when reading in a text file'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-5791087966160277696</id><published>2012-01-27T08:53:00.001-08:00</published><updated>2012-01-27T08:53:55.248-08:00</updated><title type='text'>Re: [Rails] Polymorphic association</title><content type='html'>On Fri, Jan 27, 2012 at 11:52 AM, Greg Akins &amp;lt;&lt;a href="mailto:angrygreg@gmail.com"&gt;angrygreg@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; On Fri, Jan 27, 2012 at 11:44 AM, Rodrigo Ruiz &amp;lt;&lt;a href="mailto:rodrigo.ruiz7@gmail.com"&gt;rodrigo.ruiz7@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt;&amp;gt; Hi, I want to do a polymorphic association like that:&lt;p&gt;Try this railscast  &lt;a href="http://railscasts.com/episodes/154-polymorphic-association"&gt;http://railscasts.com/episodes/154-polymorphic-association&lt;/a&gt;&lt;p&gt;&lt;br&gt;-- &lt;br&gt;Greg Akins&lt;br&gt;&lt;a href="http://twitter.com/akinsgre"&gt;http://twitter.com/akinsgre&lt;/a&gt;&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-5791087966160277696?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/5791087966160277696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-polymorphic-association_27.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/5791087966160277696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/5791087966160277696'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-polymorphic-association_27.html' title='Re: [Rails] Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-6613129794754866279</id><published>2012-01-27T08:52:00.000-08:00</published><updated>2012-01-27T08:53:03.412-08:00</updated><title type='text'>Re: [Rails] Polymorphic association</title><content type='html'>On Fri, Jan 27, 2012 at 11:44 AM, Rodrigo Ruiz &amp;lt;&lt;a href="mailto:rodrigo.ruiz7@gmail.com"&gt;rodrigo.ruiz7@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; Hi, I want to do a polymorphic association like that:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; class User&lt;br&gt;&amp;gt; &amp;#160; has_many :my_posts, :as =&amp;gt; :owner&lt;br&gt;&amp;gt; end&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; class Post&lt;br&gt;&amp;gt; &amp;#160; belongs_to, :owner, :polymorphic =&amp;gt; true&lt;br&gt;&amp;gt; end&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; meaning that I want to do:&lt;br&gt;&amp;gt; @user = User.new&lt;br&gt;&amp;gt; @user.my_posts (and that would return Post objects)&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; also&lt;br&gt;&amp;gt; @post = Post.new&lt;br&gt;&amp;gt; @post.owner (this would return a User object)&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; How can I do that?&lt;p&gt;It looks like you&amp;#39;re describing a standard has_many relationship.  Are&lt;br&gt;you implying that Post will be extended to be different classes?&lt;p&gt;&lt;br&gt;-- &lt;br&gt;Greg Akins&lt;br&gt;&lt;a href="http://twitter.com/akinsgre"&gt;http://twitter.com/akinsgre&lt;/a&gt;&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-6613129794754866279?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/6613129794754866279/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-polymorphic-association.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/6613129794754866279'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/6613129794754866279'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-polymorphic-association.html' title='Re: [Rails] Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-1099683328797168893</id><published>2012-01-27T08:44:00.001-08:00</published><updated>2012-01-27T08:44:54.166-08:00</updated><title type='text'>[Rails] Polymorphic association</title><content type='html'>Hi, I want to do a polymorphic association like that:&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;class User&lt;/div&gt;&lt;div&gt;  has_many :my_posts, :as =&amp;gt; :owner&lt;/div&gt;&lt;div&gt;end&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;class Post&lt;/div&gt;&lt;div&gt;  belongs_to, :owner, :polymorphic =&amp;gt; true&lt;/div&gt; &lt;div&gt;end&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;meaning that I want to do:&lt;/div&gt;&lt;div&gt;@user = User.new&lt;/div&gt;&lt;div&gt;@user.my_posts (and that would return Post objects)&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;also&lt;/div&gt;&lt;div&gt;@post = Post.new&lt;/div&gt; &lt;div&gt;@post.owner (this would return a User object)&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;How can I do that?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks in advance.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-1099683328797168893?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/1099683328797168893/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-polymorphic-association.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/1099683328797168893'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/1099683328797168893'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-polymorphic-association.html' title='[Rails] Polymorphic association'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-132073728724965086</id><published>2012-01-27T08:41:00.001-08:00</published><updated>2012-01-27T08:41:57.734-08:00</updated><title type='text'>Re: [Rails] Devise - Sign up and sign in at same view</title><content type='html'>The problem is that I want to redirect to the same url (meaning, I don&amp;#39;t want to redirect, just want to go to the same route, and it will render a different view because I did this in the view with an &amp;quot;if user_sign_in?&amp;quot;)&lt;br&gt; &lt;br&gt;&lt;div class="gmail_quote"&gt;On Fri, Jan 27, 2012 at 1:54 PM, thiagocifani &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:cifani.thiago@gmail.com"&gt;cifani.thiago@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt; Hello Rodrigo, &lt;br&gt;&lt;br&gt;if you need to redirect the user after login, there is a method in devise that make it. You should take a look in the documentation first, but the method is &lt;span&gt;after_sign_in_path_for() &lt;br&gt; &lt;br&gt;&lt;br&gt;cheers&lt;br&gt;&lt;/span&gt;&lt;div class="HOEnZb"&gt;&lt;div class="h5"&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;2012/1/27 Walter Lee Davis &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:waltd@wdstudio.com" target="_blank"&gt;waltd@wdstudio.com&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt; &lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt; &lt;div&gt;&lt;br&gt; On Jan 27, 2012, at 9:45 AM, Rodrigo Ruiz wrote:&lt;br&gt; &lt;br&gt; &amp;gt; It didn&amp;#39;t work, when I do&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; devise_for :users do&lt;br&gt; &amp;gt;     root :to =&amp;gt; &amp;quot;devise/sessions#new&amp;quot;&lt;br&gt; &amp;gt; end&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; because I want to log in in the root url and then remain there, but with a different rendering (logic is inside the new view of users/sessions)&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; It keeps trying to redirect to the root url again and again, giving a message &amp;quot;Too many redirects occur...&amp;quot;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; What should I do?&lt;br&gt; &lt;br&gt; &lt;/div&gt;I think you need to re-think how this login will work. If you&amp;#39;re trying to log in on a page, and then show that same page again after the user has logged in, what will trigger to the authentication system that the login is necessary?&lt;br&gt;   &lt;br&gt; Devise is abstracted around solving this particular problem: User arrives at a page that she needs to be authenticated in order to see. She is redirected to a login page, authenticates, and then is redirected back to the originally requested page. If you&amp;#39;re not trying to do that, then you have to add on to that behavior, not replace it, or you won&amp;#39;t have much benefit to using this framework.&lt;br&gt;   &lt;br&gt; Try this. Follow the examples (RailsCast has a very nice treatment of Devise, goes into all the nooks and crannies in two parts) and build the normal authentication system. Be sure to set a root page that is not the login path. Then add a *login form* to your root page (and optionally hide it if the user is logged in) using render partial in your view. This will be used to authenticate people who *want to* sign in before they are *required to* sign in.&lt;br&gt;   &lt;span&gt;&lt;font color="#888888"&gt;&lt;br&gt; Walter&lt;br&gt; &lt;/font&gt;&lt;/span&gt;&lt;div&gt;&lt;div&gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; Thanks in advance&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; On Thu, Jan 26, 2012 at 1:09 PM, Walter Lee Davis &amp;lt;&lt;a href="mailto:waltd@wdstudio.com" target="_blank"&gt;waltd@wdstudio.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt; &amp;gt; I just did this. I let Devise generate the views (rake task, check the wiki) and then I modified the devise/sessions/new layout to combine sign in and sign up.&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; &amp;lt;%- title &amp;quot;Sign in or sign up&amp;quot; %&amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; &amp;lt;div class=&amp;quot;left half&amp;quot;&amp;gt;&lt;br&gt; &amp;gt;        &amp;lt;h3&amp;gt;Already registered?&amp;lt;/h3&amp;gt;&lt;br&gt; &amp;gt; &amp;lt;%= form_for(resource, :as =&amp;gt; resource_name, :url =&amp;gt; session_path(resource_name)) do |f| %&amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;p&amp;gt;&amp;lt;%= f.label :email %&amp;gt;&amp;lt;br /&amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;%= f.email_field :email %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;p&amp;gt;&amp;lt;%= f.label :password %&amp;gt;&amp;lt;br /&amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;%= f.password_field :password %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;% if devise_mapping.rememberable? -%&amp;gt;&lt;br&gt; &amp;gt;    &amp;lt;p&amp;gt;&amp;lt;%= f.check_box :remember_me %&amp;gt; &amp;lt;%= f.label :remember_me %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;% end -%&amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;p&amp;gt;&amp;lt;%= f.submit &amp;quot;Sign in&amp;quot; %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt; &amp;gt; &amp;lt;% end %&amp;gt;&lt;br&gt; &amp;gt; &amp;lt;/div&amp;gt;&lt;br&gt; &amp;gt; &amp;lt;div class=&amp;quot;half left&amp;quot;&amp;gt;&lt;br&gt; &amp;gt;        &amp;lt;h3&amp;gt;Create an account&amp;lt;/h3&amp;gt;&lt;br&gt; &amp;gt;        &amp;lt;%= render :partial =&amp;gt; &amp;#39;devise/registrations/form&amp;#39; %&amp;gt;&lt;br&gt; &amp;gt; &amp;lt;/div&amp;gt;&lt;br&gt; &amp;gt; &amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;lt;%= render :partial =&amp;gt; &amp;quot;devise/shared/links&amp;quot; %&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; Walter&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; On Jan 26, 2012, at 9:58 AM, Rodrigo Ruiz wrote:&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; &amp;gt; Hi, I&amp;#39;d like to know what is the best way to do this. Right now I can see two options:&lt;br&gt; &amp;gt; &amp;gt; 1) create a new views at make a custom controller for registration controller to redirect to the right path&lt;br&gt; &amp;gt; &amp;gt; 2) change the registration views that devise generates for you (so, for example, the new view will have the session view inside it for the sign in too)&lt;br&gt; &amp;gt; &amp;gt;&lt;br&gt; &amp;gt; &amp;gt; Thanks in advance.&lt;br&gt; &amp;gt; &amp;gt;&lt;br&gt; &amp;gt; &amp;gt; --&lt;br&gt; &amp;gt; &amp;gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; &amp;gt; &amp;gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; &amp;gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; &amp;gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; --&lt;br&gt; &amp;gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; &amp;gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; --&lt;br&gt; &amp;gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; &amp;gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &lt;br&gt; --&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &lt;br&gt; &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear="all"&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;span class="HOEnZb"&gt;&lt;font color="#888888"&gt;-- &lt;br&gt;thiagocifani&lt;div&gt;&lt;a href="http://thiagocifani.wordpress.com/" target="_blank"&gt;http://thiagocifani.wordpress.com/&lt;/a&gt;&lt;br&gt; &lt;a href="http://twitter.com/thiagocifani" target="_blank"&gt;twitter.com/thiagocifani&lt;/a&gt;&lt;br&gt; &lt;span&gt;&lt;cite&gt;&lt;/cite&gt;&lt;/span&gt;&lt;a href="http://del.icio.us/thiagocifani" target="_blank"&gt;del.icio.us/thiagocifani&lt;/a&gt;&lt;div&gt;&lt;a href="http://del.icio.us/thiagocifani" target="_blank"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/font&gt;&lt;/span&gt;&lt;div class="HOEnZb"&gt; &lt;div class="h5"&gt;&lt;br&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com" target="_blank"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com" target="_blank"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;  For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;   &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-132073728724965086?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/132073728724965086/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-devise-sign-up-and-sign-in-at_3488.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/132073728724965086'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/132073728724965086'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-devise-sign-up-and-sign-in-at_3488.html' title='Re: [Rails] Devise - Sign up and sign in at same view'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-4128487411805025403</id><published>2012-01-27T08:13:00.001-08:00</published><updated>2012-01-27T08:13:34.122-08:00</updated><title type='text'>[Rails] Re: How to test the model dependence ?</title><content type='html'>I was using &amp;quot;has&amp;quot; and de corretly is &amp;quot;have&amp;quot; . Tks everbody.&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-4128487411805025403?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/4128487411805025403/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-how-to-test-model-dependence_27.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/4128487411805025403'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/4128487411805025403'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-how-to-test-model-dependence_27.html' title='[Rails] Re: How to test the model dependence ?'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-4118025896330156191</id><published>2012-01-27T07:54:00.001-08:00</published><updated>2012-01-27T07:54:55.399-08:00</updated><title type='text'>Re: [Rails] Devise - Sign up and sign in at same view</title><content type='html'>Hello Rodrigo, &lt;br&gt;&lt;br&gt;if you need to redirect the user after login, there is a method in devise that make it. You should take a look in the documentation first, but the method is &lt;span class="st"&gt;after_sign_in_path_for() &lt;br&gt; &lt;br&gt;&lt;br&gt;cheers&lt;br&gt;&lt;/span&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;2012/1/27 Walter Lee Davis &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:waltd@wdstudio.com"&gt;waltd@wdstudio.com&lt;/a&gt;&amp;gt;&lt;/span&gt;&lt;br&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt; &lt;div class="im"&gt;&lt;br&gt; On Jan 27, 2012, at 9:45 AM, Rodrigo Ruiz wrote:&lt;br&gt; &lt;br&gt; &amp;gt; It didn&amp;#39;t work, when I do&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; devise_for :users do&lt;br&gt; &amp;gt;     root :to =&amp;gt; &amp;quot;devise/sessions#new&amp;quot;&lt;br&gt; &amp;gt; end&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; because I want to log in in the root url and then remain there, but with a different rendering (logic is inside the new view of users/sessions)&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; It keeps trying to redirect to the root url again and again, giving a message &amp;quot;Too many redirects occur...&amp;quot;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; What should I do?&lt;br&gt; &lt;br&gt; &lt;/div&gt;I think you need to re-think how this login will work. If you&amp;#39;re trying to log in on a page, and then show that same page again after the user has logged in, what will trigger to the authentication system that the login is necessary?&lt;br&gt;  &lt;br&gt; Devise is abstracted around solving this particular problem: User arrives at a page that she needs to be authenticated in order to see. She is redirected to a login page, authenticates, and then is redirected back to the originally requested page. If you&amp;#39;re not trying to do that, then you have to add on to that behavior, not replace it, or you won&amp;#39;t have much benefit to using this framework.&lt;br&gt;  &lt;br&gt; Try this. Follow the examples (RailsCast has a very nice treatment of Devise, goes into all the nooks and crannies in two parts) and build the normal authentication system. Be sure to set a root page that is not the login path. Then add a *login form* to your root page (and optionally hide it if the user is logged in) using render partial in your view. This will be used to authenticate people who *want to* sign in before they are *required to* sign in.&lt;br&gt;  &lt;span class="HOEnZb"&gt;&lt;font color="#888888"&gt;&lt;br&gt; Walter&lt;br&gt; &lt;/font&gt;&lt;/span&gt;&lt;div class="HOEnZb"&gt;&lt;div class="h5"&gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; Thanks in advance&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; On Thu, Jan 26, 2012 at 1:09 PM, Walter Lee Davis &amp;lt;&lt;a href="mailto:waltd@wdstudio.com"&gt;waltd@wdstudio.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt; &amp;gt; I just did this. I let Devise generate the views (rake task, check the wiki) and then I modified the devise/sessions/new layout to combine sign in and sign up.&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; &amp;lt;%- title &amp;quot;Sign in or sign up&amp;quot; %&amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; &amp;lt;div class=&amp;quot;left half&amp;quot;&amp;gt;&lt;br&gt; &amp;gt;        &amp;lt;h3&amp;gt;Already registered?&amp;lt;/h3&amp;gt;&lt;br&gt; &amp;gt; &amp;lt;%= form_for(resource, :as =&amp;gt; resource_name, :url =&amp;gt; session_path(resource_name)) do |f| %&amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;p&amp;gt;&amp;lt;%= f.label :email %&amp;gt;&amp;lt;br /&amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;%= f.email_field :email %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;p&amp;gt;&amp;lt;%= f.label :password %&amp;gt;&amp;lt;br /&amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;%= f.password_field :password %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;% if devise_mapping.rememberable? -%&amp;gt;&lt;br&gt; &amp;gt;    &amp;lt;p&amp;gt;&amp;lt;%= f.check_box :remember_me %&amp;gt; &amp;lt;%= f.label :remember_me %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;% end -%&amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;p&amp;gt;&amp;lt;%= f.submit &amp;quot;Sign in&amp;quot; %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt; &amp;gt; &amp;lt;% end %&amp;gt;&lt;br&gt; &amp;gt; &amp;lt;/div&amp;gt;&lt;br&gt; &amp;gt; &amp;lt;div class=&amp;quot;half left&amp;quot;&amp;gt;&lt;br&gt; &amp;gt;        &amp;lt;h3&amp;gt;Create an account&amp;lt;/h3&amp;gt;&lt;br&gt; &amp;gt;        &amp;lt;%= render :partial =&amp;gt; &amp;#39;devise/registrations/form&amp;#39; %&amp;gt;&lt;br&gt; &amp;gt; &amp;lt;/div&amp;gt;&lt;br&gt; &amp;gt; &amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;lt;%= render :partial =&amp;gt; &amp;quot;devise/shared/links&amp;quot; %&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; Walter&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; On Jan 26, 2012, at 9:58 AM, Rodrigo Ruiz wrote:&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; &amp;gt; Hi, I&amp;#39;d like to know what is the best way to do this. Right now I can see two options:&lt;br&gt; &amp;gt; &amp;gt; 1) create a new views at make a custom controller for registration controller to redirect to the right path&lt;br&gt; &amp;gt; &amp;gt; 2) change the registration views that devise generates for you (so, for example, the new view will have the session view inside it for the sign in too)&lt;br&gt; &amp;gt; &amp;gt;&lt;br&gt; &amp;gt; &amp;gt; Thanks in advance.&lt;br&gt; &amp;gt; &amp;gt;&lt;br&gt; &amp;gt; &amp;gt; --&lt;br&gt; &amp;gt; &amp;gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; &amp;gt; &amp;gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; &amp;gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; &amp;gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; --&lt;br&gt; &amp;gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; &amp;gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; --&lt;br&gt; &amp;gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; &amp;gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &lt;br&gt; --&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &lt;br&gt; &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;br clear="all"&gt;&lt;br&gt;-- &lt;br&gt;thiagocifani&lt;div&gt;&lt;a href="http://thiagocifani.wordpress.com/" target="_blank"&gt;http://thiagocifani.wordpress.com/&lt;/a&gt;&lt;br&gt;&lt;a href="http://twitter.com/thiagocifani" target="_blank"&gt;twitter.com/thiagocifani&lt;/a&gt;&lt;br&gt; &lt;span&gt;&lt;cite&gt;&lt;/cite&gt;&lt;/span&gt;&lt;a href="http://del.icio.us/thiagocifani" target="_blank"&gt;del.icio.us/thiagocifani&lt;/a&gt;&lt;div&gt;&lt;a href="http://del.icio.us/thiagocifani" target="_blank"&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;br&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-4118025896330156191?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/4118025896330156191/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-devise-sign-up-and-sign-in-at_498.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/4118025896330156191'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/4118025896330156191'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-devise-sign-up-and-sign-in-at_498.html' title='Re: [Rails] Devise - Sign up and sign in at same view'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-8024653694384129268</id><published>2012-01-27T07:37:00.000-08:00</published><updated>2012-01-27T07:38:15.854-08:00</updated><title type='text'>Re: [Rails] Devise - Sign up and sign in at same view</title><content type='html'>On Jan 27, 2012, at 9:45 AM, Rodrigo Ruiz wrote:&lt;p&gt;&amp;gt; It didn&amp;#39;t work, when I do&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; devise_for :users do&lt;br&gt;&amp;gt;     root :to =&amp;gt; &amp;quot;devise/sessions#new&amp;quot;&lt;br&gt;&amp;gt; end&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; because I want to log in in the root url and then remain there, but with a different rendering (logic is inside the new view of users/sessions)&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; It keeps trying to redirect to the root url again and again, giving a message &amp;quot;Too many redirects occur...&amp;quot;&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; What should I do?&lt;p&gt;I think you need to re-think how this login will work. If you&amp;#39;re trying to log in on a page, and then show that same page again after the user has logged in, what will trigger to the authentication system that the login is necessary? &lt;p&gt;Devise is abstracted around solving this particular problem: User arrives at a page that she needs to be authenticated in order to see. She is redirected to a login page, authenticates, and then is redirected back to the originally requested page. If you&amp;#39;re not trying to do that, then you have to add on to that behavior, not replace it, or you won&amp;#39;t have much benefit to using this framework.&lt;p&gt;Try this. Follow the examples (RailsCast has a very nice treatment of Devise, goes into all the nooks and crannies in two parts) and build the normal authentication system. Be sure to set a root page that is not the login path. Then add a *login form* to your root page (and optionally hide it if the user is logged in) using render partial in your view. This will be used to authenticate people who *want to* sign in before they are *required to* sign in.&lt;p&gt;Walter&lt;p&gt;&amp;gt; &lt;br&gt;&amp;gt; Thanks in advance&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; On Thu, Jan 26, 2012 at 1:09 PM, Walter Lee Davis &amp;lt;&lt;a href="mailto:waltd@wdstudio.com"&gt;waltd@wdstudio.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; I just did this. I let Devise generate the views (rake task, check the wiki) and then I modified the devise/sessions/new layout to combine sign in and sign up.&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; &amp;lt;%- title &amp;quot;Sign in or sign up&amp;quot; %&amp;gt;&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; &amp;lt;div class=&amp;quot;left half&amp;quot;&amp;gt;&lt;br&gt;&amp;gt;        &amp;lt;h3&amp;gt;Already registered?&amp;lt;/h3&amp;gt;&lt;br&gt;&amp;gt; &amp;lt;%= form_for(resource, :as =&amp;gt; resource_name, :url =&amp;gt; session_path(resource_name)) do |f| %&amp;gt;&lt;br&gt;&amp;gt;  &amp;lt;p&amp;gt;&amp;lt;%= f.label :email %&amp;gt;&amp;lt;br /&amp;gt;&lt;br&gt;&amp;gt;  &amp;lt;%= f.email_field :email %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt;  &amp;lt;p&amp;gt;&amp;lt;%= f.label :password %&amp;gt;&amp;lt;br /&amp;gt;&lt;br&gt;&amp;gt;  &amp;lt;%= f.password_field :password %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt;  &amp;lt;% if devise_mapping.rememberable? -%&amp;gt;&lt;br&gt;&amp;gt;    &amp;lt;p&amp;gt;&amp;lt;%= f.check_box :remember_me %&amp;gt; &amp;lt;%= f.label :remember_me %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt;&amp;gt;  &amp;lt;% end -%&amp;gt;&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt;  &amp;lt;p&amp;gt;&amp;lt;%= f.submit &amp;quot;Sign in&amp;quot; %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt;&amp;gt; &amp;lt;% end %&amp;gt;&lt;br&gt;&amp;gt; &amp;lt;/div&amp;gt;&lt;br&gt;&amp;gt; &amp;lt;div class=&amp;quot;half left&amp;quot;&amp;gt;&lt;br&gt;&amp;gt;        &amp;lt;h3&amp;gt;Create an account&amp;lt;/h3&amp;gt;&lt;br&gt;&amp;gt;        &amp;lt;%= render :partial =&amp;gt; &amp;#39;devise/registrations/form&amp;#39; %&amp;gt;&lt;br&gt;&amp;gt; &amp;lt;/div&amp;gt;&lt;br&gt;&amp;gt; &amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;lt;%= render :partial =&amp;gt; &amp;quot;devise/shared/links&amp;quot; %&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; Walter&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; On Jan 26, 2012, at 9:58 AM, Rodrigo Ruiz wrote:&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; &amp;gt; Hi, I&amp;#39;d like to know what is the best way to do this. Right now I can see two options:&lt;br&gt;&amp;gt; &amp;gt; 1) create a new views at make a custom controller for registration controller to redirect to the right path&lt;br&gt;&amp;gt; &amp;gt; 2) change the registration views that devise generates for you (so, for example, the new view will have the session view inside it for the sign in too)&lt;br&gt;&amp;gt; &amp;gt;&lt;br&gt;&amp;gt; &amp;gt; Thanks in advance.&lt;br&gt;&amp;gt; &amp;gt;&lt;br&gt;&amp;gt; &amp;gt; --&lt;br&gt;&amp;gt; &amp;gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;&amp;gt; &amp;gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;&amp;gt; &amp;gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;&amp;gt; &amp;gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;&amp;gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;&amp;gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;&amp;gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; -- &lt;br&gt;&amp;gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;&amp;gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;&amp;gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;&amp;gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-8024653694384129268?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/8024653694384129268/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-devise-sign-up-and-sign-in-at_7088.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8024653694384129268'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8024653694384129268'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-devise-sign-up-and-sign-in-at_7088.html' title='Re: [Rails] Devise - Sign up and sign in at same view'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-300032569053495245</id><published>2012-01-27T06:45:00.000-08:00</published><updated>2012-01-27T06:46:14.864-08:00</updated><title type='text'>Re: [Rails] Devise - Sign up and sign in at same view</title><content type='html'>It didn&amp;#39;t work, when I do&lt;div&gt;&lt;br&gt;&lt;div&gt;&lt;div&gt;devise_for :users do&lt;/div&gt;&lt;div&gt;    root :to =&amp;gt; &amp;quot;devise/sessions#new&amp;quot;&lt;/div&gt;&lt;div&gt;end&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;because I want to log in in the root url and then remain there, but with a different rendering (logic is inside the new view of users/sessions)&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;It keeps trying to redirect to the root url again and again, giving a message &amp;quot;Too many redirects occur...&amp;quot;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;What should I do?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks in advance&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Thu, Jan 26, 2012 at 1:09 PM, Walter Lee Davis &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:waltd@wdstudio.com"&gt;waltd@wdstudio.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt; I just did this. I let Devise generate the views (rake task, check the wiki) and then I modified the devise/sessions/new layout to combine sign in and sign up.&lt;br&gt; &lt;br&gt; &amp;lt;%- title &amp;quot;Sign in or sign up&amp;quot; %&amp;gt;&lt;br&gt; &lt;br&gt; &amp;lt;div class=&amp;quot;left half&amp;quot;&amp;gt;&lt;br&gt;         &amp;lt;h3&amp;gt;Already registered?&amp;lt;/h3&amp;gt;&lt;br&gt; &amp;lt;%= form_for(resource, :as =&amp;gt; resource_name, :url =&amp;gt; session_path(resource_name)) do |f| %&amp;gt;&lt;br&gt;   &amp;lt;p&amp;gt;&amp;lt;%= f.label :email %&amp;gt;&amp;lt;br /&amp;gt;&lt;br&gt;   &amp;lt;%= f.email_field :email %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt; &lt;br&gt;   &amp;lt;p&amp;gt;&amp;lt;%= f.label :password %&amp;gt;&amp;lt;br /&amp;gt;&lt;br&gt;   &amp;lt;%= f.password_field :password %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt; &lt;br&gt;   &amp;lt;% if devise_mapping.rememberable? -%&amp;gt;&lt;br&gt;     &amp;lt;p&amp;gt;&amp;lt;%= f.check_box :remember_me %&amp;gt; &amp;lt;%= f.label :remember_me %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt;   &amp;lt;% end -%&amp;gt;&lt;br&gt; &lt;br&gt;   &amp;lt;p&amp;gt;&amp;lt;%= f.submit &amp;quot;Sign in&amp;quot; %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt; &amp;lt;% end %&amp;gt;&lt;br&gt; &amp;lt;/div&amp;gt;&lt;br&gt; &amp;lt;div class=&amp;quot;half left&amp;quot;&amp;gt;&lt;br&gt;         &amp;lt;h3&amp;gt;Create an account&amp;lt;/h3&amp;gt;&lt;br&gt;         &amp;lt;%= render :partial =&amp;gt; &amp;#39;devise/registrations/form&amp;#39; %&amp;gt;&lt;br&gt; &amp;lt;/div&amp;gt;&lt;br&gt; &amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;lt;%= render :partial =&amp;gt; &amp;quot;devise/shared/links&amp;quot; %&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt; &lt;br&gt; Walter&lt;br&gt; &lt;div class="HOEnZb"&gt;&lt;div class="h5"&gt;&lt;br&gt; On Jan 26, 2012, at 9:58 AM, Rodrigo Ruiz wrote:&lt;br&gt; &lt;br&gt; &amp;gt; Hi, I&amp;#39;d like to know what is the best way to do this. Right now I can see two options:&lt;br&gt; &amp;gt; 1) create a new views at make a custom controller for registration controller to redirect to the right path&lt;br&gt; &amp;gt; 2) change the registration views that devise generates for you (so, for example, the new view will have the session view inside it for the sign in too)&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; Thanks in advance.&lt;br&gt; &amp;gt;&lt;br&gt; &lt;/div&gt;&lt;/div&gt;&lt;span class="HOEnZb"&gt;&lt;font color="#888888"&gt;&amp;gt; --&lt;br&gt; &amp;gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; &amp;gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &lt;br&gt; --&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &lt;br&gt; &lt;/font&gt;&lt;/span&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-300032569053495245?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/300032569053495245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-devise-sign-up-and-sign-in-at_27.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/300032569053495245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/300032569053495245'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-devise-sign-up-and-sign-in-at_27.html' title='Re: [Rails] Devise - Sign up and sign in at same view'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-8661044850323651013</id><published>2012-01-27T06:09:00.000-08:00</published><updated>2012-01-27T06:10:22.211-08:00</updated><title type='text'>Re: [Rails] Re: error display at the field is not working</title><content type='html'>On Fri, Jan 27, 2012 at 03:10, naga surya &amp;lt;&lt;a href="mailto:surya.naga123@gmail.com"&gt;surya.naga123@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;p&gt;&amp;gt; Thanks for your reply, I dont want the error to dispaly at outline, i&lt;br&gt;&amp;gt; want the error to display at near the date field i.e., inlne error&lt;br&gt;&amp;gt; display is required for me. please help me how to get it.&lt;p&gt;Oh!  Okay.  That&amp;#39;s a bit more tedious code.  What you can do then is&lt;br&gt;have the errors attach to the specific fields, and check for them when&lt;br&gt;displaying each field.  I think there are some standard ways to do&lt;br&gt;this, but I don&amp;#39;t recall offhand where to find examples and&lt;br&gt;instructions.  Google is your friend.  IIRC, the default stuff will at&lt;br&gt;least put a red box around the specific fields, using CSS....&lt;p&gt;-Dave&lt;p&gt;-- &lt;br&gt;Dave Aronson: &amp;#160;Available Cleared Ruby on Rails Freelancer&lt;br&gt;(NoVa/DC/Remote) -- see &lt;a href="http://www.DaveAronson.com"&gt;www.DaveAronson.com&lt;/a&gt;, and blogs at&lt;br&gt;&lt;a href="http://www.Codosaur.us"&gt;www.Codosaur.us&lt;/a&gt;, &lt;a href="http://www.Dare2XL.com"&gt;www.Dare2XL.com&lt;/a&gt;, &lt;a href="http://www.RecruitingRants.com"&gt;www.RecruitingRants.com&lt;/a&gt;&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-8661044850323651013?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/8661044850323651013/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-error-display-at-field-is.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8661044850323651013'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8661044850323651013'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-error-display-at-field-is.html' title='Re: [Rails] Re: error display at the field is not working'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-6887314352466339906</id><published>2012-01-27T06:05:00.000-08:00</published><updated>2012-01-27T06:06:41.274-08:00</updated><title type='text'>Re: [Rails] Redirecting to create new page with input</title><content type='html'>On Fri, Jan 27, 2012 at 00:54, Soichi Ishida &amp;lt;&lt;a href="mailto:lists@ruby-forum.com"&gt;lists@ruby-forum.com&lt;/a&gt;&amp;gt; wrote:&lt;p&gt;&amp;gt; when clicking the button, how can I automatically send the URL of the&lt;br&gt;&amp;gt; corresponding video and simultaneously redirect to NEW page where users&lt;br&gt;&amp;gt; can create a new video entry??? &amp;#160;In other words, in the creating new&lt;br&gt;&amp;gt; page, the URL (and hopefully the video_title) is to be already filled&lt;br&gt;&amp;gt; out.&lt;p&gt;Let me see if I understand correctly what you want.  When you say&lt;br&gt;&amp;quot;send the URL&amp;quot; you don&amp;#39;t mean that the user should be sent to that&lt;br&gt;page (whether in the same tab or window, or a new one), but simply&lt;br&gt;that that should be the pre-filled value on the &amp;quot;New Video&amp;quot; page.&lt;br&gt;Right?&lt;p&gt;There may be a more &amp;quot;Railsy&amp;quot; way to do this, but what comes to my mind is:&lt;p&gt;Have the links link to #new, but add a parameter called something like&lt;br&gt;video_url.  You could make it a URL parameter, so that rather than&lt;br&gt;going to &lt;a href="http://myvideostore.com/videos/new"&gt;myvideostore.com/videos/new&lt;/a&gt;, you&amp;#39;d go to&lt;br&gt;&lt;a href="http://myvideostore.com/videos/new?video_url=http://youtube.com?watch=abc123"&gt;myvideostore.com/videos/new?video_url=http://youtube.com?watch=abc123&lt;/a&gt;&lt;br&gt;or whatever.  (Actually the video_url should be url-encoded, but I&lt;br&gt;think Rails will handle that for you.)  To do that, I think you can&lt;br&gt;pass a hash of params to link_to, or IWCTW you can tack it on&lt;br&gt;manually.&lt;p&gt;Or you can make them form params, so they don&amp;#39;t show up and look ugly&lt;br&gt;on the URL after the user clicks.  Make a tiny form for each one.&lt;br&gt;Have the URL as a hidden field.  Have the link submit the form, to the&lt;br&gt;videos_controller#new.&lt;p&gt;Either way, in the controller, after you call Video.new, set the&lt;br&gt;object&amp;#39;s url to params[:video_url].  Then when you display it, the&lt;br&gt;value should show up just fine.&lt;p&gt;Let us know how that works for you.&lt;p&gt;-Dave&lt;p&gt;-- &lt;br&gt;Dave Aronson: &amp;#160;Available Cleared Ruby on Rails Freelancer&lt;br&gt;(NoVa/DC/Remote) -- see &lt;a href="http://www.DaveAronson.com"&gt;www.DaveAronson.com&lt;/a&gt;, and blogs at&lt;br&gt;&lt;a href="http://www.Codosaur.us"&gt;www.Codosaur.us&lt;/a&gt;, &lt;a href="http://www.Dare2XL.com"&gt;www.Dare2XL.com&lt;/a&gt;, &lt;a href="http://www.RecruitingRants.com"&gt;www.RecruitingRants.com&lt;/a&gt;&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-6887314352466339906?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/6887314352466339906/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-redirecting-to-create-new-page.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/6887314352466339906'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/6887314352466339906'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-redirecting-to-create-new-page.html' title='Re: [Rails] Redirecting to create new page with input'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-621576542933084008</id><published>2012-01-27T05:50:00.000-08:00</published><updated>2012-01-27T05:51:40.526-08:00</updated><title type='text'>Re: [Rails] How to add multiple user create on single form using ActiveAdmin</title><content type='html'>On Thu, Jan 26, 2012 at 14:00, Loganathan Sellapa&lt;br&gt;&amp;lt;&lt;a href="mailto:loganathan.ms@gmail.com"&gt;loganathan.ms@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;p&gt;&amp;gt; I need to include a form to submit two users(same model) on same form,&lt;p&gt;Disclaimer: I haven&amp;#39;t tried ActiveAdmin, so this is just about Rails in general.&lt;p&gt;I did something sorta like this in The Decider.  The Edit Decision&lt;br&gt;view includes editable display of each Decision&amp;#39;s Factors,&lt;br&gt;Alternatives, and Rankings.   (Which should have been called Ratings&lt;br&gt;but that&amp;#39;s another story.)  These are each separate models.  You can&lt;br&gt;use the app yourself at &lt;a href="http://thedecider.herokuapp.com"&gt;http://thedecider.herokuapp.com&lt;/a&gt; and see the&lt;br&gt;code at &lt;a href="https://github.com/davearonson/thedecider/"&gt;https://github.com/davearonson/thedecider/&lt;/a&gt;.&lt;p&gt;To do like I did, just have your Customer model say it accepts nested&lt;br&gt;attributes for users, and in your order view, use fields_for when&lt;br&gt;displaying the Users.  IIRC, that was all I had to do!  (Nitpick: I&lt;br&gt;don&amp;#39;t understand why a Customer would be/have two Users.  Are you sure&lt;br&gt;your model shouldn&amp;#39;t be Shipment or Order or ServiceCall or something&lt;br&gt;like that?)&lt;p&gt;I couldn&amp;#39;t find any good clear online documentation of how this works&lt;br&gt;and what you need to do.  By experimenting, I found that Rails will&lt;br&gt;take care of the rest with its wonderful behind-the-scenes magic of&lt;br&gt;tagging things with appropriate name and id attributes in the HTML,&lt;br&gt;and interpreting those when returned, so you pretty much don&amp;#39;t need to&lt;br&gt;do *anything*!  You *can* define an attributes= method if you want,&lt;br&gt;but chances are very good that what Rails will do by default is&lt;br&gt;exactly what you want, and any attempt to provide that yourself will&lt;br&gt;just mean having write a lot of tedious code.&lt;p&gt;-Dave&lt;p&gt;-- &lt;br&gt;Dave Aronson: &amp;#160;Available Cleared Ruby on Rails Freelancer&lt;br&gt;(NoVa/DC/Remote) -- see &lt;a href="http://www.DaveAronson.com"&gt;www.DaveAronson.com&lt;/a&gt;, and blogs at&lt;br&gt;&lt;a href="http://www.Codosaur.us"&gt;www.Codosaur.us&lt;/a&gt;, &lt;a href="http://www.Dare2XL.com"&gt;www.Dare2XL.com&lt;/a&gt;, &lt;a href="http://www.RecruitingRants.com"&gt;www.RecruitingRants.com&lt;/a&gt;&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-621576542933084008?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/621576542933084008/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-how-to-add-multiple-user.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/621576542933084008'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/621576542933084008'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-how-to-add-multiple-user.html' title='Re: [Rails] How to add multiple user create on single form using ActiveAdmin'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-8068591628100584025</id><published>2012-01-27T04:08:00.000-08:00</published><updated>2012-01-27T04:09:22.645-08:00</updated><title type='text'>Re: [Rails] How to test the model dependence ?</title><content type='html'>On 27 January 2012 11:21, Guilherme R. &amp;lt;&lt;a href="mailto:lists@ruby-forum.com"&gt;lists@ruby-forum.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; Good morning,&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I&amp;#39;m new to rails and am having some basic questions in development. See&lt;br&gt;&amp;gt; if anyone can help me with a test problem. I need to test if my model&lt;br&gt;&amp;gt; &amp;quot;Procedure&amp;quot; is linked to the workflow. If not, the system must&lt;br&gt;&amp;gt; acknowledge an error. Below is the code that is in the file test \ unit&lt;br&gt;&amp;gt; \ procedure_test.rb.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; require &amp;#39;test_helper&amp;#39;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; class ProcedureTest &amp;lt; ActiveSupport::TestCase&lt;br&gt;&amp;gt; &amp;#160;should belong_to :workflow&lt;br&gt;&amp;gt; &amp;#160;should has_many :tasks, :through =&amp;gt; :workflow&lt;p&gt;Try have_many rather than has_many&lt;p&gt;Colin&lt;p&gt;&amp;gt; &amp;#160;#should has_one :timeline&lt;br&gt;&amp;gt; &amp;#160;#should has_many :timeline_items, :through =&amp;gt; :timeline&lt;br&gt;&amp;gt; end&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; The shoul &amp;quot;belong_to&amp;quot; is working normally but when running &amp;quot;rake test&amp;quot;&lt;br&gt;&amp;gt; appears the following error:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; $ Rake test&lt;br&gt;&amp;gt; / home / guilhermec / iba_jornais / test / unit / procedure_test.rb: 5:&lt;br&gt;&amp;gt; in `&amp;#39;: undefined method `has_many&amp;#39; for ProcedureTest:Class&lt;br&gt;&amp;gt; (NoMethodError)&lt;br&gt;&amp;gt; from /home/guilhermec/iba_jornais/test/unit/procedure_test.rb:3:in `&amp;lt;top&lt;br&gt;&amp;gt; (required)&amp;gt;&amp;#39;&lt;br&gt;&amp;gt; from&lt;br&gt;&amp;gt; /home/guilhermec/.rvm/gems/ruby-1.9.2-p180@iba-jornais/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in&lt;br&gt;&amp;gt; `require&amp;#39;&lt;br&gt;&amp;gt; from&lt;br&gt;&amp;gt; /home/guilhermec/.rvm/gems/ruby-1.9.2-p180@iba-jornais/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in&lt;br&gt;&amp;gt; `block in require&amp;#39;&lt;br&gt;&amp;gt; from&lt;br&gt;&amp;gt; /home/guilhermec/.rvm/gems/ruby-1.9.2-p180@iba-jornais/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:225:in&lt;br&gt;&amp;gt; `load_dependency&amp;#39;&lt;br&gt;&amp;gt; from&lt;br&gt;&amp;gt; /home/guilhermec/.rvm/gems/ruby-1.9.2-p180@iba-jornais/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in&lt;br&gt;&amp;gt; `require&amp;#39;&lt;br&gt;&amp;gt; from&lt;br&gt;&amp;gt; /home/guilhermec/.rvm/gems/ruby-1.9.2-p180@iba-jornais/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:10:in&lt;br&gt;&amp;gt; `block (2 levels) in &amp;#39;&lt;br&gt;&amp;gt; from `Each &amp;#39;&lt;br&gt;&amp;gt; from `Block in&amp;#39;&lt;br&gt;&amp;gt; from `Select &amp;#39;&lt;br&gt;&amp;gt; from `&amp;#39;&lt;br&gt;&amp;gt; Loaded suite&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Does anyone know what I should do to fix this?&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;&amp;gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;&amp;gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;&amp;gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;&amp;gt;&lt;p&gt;&lt;p&gt;-- &lt;br&gt;&lt;a href="http://gplus.to/clanlaw"&gt;gplus.to/clanlaw&lt;/a&gt;&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-8068591628100584025?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/8068591628100584025/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-how-to-test-model-dependence.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8068591628100584025'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8068591628100584025'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-how-to-test-model-dependence.html' title='Re: [Rails] How to test the model dependence ?'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-1121036922451797550</id><published>2012-01-27T03:43:00.000-08:00</published><updated>2012-01-27T03:44:14.569-08:00</updated><title type='text'>[Rails] Re: How to test the model dependence ?</title><content type='html'>                 &lt;div&gt;I usually use Shoulda for this:&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;a href="http://rubydoc.info/gems/shoulda/frames"&gt;http://rubydoc.info/gems/shoulda/frames&lt;/a&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;pre class="code" style="color: rgb(0, 0, 0); font-family: monospace; display: block; padding-top: 5px; padding-right: 12px; padding-bottom: 5px; padding-left: 12px; margin-top: 4px; border-top-width: 1px; border-right-width: 1px; border-bottom-width: 1px; border-left-width: 1px; border-top-style: solid; border-right-style: solid; border-bottom-style: solid; border-left-style: solid; border-top-color: rgb(238, 238, 255); border-right-color: rgb(238, 238, 255); border-bottom-color: rgb(238, 238, 255); border-left-color: rgb(238, 238, 255); border-image: initial; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: rgb(245, 245, 255); font-size: 13px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: 2; text-align: -webkit-auto; text-indent: 0px; text-transform: none; widows: 2; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; background-position: initial initial; background-repeat: initial initial; "&gt;&lt;span class="id should"&gt;should&lt;/span&gt; &lt;span class="id belong_to"&gt;belong_to&lt;/span&gt;&lt;span class="lparen"&gt;(&lt;/span&gt;&lt;span class="symbol" style="color: rgb(197, 6, 11); "&gt;:user&lt;/span&gt;&lt;span class="rparen"&gt;)&lt;/span&gt;     &lt;span class="id should"&gt;should&lt;/span&gt; &lt;span class="id have_many"&gt;have_many&lt;/span&gt;&lt;span class="lparen"&gt;(&lt;/span&gt;&lt;span class="symbol" style="color: rgb(197, 6, 11); "&gt;:tags&lt;/span&gt;&lt;span class="rparen"&gt;)&lt;/span&gt;&lt;span class="period"&gt;.&lt;/span&gt;&lt;span class="id through"&gt;through&lt;/span&gt;&lt;span class="lparen"&gt;(&lt;/span&gt;&lt;span class="symbol" style="color: rgb(197, 6, 11); "&gt;:taggings&lt;/span&gt;&lt;span class="rparen"&gt;)&lt;/span&gt;&lt;/pre&gt;&lt;/div&gt;&lt;/div&gt;                 &lt;div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Dheeraj Kumar&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;/div&gt;                                   &lt;p style="color: #A0A0A8;"&gt;On Friday 27 January 2012 at 4:51 PM, Guilherme R. wrote:&lt;/p&gt;                 &lt;blockquote type="cite" style="border-left-style:solid;border-width:1px;margin-left:0px;padding-left:10px;"&gt;                     &lt;span&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;Good morning,&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I'm new to rails and am having some basic questions in development. See&lt;/div&gt;&lt;div&gt;if anyone can help me with a test problem. I need to test if my model&lt;/div&gt;&lt;div&gt;"Procedure" is linked to the workflow. If not, the system must&lt;/div&gt;&lt;div&gt;acknowledge an error. Below is the code that is in the file test \ unit&lt;/div&gt;&lt;div&gt;\ procedure_test.rb.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;require 'test_helper'&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;class ProcedureTest &amp;lt; ActiveSupport::TestCase&lt;/div&gt;&lt;div&gt;  should belong_to :workflow&lt;/div&gt;&lt;div&gt;  should has_many :tasks, :through =&amp;gt; :workflow&lt;/div&gt;&lt;div&gt;  #should has_one :timeline&lt;/div&gt;&lt;div&gt;  #should has_many :timeline_items, :through =&amp;gt; :timeline&lt;/div&gt;&lt;div&gt;end&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;The shoul "belong_to" is working normally but when running "rake test"&lt;/div&gt;&lt;div&gt;appears the following error:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;$ Rake test&lt;/div&gt;&lt;div&gt;/ home / guilhermec / iba_jornais / test / unit / procedure_test.rb: 5:&lt;/div&gt;&lt;div&gt;in `': undefined method `has_many' for ProcedureTest:Class&lt;/div&gt;&lt;div&gt;(NoMethodError)&lt;/div&gt;&lt;div&gt;from /home/guilhermec/iba_jornais/test/unit/procedure_test.rb:3:in `&amp;lt;top&lt;/div&gt;&lt;div&gt;(required)&amp;gt;'&lt;/div&gt;&lt;div&gt;from&lt;/div&gt;&lt;div&gt;/home/guilhermec/.rvm/gems/ruby-1.9.2-p180@iba-jornais/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in&lt;/div&gt;&lt;div&gt;`require'&lt;/div&gt;&lt;div&gt;from&lt;/div&gt;&lt;div&gt;/home/guilhermec/.rvm/gems/ruby-1.9.2-p180@iba-jornais/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in&lt;/div&gt;&lt;div&gt;`block in require'&lt;/div&gt;&lt;div&gt;from&lt;/div&gt;&lt;div&gt;/home/guilhermec/.rvm/gems/ruby-1.9.2-p180@iba-jornais/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:225:in&lt;/div&gt;&lt;div&gt;`load_dependency'&lt;/div&gt;&lt;div&gt;from&lt;/div&gt;&lt;div&gt;/home/guilhermec/.rvm/gems/ruby-1.9.2-p180@iba-jornais/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in&lt;/div&gt;&lt;div&gt;`require'&lt;/div&gt;&lt;div&gt;from&lt;/div&gt;&lt;div&gt;/home/guilhermec/.rvm/gems/ruby-1.9.2-p180@iba-jornais/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:10:in&lt;/div&gt;&lt;div&gt;`block (2 levels) in '&lt;/div&gt;&lt;div&gt;from `Each '&lt;/div&gt;&lt;div&gt;from `Block in'&lt;/div&gt;&lt;div&gt;from `Select '&lt;/div&gt;&lt;div&gt;from `'&lt;/div&gt;&lt;div&gt;Loaded suite&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Does anyone know what I should do to fix this?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;-- &lt;/div&gt;&lt;div&gt;Posted via &lt;a href="http://www.ruby-forum.com"&gt;http://www.ruby-forum.com&lt;/a&gt;/.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;-- &lt;/div&gt;&lt;div&gt;You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;/div&gt;&lt;div&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk+unsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;/div&gt;&lt;div&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;/div&gt;&lt;/div&gt;&lt;/div&gt;&lt;/span&gt;                                                                                         &lt;/blockquote&gt;                                   &lt;div&gt;                     &lt;br&gt;                 &lt;/div&gt;               &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-1121036922451797550?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/1121036922451797550/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-how-to-test-model-dependence.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/1121036922451797550'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/1121036922451797550'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-how-to-test-model-dependence.html' title='[Rails] Re: How to test the model dependence ?'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-8170546395023165804</id><published>2012-01-27T03:21:00.001-08:00</published><updated>2012-01-27T03:21:46.679-08:00</updated><title type='text'>[Rails] How to test the model dependence ?</title><content type='html'>Good morning,&lt;p&gt;I&amp;#39;m new to rails and am having some basic questions in development. See&lt;br&gt;if anyone can help me with a test problem. I need to test if my model&lt;br&gt;&amp;quot;Procedure&amp;quot; is linked to the workflow. If not, the system must&lt;br&gt;acknowledge an error. Below is the code that is in the file test \ unit&lt;br&gt;\ procedure_test.rb.&lt;p&gt;require &amp;#39;test_helper&amp;#39;&lt;p&gt;class ProcedureTest &amp;lt; ActiveSupport::TestCase&lt;br&gt;  should belong_to :workflow&lt;br&gt;  should has_many :tasks, :through =&amp;gt; :workflow&lt;br&gt;  #should has_one :timeline&lt;br&gt;  #should has_many :timeline_items, :through =&amp;gt; :timeline&lt;br&gt;end&lt;p&gt;The shoul &amp;quot;belong_to&amp;quot; is working normally but when running &amp;quot;rake test&amp;quot;&lt;br&gt;appears the following error:&lt;p&gt;$ Rake test&lt;br&gt;/ home / guilhermec / iba_jornais / test / unit / procedure_test.rb: 5:&lt;br&gt;in `&amp;#39;: undefined method `has_many&amp;#39; for ProcedureTest:Class&lt;br&gt;(NoMethodError)&lt;br&gt;from /home/guilhermec/iba_jornais/test/unit/procedure_test.rb:3:in `&amp;lt;top&lt;br&gt;(required)&amp;gt;&amp;#39;&lt;br&gt;from&lt;br&gt;/home/guilhermec/.rvm/gems/ruby-1.9.2-p180@iba-jornais/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in&lt;br&gt;`require&amp;#39;&lt;br&gt;from&lt;br&gt;/home/guilhermec/.rvm/gems/ruby-1.9.2-p180@iba-jornais/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in&lt;br&gt;`block in require&amp;#39;&lt;br&gt;from&lt;br&gt;/home/guilhermec/.rvm/gems/ruby-1.9.2-p180@iba-jornais/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:225:in&lt;br&gt;`load_dependency&amp;#39;&lt;br&gt;from&lt;br&gt;/home/guilhermec/.rvm/gems/ruby-1.9.2-p180@iba-jornais/gems/activesupport-3.1.3/lib/active_support/dependencies.rb:240:in&lt;br&gt;`require&amp;#39;&lt;br&gt;from&lt;br&gt;/home/guilhermec/.rvm/gems/ruby-1.9.2-p180@iba-jornais/gems/rake-0.9.2.2/lib/rake/rake_test_loader.rb:10:in&lt;br&gt;`block (2 levels) in &amp;#39;&lt;br&gt;from `Each &amp;#39;&lt;br&gt;from `Block in&amp;#39;&lt;br&gt;from `Select &amp;#39;&lt;br&gt;from `&amp;#39;&lt;br&gt;Loaded suite&lt;p&gt;&lt;br&gt;Does anyone know what I should do to fix this?&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-8170546395023165804?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/8170546395023165804/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-how-to-test-model-dependence.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8170546395023165804'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8170546395023165804'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-how-to-test-model-dependence.html' title='[Rails] How to test the model dependence ?'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-8885884521984395520</id><published>2012-01-27T02:10:00.000-08:00</published><updated>2012-01-27T02:11:12.034-08:00</updated><title type='text'>Re: [Rails] Can't access polymorphic associated model's attributes</title><content type='html'>On 26 January 2012 18:38, Yara Mayer &amp;lt;&lt;a href="mailto:yaramayer@gmail.com"&gt;yaramayer@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; Hi!!&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; I have a few models that use a Photo polymorphic model. It&amp;#39;s all good&lt;br&gt;&amp;gt; and fine for saving or accessing the photos&amp;#39; attributes via console or&lt;br&gt;&amp;gt; inspect or logger, but if I try to call them directly in the view&lt;br&gt;&amp;gt; with, for example, @banner.photo.file, it returns a undefined method&lt;br&gt;&amp;gt; &amp;#39;file&amp;#39; etc for nil:Nil&lt;p&gt;That means that @banner.photo is nil.  Add code to your view to test&lt;br&gt;@banner.photo before accessing @banner.photo.file.&lt;p&gt;Colin&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-8885884521984395520?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/8885884521984395520/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-cant-access-polymorphic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8885884521984395520'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8885884521984395520'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-cant-access-polymorphic.html' title='Re: [Rails] Can&apos;t access polymorphic associated model&apos;s attributes'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-914216489481305248</id><published>2012-01-27T02:06:00.000-08:00</published><updated>2012-01-27T02:07:35.935-08:00</updated><title type='text'>Re: [Rails] :method =&gt; :delete not working</title><content type='html'>On 26 January 2012 08:19, Daisy Di &amp;lt;&lt;a href="mailto:lists@ruby-forum.com"&gt;lists@ruby-forum.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; Dear All,&lt;br&gt;&amp;gt; i want to delect a record with the code&lt;br&gt;&amp;gt; &amp;#160;&amp;lt;% @reservations.each do |reservation| %&amp;gt;&lt;br&gt;&amp;gt; &amp;#160;&amp;lt;tr&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;&amp;lt;td&amp;gt;00000&amp;lt;%= &lt;a href="http://reservation.id"&gt;reservation.id&lt;/a&gt;%&amp;gt;&amp;lt;/td&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;&amp;lt;td&amp;gt;&amp;lt;%= reservation.item_desc %&amp;gt;&amp;lt;/td&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;&amp;lt;td&amp;gt;&amp;lt;%= reservation.item_desc %&amp;gt;&amp;lt;/td&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;&amp;lt;td&amp;gt;&amp;lt;%= reservation.created_on %&amp;gt;&amp;lt;/td&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;&amp;lt;td&amp;gt;&amp;lt;%= reservation.valid_until %&amp;gt;&amp;lt;/td&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160;&amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;#39;Destroy&amp;#39;,reservation, :confirm =&amp;gt; &amp;#39;Are you&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; sure?&amp;#39; ,:method =&amp;gt; :delete%&amp;gt;&amp;lt;/td&amp;gt;&lt;br&gt;&amp;gt; &amp;#160;&amp;lt;/tr&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; but when i click the link ,it will redirect to the show page ,it means&lt;br&gt;&amp;gt; that the show action is invoked,acturally i want to delete it not show&lt;br&gt;&amp;gt; the details, so ,i think the :method=&amp;gt;:delete doesnt work, i search a&lt;br&gt;&amp;gt; lot to find the solution,some advise to add &amp;lt;%= javascript_include_tag&lt;br&gt;&amp;gt; :all %&amp;gt; to the layout,but it still doesnt work, anyone can help me ?&lt;p&gt;Have you checked in log/development.log to see what is logged when you&lt;br&gt;click the link?&lt;p&gt;Colin&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-914216489481305248?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/914216489481305248/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-method-delete-not-working_27.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/914216489481305248'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/914216489481305248'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-method-delete-not-working_27.html' title='Re: [Rails] :method =&gt; :delete not working'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-3161764091100031342</id><published>2012-01-27T01:50:00.000-08:00</published><updated>2012-01-27T01:52:55.618-08:00</updated><title type='text'>[Rails] Re: Advice how to get the word out of new Ruby Jobs(without being a pest)</title><content type='html'>I think it&amp;#39;s cool to have job posts here... as long as they&amp;#39;re&lt;br&gt;detailed enough.. I think the annoying thing with spammy/broadcasted&lt;br&gt;jobs posts is that a lot of them doesn&amp;#39;t have enough info and&lt;br&gt;constantly leave you wondering if you&amp;#39;re in the level they&amp;#39;re&lt;br&gt;searching for, if it&amp;#39;s opening for remote and the like...since this is&lt;br&gt;a little bit more of an intimist place most people would get annoyed&lt;br&gt;by Ctrl+c,Ctrl+v generic openings descriptions that fail to give us&lt;br&gt;the info we would need to know if we&amp;#39;re interested or not...&lt;p&gt;the talk here is supposed to be coder-to-coder I guess..&lt;p&gt;other than that I don&amp;#39;t see any problem at all, I think it&amp;#39;s a good&lt;br&gt;thing&lt;p&gt;On Jan 25, 2:26&amp;#160;pm, &amp;quot;&lt;a href="mailto:sfra...@nyc.rr.com"&gt;sfra...@nyc.rr.com&lt;/a&gt;&amp;quot; &amp;lt;&lt;a href="mailto:sfra...@nyc.rr.com"&gt;sfra...@nyc.rr.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; Don&amp;#39;t want to spam but would like to let Ruby on the Rails people know&lt;br&gt;&amp;gt; of a client that has immediate and periodic openings. Any suggestions&lt;br&gt;&amp;gt; of boards, groups, you know of would be greatly appreciated.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Cheers,&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Steve F.&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-3161764091100031342?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/3161764091100031342/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-advice-how-to-get-word-out-of.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/3161764091100031342'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/3161764091100031342'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-advice-how-to-get-word-out-of.html' title='[Rails] Re: Advice how to get the word out of new Ruby Jobs(without being a pest)'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-2137020023589249773</id><published>2012-01-27T00:10:00.001-08:00</published><updated>2012-01-27T00:10:16.765-08:00</updated><title type='text'>[Rails] Re: error display at the field is not working</title><content type='html'>Thanks for your reply, I dont want the error to dispaly at outline, i&lt;br&gt;want the error to display at near the date field i.e., inlne error&lt;br&gt;display is required for me. please help me how to get it.&lt;br&gt;Thanks in advance&lt;p&gt;On Jan 27, 1:26&amp;#160;am, Dave Aronson &amp;lt;&lt;a href="mailto:googlegroups2d...@davearonson.com"&gt;googlegroups2d...@davearonson.com&lt;/a&gt;&amp;gt;&lt;br&gt;wrote:&lt;br&gt;&amp;gt; On Wed, Jan 25, 2012 at 04:34, naga surya &amp;lt;&lt;a href="mailto:surya.naga...@gmail.com"&gt;surya.naga...@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; &amp;gt; i am not reflecting the error message at the&lt;br&gt;&amp;gt; &amp;gt; field, what should i have to do to diplay the error as &amp;quot;start time&lt;br&gt;&amp;gt; &amp;gt; should be before end time&amp;quot;.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Probably your view is not checking for errors on the object. &amp;#160;You need&lt;br&gt;&amp;gt; code in it something like:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;lt;% if @widget.errors.any? %&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;lt;div id=&amp;quot;error_explanation&amp;quot;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;lt;h2&amp;gt;&amp;lt;%= pluralize(@widget.errors.count, &amp;quot;error&amp;quot;) %&amp;gt; prohibited&lt;br&gt;&amp;gt; this widget from being saved:&amp;lt;/h2&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;lt;ul&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;lt;% @widget.errors.full_messages.each do |msg| %&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;lt;li class=&amp;quot;error&amp;quot;&amp;gt;&amp;lt;%= msg %&amp;gt;&amp;lt;/li&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;lt;% end %&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;lt;/ul&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;lt;/div&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;lt;% end %&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Check your view (or layout) for such code, and if not there, stick&lt;br&gt;&amp;gt; this in, substituting your model name for widget.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; -Dave&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; Dave Aronson: &amp;#160;Available Cleared Ruby on Rails Freelancer&lt;br&gt;&amp;gt; (NoVa/DC/Remote) -- &lt;a href="http://seewww.DaveAronson.com"&gt;seewww.DaveAronson.com&lt;/a&gt;, and blogs &lt;a href="http://atwww.Codosaur.us"&gt;atwww.Codosaur.us&lt;/a&gt;,&lt;a href="http://www.Dare2XL.com"&gt;www.Dare2XL.com&lt;/a&gt;,&lt;a href="http://www.RecruitingRants.com"&gt;www.RecruitingRants.com&lt;/a&gt;&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-2137020023589249773?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/2137020023589249773/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-error-display-at-field-is-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/2137020023589249773'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/2137020023589249773'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-error-display-at-field-is-not.html' title='[Rails] Re: error display at the field is not working'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-6407250851253842340</id><published>2012-01-26T22:11:00.000-08:00</published><updated>2012-01-27T01:52:41.734-08:00</updated><title type='text'>[Rails] High Sleep value on Mysql</title><content type='html'>Hi,&lt;p&gt;We have many queries / connections to the database left open, some are&lt;br&gt;open for 668 seconds and being idle/sleep. Anyone know how we can&lt;br&gt;tweaked the rails code and control to close connection ?&lt;p&gt;Thank you.&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-6407250851253842340?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/6407250851253842340/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-high-sleep-value-on-mysql.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/6407250851253842340'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/6407250851253842340'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-high-sleep-value-on-mysql.html' title='[Rails] High Sleep value on Mysql'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-1383153666941134444</id><published>2012-01-26T21:54:00.001-08:00</published><updated>2012-01-26T21:54:20.142-08:00</updated><title type='text'>[Rails] Redirecting to create new page with input</title><content type='html'>Rails 3.1.3&lt;p&gt;I believe this is a very very fundamental question, but since I am new&lt;br&gt;to Rails, it&amp;#39;s more productive to ask someone to point out what I need&lt;br&gt;to do.&lt;p&gt;Say, I have a search method that generates a list of youtube videos.  I&lt;br&gt;have completed this part.&lt;br&gt;And also, I have set up a database, Video, whose fields are video_title&lt;br&gt;and URL.&lt;p&gt;I need to place a button to each of these video outcomes.&lt;br&gt;My question is :&lt;p&gt;when clicking the button, how can I automatically send the URL of the&lt;br&gt;corresponding video and simultaneously redirect to NEW page where users&lt;br&gt;can create a new video entry???  In other words, in the creating new&lt;br&gt;page, the URL (and hopefully the video_title) is to be already filled&lt;br&gt;out.&lt;p&gt;I am thinking that I need to set &amp;quot;routes.rb&amp;quot; so that redirecting can&lt;br&gt;take&lt;br&gt;some values together.  But routing is very confusing to me so far.&lt;p&gt;Could anyone help me out?&lt;p&gt;soichi&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-1383153666941134444?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/1383153666941134444/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-redirecting-to-create-new-page.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/1383153666941134444'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/1383153666941134444'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-redirecting-to-create-new-page.html' title='[Rails] Redirecting to create new page with input'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-2164242754593209215</id><published>2012-01-26T20:49:00.000-08:00</published><updated>2012-01-26T20:50:08.131-08:00</updated><title type='text'>[Rails] Re: How to add multiple user create on single form using ActiveAdmin</title><content type='html'>controller&lt;br&gt;----------&lt;p&gt;your erb like this way:&lt;p&gt;----------------------------------------------------------------------&lt;br&gt;user_name  |     email        |   street    |     city    |   state  |&lt;br&gt;----------------------------------------------------------------------&lt;br&gt;user1      | &lt;a href="mailto:abc@gmail.com"&gt;abc@gmail.com&lt;/a&gt;    |    x        |   xx        |    TN    |&lt;br&gt;----------------------------------------------------------------------&lt;br&gt;user2      | &lt;a href="mailto:cde@gmail.com"&gt;cde@gmail.com&lt;/a&gt;    |    y        |   yy        |    KL    |&lt;br&gt;----------------------------------------------------------------------&lt;p&gt;use table structure:&lt;p&gt;the first row is header:&lt;br&gt;the second row is td&lt;p&gt;form like this way&lt;p&gt;&amp;lt;table&amp;gt;&lt;br&gt; &amp;lt;tr&amp;gt;&lt;br&gt;   &amp;lt;td&amp;gt;user_name&amp;lt;/td&amp;gt;&lt;br&gt;   &amp;lt;td&amp;gt;email&amp;lt;/td&amp;gt;&lt;br&gt;   &amp;lt;td&amp;gt;street&amp;lt;/td&amp;gt;&lt;br&gt;   &amp;lt;td&amp;gt;city&amp;lt;/td&amp;gt;&lt;br&gt;   &amp;lt;td&amp;gt;state&amp;lt;/td&amp;gt;&lt;br&gt; &amp;lt;/tr&amp;gt;&lt;br&gt; &amp;lt;%= form_tag  &amp;quot;action&amp;quot; ,:mode=&amp;gt;&amp;quot;update&amp;quot;,:multipart =&amp;gt; true do  %&amp;gt;&lt;br&gt;  &amp;lt;% for  i in 0..1%&amp;gt;&lt;br&gt;   &amp;lt;%= text_field_tag :&amp;quot;user_name_#{i}&amp;quot;,&amp;quot;&amp;quot;%&amp;gt;&lt;br&gt;   &amp;lt;%= text_field_tag :&amp;quot;email_#{i}&amp;quot;,&amp;quot;&amp;quot;%&amp;gt;&lt;br&gt;   &amp;lt;%= text_field_tag :&amp;quot;street_#{i}&amp;quot;,&amp;quot;&amp;quot;%&amp;gt;&lt;br&gt;   &amp;lt;%= text_field_tag :&amp;quot;city_#{i}&amp;quot;,&amp;quot;&amp;quot;%&amp;gt;&lt;br&gt;   &amp;lt;%= text_field_tag :&amp;quot;state_#{i}&amp;quot;,&amp;quot;&amp;quot;%&amp;gt;&lt;br&gt;  &amp;lt;% end%&amp;gt;&lt;br&gt;        &amp;lt;%= submit_tag &amp;quot;update&amp;quot; %&amp;gt;&lt;br&gt; &amp;lt;%end%&amp;gt;&lt;br&gt;&amp;lt;/table&amp;gt;&lt;p&gt;controller file:&lt;p&gt;if params[:mode]==&amp;quot;update&amp;quot;&lt;br&gt; count = 0&lt;br&gt; loop{&lt;br&gt;  user_name = &amp;quot;user_name_&amp;quot;+count.to_s&lt;br&gt;  email = &amp;quot;email_&amp;quot;+count.to_s&lt;br&gt;  street = &amp;quot;street_&amp;quot;+count.to_s&lt;br&gt;  city = &amp;quot;city_&amp;quot;+count.to_s&lt;br&gt;  state = &amp;quot;state_&amp;quot;+count.to_s&lt;p&gt;  if !params[user_name].blank?&lt;br&gt;    User.create(&lt;br&gt;     :user_name =&amp;gt; params[user_name],&lt;br&gt;     :email =&amp;gt; params[user_name],&lt;br&gt;     :street =&amp;gt; params[user_name],&lt;br&gt;     :city =&amp;gt; params[user_name],&lt;br&gt;     :state =&amp;gt; params[user_name]&lt;br&gt;    )&lt;br&gt;  end&lt;p&gt;  count = count + 1&lt;br&gt;  user_name = &amp;quot;user_name_&amp;quot;+count.to_s&lt;br&gt;  break if params[user_name].blank?&lt;p&gt; }&lt;br&gt;end&lt;p&gt;&lt;p&gt;bye:)&lt;br&gt;bdeveloper01&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-2164242754593209215?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/2164242754593209215/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-how-to-add-multiple-user.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/2164242754593209215'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/2164242754593209215'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-how-to-add-multiple-user.html' title='[Rails] Re: How to add multiple user create on single form using ActiveAdmin'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-3414068049100148134</id><published>2012-01-26T20:18:00.001-08:00</published><updated>2012-01-26T20:18:32.363-08:00</updated><title type='text'>[Rails] Re: Skipping the First Line when reading in a text file</title><content type='html'>I am using csv...&lt;p&gt;it is work:&lt;p&gt;if you are interested try this way:&lt;p&gt;require &amp;#39;csv&amp;#39;&lt;p&gt;reader = CSV.open(&amp;quot;file_location&amp;quot;, &amp;quot;r&amp;quot;)&lt;br&gt;reader.shift # this line is used to skipped first header line&lt;br&gt;reader.each{|row|&lt;br&gt; first_field = row[0]&lt;br&gt; second_field = row[1]&lt;p&gt; Module_Name.create(&lt;br&gt;  :attribute1 =&amp;gt; first_field,&lt;br&gt;  :attribute2 =&amp;gt; second_field&lt;br&gt;  )&lt;br&gt;}&lt;p&gt;Bye:)&lt;br&gt;bdeveloper01&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-3414068049100148134?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/3414068049100148134/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-skipping-first-line-when.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/3414068049100148134'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/3414068049100148134'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-skipping-first-line-when.html' title='[Rails] Re: Skipping the First Line when reading in a text file'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-2424756329400545565</id><published>2012-01-26T19:49:00.001-08:00</published><updated>2012-01-26T19:49:58.767-08:00</updated><title type='text'>Re: [Rails] Re: :method =&gt; :delete not working</title><content type='html'>&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Thu, Jan 26, 2012 at 10:38 PM, Daisy Di &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:lists@ruby-forum.com"&gt;lists@ruby-forum.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt; Andre wrote in post #1042629:&lt;br&gt; &lt;div class="im"&gt;&amp;gt; Hi, could you post your controller code too?&lt;br&gt; &lt;br&gt; &lt;/div&gt;Hi, this is the destroy controller, i wont delete the record,just change&lt;br&gt; the status to -1.&lt;br&gt; &lt;br&gt;   def destroy&lt;br&gt;     @reservation = CrmRedemptionReservation.find(params[:id])&lt;br&gt;     @reservation.update_attributes(:status_level =&amp;gt; -1)&lt;br&gt;     #@reservation.destroy&lt;br&gt;     redirect_to redeemhistory_path&lt;br&gt;   end&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Why do you comment the line that destroy the reservation?... or your idea of destroy it is by changing its status?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Javier &lt;/div&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-2424756329400545565?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/2424756329400545565/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-method-delete-not-working.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/2424756329400545565'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/2424756329400545565'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-method-delete-not-working.html' title='Re: [Rails] Re: :method =&gt; :delete not working'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-1053173990425587705</id><published>2012-01-26T19:38:00.001-08:00</published><updated>2012-01-26T19:38:42.656-08:00</updated><title type='text'>[Rails] Re: :method =&gt; :delete not working</title><content type='html'>Andre wrote in post #1042629:&lt;br&gt;&amp;gt; Hi, could you post your controller code too?&lt;p&gt;Hi, this is the destroy controller, i wont delete the record,just change &lt;br&gt;the status to -1.&lt;p&gt;  def destroy&lt;br&gt;    @reservation = CrmRedemptionReservation.find(params[:id])&lt;br&gt;    @reservation.update_attributes(:status_level =&amp;gt; -1)&lt;br&gt;    #@reservation.destroy&lt;br&gt;    redirect_to redeemhistory_path&lt;br&gt;  end&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-1053173990425587705?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/1053173990425587705/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-method-delete-not-working_26.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/1053173990425587705'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/1053173990425587705'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-re-method-delete-not-working_26.html' title='[Rails] Re: :method =&gt; :delete not working'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-8395649461313207702</id><published>2012-01-26T15:43:00.001-08:00</published><updated>2012-01-26T15:43:57.293-08:00</updated><title type='text'>[Rails] Show action with Devise</title><content type='html'>Hi, Devise has edit and new views for registrations, I&amp;#39;d like to add a show view to display that information.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;How can I do that?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;span class="Apple-style-span"&gt;If I overwrite the controller RegistrationsController &amp;lt; Devise::RegistrationsController, it says: &amp;quot;&lt;span class="Apple-style-span" style="color:rgb(51,51,51);font-family:helvetica,verdana,arial,sans-serif;font-size:13px;line-height:18px"&gt;Missing template registrations/show, ...&lt;/span&gt;&amp;quot;, but I want to render the view that is inside users/registrations (the generated view for &amp;quot;&lt;span class="Apple-style-span" style="font-family:&amp;#39;Bitstream Vera Sans Mono&amp;#39;,Courier,monospace;font-size:13px;line-height:19px;white-space:pre"&gt;rails generate devise:views users&amp;quot;&lt;/span&gt;&lt;/span&gt;) that I just added, so users/registrations/show.html.erb.&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Thanks in advance&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-8395649461313207702?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/8395649461313207702/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-show-action-with-devise.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8395649461313207702'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8395649461313207702'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-show-action-with-devise.html' title='[Rails] Show action with Devise'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-824670895516425132</id><published>2012-01-26T14:38:00.000-08:00</published><updated>2012-01-26T14:39:36.091-08:00</updated><title type='text'>Re: [Rails] Average hour rate for a Junior Rails developer.</title><content type='html'>On Thu, Jan 26, 2012 at 11:55, Philip Hallstrom &amp;lt;&lt;a href="mailto:philip@pjkh.com"&gt;philip@pjkh.com&lt;/a&gt;&amp;gt; wrote:&lt;p&gt;&amp;gt;&amp;gt; Getting more granular and asking about cities, it seems San Francisco&lt;br&gt;&amp;gt;&amp;gt; is the mecca, so to speak, followed (distantly) by New York, Chicago,&lt;br&gt;&amp;gt;&amp;gt; and Washington DC.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; Portland, OR and Austin, TX come up a lot as well...&lt;p&gt;Oh of course, how could I forget -- last year, Puppet Labs was trying&lt;br&gt;to convince me to consider moving to Portland!  Very nice city&lt;br&gt;(visited there last summer), but I don&amp;#39;t want to move.  :-)  New&lt;br&gt;Relic&amp;#39;s also there, and a fair assortment of startups.  Still fewer&lt;br&gt;than DC-land, what with all the federal (and federal contracting)&lt;br&gt;jobs, tho.  I&amp;#39;ve seen some for Austin too, but not enough to make an&lt;br&gt;impression.&lt;p&gt;-Dave&lt;p&gt;-- &lt;br&gt;Dave Aronson: &amp;#160;Available Cleared Ruby on Rails Freelancer&lt;br&gt;(NoVa/DC/Remote) -- see &lt;a href="http://www.DaveAronson.com"&gt;www.DaveAronson.com&lt;/a&gt;, and blogs at&lt;br&gt;&lt;a href="http://www.Codosaur.us"&gt;www.Codosaur.us&lt;/a&gt;, &lt;a href="http://www.Dare2XL.com"&gt;www.Dare2XL.com&lt;/a&gt;, &lt;a href="http://www.RecruitingRants.com"&gt;www.RecruitingRants.com&lt;/a&gt;&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-824670895516425132?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/824670895516425132/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-average-hour-rate-for-junior_5578.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/824670895516425132'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/824670895516425132'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-average-hour-rate-for-junior_5578.html' title='Re: [Rails] Average hour rate for a Junior Rails developer.'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-6644341019462611014</id><published>2012-01-26T13:25:00.001-08:00</published><updated>2012-01-26T13:25:47.036-08:00</updated><title type='text'>Re: [Rails] Advice how to get the word out of new Ruby Jobs(without being a pest)</title><content type='html'>&lt;div class="gmail_quote"&gt;On Thu, Jan 26, 2012 at 10:01 PM, Dave Aronson &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:googlegroups2dave@davearonson.com"&gt;googlegroups2dave@davearonson.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt; On Thu, Jan 26, 2012 at 07:06, Peter Hickman&lt;br&gt; &amp;lt;&lt;a href="mailto:peterhickman386@googlemail.com"&gt;peterhickman386@googlemail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt; &lt;br&gt; &amp;gt; Getting the subject line right is important,&lt;br&gt; &amp;gt; something like&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; [JOB] 2 x Rails developers with 2+ years experience for online gaming&lt;br&gt; &amp;gt; startup in NYC&lt;br&gt; &lt;br&gt; The main tweak I&amp;#39;d make to that is to put the location earlier, and&lt;br&gt; maybe be a bit terser.  Some email clients have very little room for&lt;br&gt; the Subject in a listing.  Also be sure to include if remote is OK,&lt;br&gt; e.g., &amp;quot;[JOB] NYC/Remote 2 RoR devs w/ 2+ yrs exp for gaming startup&amp;quot;.&lt;br&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;TL;DR&lt;/div&gt;&lt;div&gt;* broadcasting is inefficient&lt;/div&gt;&lt;div&gt;* anyone cares for a &amp;quot;community job site&amp;quot; ??&lt;/div&gt; &lt;div&gt;* I object to massive job spam on this list&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Broadcasting _all_ jobs to _all_ readers seems horrendously inefficient.&lt;/div&gt;&lt;div&gt;I already got nervous with the recent few &amp;quot;job&amp;quot; announcements that&lt;/div&gt; &lt;div&gt;where totally irrelevant for me (and probably 90% of the readers).&lt;/div&gt;&lt;div&gt;And indeed, the worst of it is, you need to read half of the text to figure&lt;/div&gt;&lt;div&gt;out it is in NY, Berlin or SFO ...&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt; &lt;div&gt;I seems so much more efficient if you at least one can filter on a few&lt;/div&gt;&lt;div&gt;basic criteria like:&lt;/div&gt;&lt;div&gt;* location of work (that is _not_ location of employer, client or recruiter)&lt;/div&gt;&lt;div&gt;* a few keywords/tags (front-end, back-end, javascript, ...)&lt;/div&gt; &lt;div&gt;* recommendations (for the job/employer, I mean)&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I spent 6 months on my own money setting up a free job job site (that was&lt;/div&gt;&lt;div&gt;2008, my first Rails project), but no real success (technically, it was great,&lt;/div&gt; &lt;div&gt;it had 1,000 high-tech/start-up jobs that where otherwise not publicized that&lt;/div&gt;&lt;div&gt;I scraped from 100 high-tech companies&amp;#39; job sites, around university of&lt;/div&gt;&lt;div&gt;Leuven in Belgium ; &lt;a href="http://allejobsinleuven.be"&gt;http://allejobsinleuven.be&lt;/a&gt; in case anybody cares).&lt;/div&gt; &lt;div&gt;Recently, I picked up a similar idea again, but let go much faster.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;FWIW, I might well spent some time/money again for the third time to build&lt;/div&gt;&lt;div&gt;a simple free job listing system if people would be interested. At least, I am&lt;/div&gt; &lt;div&gt;not aware of the &amp;quot;default&amp;quot; spot where all the Ruby/Rails jobs, projects,&lt;/div&gt;&lt;div&gt;available people are listed (if that exists, certainly interested to know).&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Maybe, it even makes sense to build that as an open source/community&lt;/div&gt; &lt;div&gt;project, so _we_ (and not the recruiters) can decide how the thing works ...&lt;/div&gt;&lt;div&gt;Revenue could come from &amp;quot;VIP&amp;quot; jobs that get more prominent html&lt;/div&gt;&lt;div&gt;decorations.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I you give me positive feedback, I am on it! If I get no feedback, no prob,&lt;/div&gt; &lt;div&gt;just confirms previous conclusions :-)&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;In any case, I object somewhat to a massive amount of job spam on&lt;/div&gt;&lt;div&gt;this list (but indeed, I could filter on the [JOB] in the subject line).&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Curious for any feedback,&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Peter&lt;/div&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-6644341019462611014?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/6644341019462611014/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-advice-how-to-get-word-out-of_26.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/6644341019462611014'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/6644341019462611014'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-advice-how-to-get-word-out-of_26.html' title='Re: [Rails] Advice how to get the word out of new Ruby Jobs(without being a pest)'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-4485284897919926927</id><published>2012-01-26T13:17:00.000-08:00</published><updated>2012-01-26T13:23:27.664-08:00</updated><title type='text'>Re: [Rails] Controller validation and duck trading! How would you do it?</title><content type='html'>On 26 January 2012 17:16, Colin Law &amp;lt;&lt;a href="mailto:clanlaw@googlemail.com"&gt;clanlaw@googlemail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; Then have a validation in the Duck model&lt;br&gt;&amp;gt; that prevents the duck from being saved if its owner already has his&lt;br&gt;&amp;gt; max allowance.&lt;p&gt;It would probably just annoy people if they were not told until they&amp;#39;d&lt;br&gt;entered all their &amp;quot;new duck&amp;quot; requirements that they&amp;#39;d reached their&lt;br&gt;limit. So I&amp;#39;d also keep a permissions-type check in the controller&lt;br&gt;too. As Colin says the code to check for this is in the model, so can&lt;br&gt;be re-used by the permissions check and the validation.&lt;p&gt;&lt;br&gt;  class DucksController &amp;lt; AR:Base&lt;br&gt;    before_filter :check_duck_limit, :only =&amp;gt; [:new, :create]&lt;p&gt;    def new&lt;br&gt;      @duck = Duck.new&lt;br&gt;    end&lt;p&gt;    private&lt;br&gt;    def check_duck_limit&lt;br&gt;      flash[notice: &amp;quot;You have reached your limit. Upgrade your plan.&amp;quot;]&lt;br&gt;if current_user.reached_duck_limit?&lt;br&gt;    end&lt;br&gt;  end&lt;p&gt;  class User &amp;lt; AR:Base&lt;br&gt;    validate :has_duck_availability&lt;p&gt;    def reached_duck_limit?&lt;br&gt;      self.ducks.count &amp;gt;= self.max_number_of_ducks&lt;br&gt;    end&lt;p&gt;    # in case a user can not yet have a plan, it&amp;#39;s handy to make sure&lt;br&gt;it exists, and return a safe value&lt;br&gt;    def max_number_of_ducks&lt;br&gt;      plan ? plan.max_number_of_ducks || 0 : 0&lt;br&gt;    end&lt;p&gt;    private&lt;br&gt;    def has_duck_availability&lt;br&gt;      errors.add(:duck_count, &amp;quot;has been reached&amp;quot;) if reached_duck_limit?&lt;br&gt;    end&lt;br&gt; end&lt;p&gt;&lt;br&gt;PS you don&amp;#39;t need to assign &amp;quot;current_user&amp;quot; to an instance variable -&lt;br&gt;just use current_user ;-)&lt;p&gt;PPS Your current code alerts when the limit is exceeded, rather than reached&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-4485284897919926927?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/4485284897919926927/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-controller-validation-and-duck_26.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/4485284897919926927'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/4485284897919926927'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-controller-validation-and-duck_26.html' title='Re: [Rails] Controller validation and duck trading! How would you do it?'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-6299610783351861336</id><published>2012-01-26T13:12:00.000-08:00</published><updated>2012-01-26T13:43:42.705-08:00</updated><title type='text'>[Rails] the best solution for a dynamic form in RoR</title><content type='html'>Hi,&lt;p&gt;a little newbie question about the form&lt;p&gt;I want a dynamic form similar to this&lt;p&gt;&lt;a href="http://www.webstyling.it/script/javascript/form/modulo%20variabile.html"&gt;http://www.webstyling.it/script/javascript/form/modulo%20variabile.html&lt;/a&gt;&lt;p&gt;instead to have a drop down menu I want a radio button option&lt;p&gt;- radio button 1&lt;br&gt;- radio button 2&lt;br&gt;- radio button 3&lt;p&gt;in function of my choice (|radio button 1| OR |radio button 2| OR |radio&lt;br&gt;button 3|) appear in the same page a different form&lt;p&gt;MY QUESTION&lt;p&gt;the solution is set in the app the following gems?&lt;p&gt;- simple_form gem&lt;br&gt;- jquery&lt;p&gt;thank you in advance&lt;p&gt;Cluter&lt;p&gt;-- &lt;br&gt;Posted via &lt;a href="http://www.ruby-forum.com/"&gt;http://www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-6299610783351861336?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/6299610783351861336/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-best-solution-for-dynamic-form-in.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/6299610783351861336'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/6299610783351861336'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-best-solution-for-dynamic-form-in.html' title='[Rails] the best solution for a dynamic form in RoR'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-8317894126982148880</id><published>2012-01-26T13:01:00.000-08:00</published><updated>2012-01-26T13:32:40.043-08:00</updated><title type='text'>Re: [Rails] Advice how to get the word out of new Ruby Jobs(without being a pest)</title><content type='html'>On Thu, Jan 26, 2012 at 07:06, Peter Hickman&lt;br&gt;&amp;lt;&lt;a href="mailto:peterhickman386@googlemail.com"&gt;peterhickman386@googlemail.com&lt;/a&gt;&amp;gt; wrote:&lt;p&gt;&amp;gt; Getting the subject line right is important,&lt;br&gt;&amp;gt; something like&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; [JOB] 2 x Rails developers with 2+ years experience for online gaming&lt;br&gt;&amp;gt; startup in NYC&lt;p&gt;The main tweak I&amp;#39;d make to that is to put the location earlier, and&lt;br&gt;maybe be a bit terser.  Some email clients have very little room for&lt;br&gt;the Subject in a listing.  Also be sure to include if remote is OK,&lt;br&gt;e.g., &amp;quot;[JOB] NYC/Remote 2 RoR devs w/ 2+ yrs exp for gaming startup&amp;quot;.&lt;p&gt;-Dave&lt;p&gt;-- &lt;br&gt;Dave Aronson: &amp;#160;Available Cleared Ruby on Rails Freelancer&lt;br&gt;(NoVa/DC/Remote) -- see &lt;a href="http://www.DaveAronson.com"&gt;www.DaveAronson.com&lt;/a&gt;, and blogs at&lt;br&gt;&lt;a href="http://www.Codosaur.us"&gt;www.Codosaur.us&lt;/a&gt;, &lt;a href="http://www.Dare2XL.com"&gt;www.Dare2XL.com&lt;/a&gt;, &lt;a href="http://www.RecruitingRants.com"&gt;www.RecruitingRants.com&lt;/a&gt;&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-8317894126982148880?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/8317894126982148880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-advice-how-to-get-word-out-of_7345.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8317894126982148880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8317894126982148880'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-advice-how-to-get-word-out-of_7345.html' title='Re: [Rails] Advice how to get the word out of new Ruby Jobs(without being a pest)'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-5914563821597076450</id><published>2012-01-26T12:51:00.000-08:00</published><updated>2012-01-26T12:52:08.287-08:00</updated><title type='text'>Re: [Rails] Controller validation and duck trading! How would you do it?</title><content type='html'>On Thu, Jan 26, 2012 at 12:08, Mohamad El-Husseini&lt;br&gt;&amp;lt;&lt;a href="mailto:husseini.mel@gmail.com"&gt;husseini.mel@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;p&gt;&amp;gt; For the sake of example let&amp;#39;s say you have an application&lt;br&gt;&amp;gt; where users list their ducks for sale.&lt;p&gt;Viaduct?  Vi-a no chicken?  ;-)&lt;p&gt;&amp;gt; It&amp;#39;s best to prevent the user from&lt;br&gt;&amp;gt; adding a duck if he has reached his limit. This introduces a chunk&lt;br&gt;&amp;gt; of logic whose place isn&amp;#39;t quite clear. Let&amp;#39;s put it in the controller:&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; def new&lt;p&gt;I think you&amp;#39;re on the right track having a *warning* show up in&lt;br&gt;ducks_controller#new.  If, as Colin suggested, you have the *model*&lt;br&gt;check for excessive ducks as well, #create shouldn&amp;#39;t need any&lt;br&gt;alterations from the standard scaffold-generated style.  (At least,&lt;br&gt;not for this reason.)  It will make the save fail, detected by&lt;br&gt;#create, which will just render #new again, with the errors carried by&lt;br&gt;@duck.&lt;p&gt;&amp;gt; Bearing in mind I&amp;#39;m two weeks into my Rails and Ruby studies,&lt;p&gt;You&amp;#39;re showing a very good grasp of the concepts for only two weeks&lt;br&gt;in!  Well done!&lt;p&gt;-Dave&lt;p&gt;-- &lt;br&gt;Dave Aronson: &amp;#160;Available Cleared Ruby on Rails Freelancer&lt;br&gt;(NoVa/DC/Remote) -- see &lt;a href="http://www.DaveAronson.com"&gt;www.DaveAronson.com&lt;/a&gt;, and blogs at&lt;br&gt;&lt;a href="http://www.Codosaur.us"&gt;www.Codosaur.us&lt;/a&gt;, &lt;a href="http://www.Dare2XL.com"&gt;www.Dare2XL.com&lt;/a&gt;, &lt;a href="http://www.RecruitingRants.com"&gt;www.RecruitingRants.com&lt;/a&gt;&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-5914563821597076450?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/5914563821597076450/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-controller-validation-and-duck.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/5914563821597076450'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/5914563821597076450'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-controller-validation-and-duck.html' title='Re: [Rails] Controller validation and duck trading! How would you do it?'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-7884894898373519645</id><published>2012-01-26T12:26:00.000-08:00</published><updated>2012-01-26T12:27:19.224-08:00</updated><title type='text'>Re: [Rails] error display at the field is not working</title><content type='html'>On Wed, Jan 25, 2012 at 04:34, naga surya &amp;lt;&lt;a href="mailto:surya.naga123@gmail.com"&gt;surya.naga123@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;p&gt;&amp;gt; i am not reflecting the error message at the&lt;br&gt;&amp;gt; field, what should i have to do to diplay the error as &amp;quot;start time&lt;br&gt;&amp;gt; should be before end time&amp;quot;.&lt;p&gt;Probably your view is not checking for errors on the object.  You need&lt;br&gt;code in it something like:&lt;p&gt;  &amp;lt;% if @widget.errors.any? %&amp;gt;&lt;br&gt;    &amp;lt;div id=&amp;quot;error_explanation&amp;quot;&amp;gt;&lt;br&gt;      &amp;lt;h2&amp;gt;&amp;lt;%= pluralize(@widget.errors.count, &amp;quot;error&amp;quot;) %&amp;gt; prohibited&lt;br&gt;this widget from being saved:&amp;lt;/h2&amp;gt;&lt;br&gt;      &amp;lt;ul&amp;gt;&lt;br&gt;      &amp;lt;% @widget.errors.full_messages.each do |msg| %&amp;gt;&lt;br&gt;        &amp;lt;li class=&amp;quot;error&amp;quot;&amp;gt;&amp;lt;%= msg %&amp;gt;&amp;lt;/li&amp;gt;&lt;br&gt;      &amp;lt;% end %&amp;gt;&lt;br&gt;      &amp;lt;/ul&amp;gt;&lt;br&gt;    &amp;lt;/div&amp;gt;&lt;br&gt;  &amp;lt;% end %&amp;gt;&lt;p&gt;Check your view (or layout) for such code, and if not there, stick&lt;br&gt;this in, substituting your model name for widget.&lt;p&gt;-Dave&lt;p&gt;-- &lt;br&gt;Dave Aronson: &amp;#160;Available Cleared Ruby on Rails Freelancer&lt;br&gt;(NoVa/DC/Remote) -- see &lt;a href="http://www.DaveAronson.com"&gt;www.DaveAronson.com&lt;/a&gt;, and blogs at&lt;br&gt;&lt;a href="http://www.Codosaur.us"&gt;www.Codosaur.us&lt;/a&gt;, &lt;a href="http://www.Dare2XL.com"&gt;www.Dare2XL.com&lt;/a&gt;, &lt;a href="http://www.RecruitingRants.com"&gt;www.RecruitingRants.com&lt;/a&gt;&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-7884894898373519645?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/7884894898373519645/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-error-display-at-field-is-not.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/7884894898373519645'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/7884894898373519645'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-error-display-at-field-is-not.html' title='Re: [Rails] error display at the field is not working'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-6604028208318606603</id><published>2012-01-26T12:06:00.000-08:00</published><updated>2012-01-26T12:07:11.579-08:00</updated><title type='text'>Re: [Rails] Re: Optimizing query</title><content type='html'>&lt;div class="gmail_quote"&gt;On Thu, Jan 26, 2012 at 8:51 PM, Linus Pettersson &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:linus.pettersson@gmail.com"&gt;linus.pettersson@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt; This query is only to get the appropriate Categories &amp;amp; Subcategories. There are 5 Categories and 45 Subcategories.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;My products are imported from webshops which are using different categories for the same things (&amp;quot;tshirt&amp;quot;, &amp;quot;t-shirts&amp;quot;, &amp;quot;t-shirt&amp;quot;, &amp;quot;short sleeved shirts&amp;quot; may all be the same). To cope with this issue I have the &amp;quot;Resellercategories&amp;quot; that I relate to a specific Category and Subcategory.&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Category/Subcategory -&amp;gt; Resellercategory -&amp;gt; Product&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;(Resellercategories are never seen in the frontend)&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;If I filter the products for &amp;quot;male&amp;quot; I only want to display (non-empty) Categories/Subcategories that have male products.&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;To answer your question, there is no pagination on the Categories and Subcategories that I&amp;#39;m fetching here with this query. The query only returns the appropriate Categories/Subcategories. So if filtered by &amp;quot;male&amp;quot; it returns 3 Categories and 12 Subcategories (In my dev environment).&lt;/div&gt; &lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;OK, I understand (small amount of categories, much more products).&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;If you find no other way, then the caching the &amp;quot;has_male_products&amp;quot; etc&lt;/div&gt;&lt;div&gt;in the Category/Subcategory may be the best remaining way.&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I was also thinking, maybe it is acceptable that the set of Categories&lt;/div&gt;&lt;div&gt;with &amp;quot;male_products&amp;quot; etc. is only update every hour or so. That would&lt;/div&gt;&lt;div&gt;avoid the complexity of real-time update of that cache column. On the&lt;/div&gt; &lt;div&gt;other hand, an after_save on products is not _that_ difficult.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Just as a test, does your performance improve significantly if you add&lt;/div&gt;&lt;div&gt;a &amp;quot;has_male_products&amp;quot; column on categories and filter on that?&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;HTH,&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Peter&lt;/div&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-6604028208318606603?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/6604028208318606603/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-optimizing-query_9648.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/6604028208318606603'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/6604028208318606603'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-optimizing-query_9648.html' title='Re: [Rails] Re: Optimizing query'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-8539251110549216310</id><published>2012-01-26T11:51:00.000-08:00</published><updated>2012-01-26T12:22:21.294-08:00</updated><title type='text'>Re: [Rails] Re: Optimizing query</title><content type='html'>This query is only to get the appropriate Categories &amp;amp; Subcategories. There are 5 Categories and 45 Subcategories.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;My products are imported from webshops which are using different categories for the same things ("tshirt", "t-shirts", "t-shirt", "short sleeved shirts" may all be the same). To cope with this issue I have the "Resellercategories" that I relate to a specific Category and Subcategory.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Category/Subcategory -&amp;gt; Resellercategory -&amp;gt; Product&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;(Resellercategories are never seen in the frontend)&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;If I filter the products for "male" I only want to display (non-empty) Categories/Subcategories that have male products.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;To answer your question, there is no pagination on the Categories and Subcategories that I'm fetching here with this query. The query only returns the appropriate Categories/Subcategories. So if filtered by "male" it returns 3 Categories and 12 Subcategories (In my dev environment).&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I am using pagination for the actual products though, but that is a separate query.&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To view this discussion on the web visit &lt;a href="https://groups.google.com/d/msg/rubyonrails-talk/-/ZGBq4G24MIUJ"&gt;https://groups.google.com/d/msg/rubyonrails-talk/-/ZGBq4G24MIUJ&lt;/a&gt;.&lt;br /&gt;  To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-8539251110549216310?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/8539251110549216310/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-optimizing-query_1282.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8539251110549216310'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8539251110549216310'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-optimizing-query_1282.html' title='Re: [Rails] Re: Optimizing query'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-3757010037038668421</id><published>2012-01-26T11:14:00.001-08:00</published><updated>2012-01-26T11:14:23.850-08:00</updated><title type='text'>Re: [Rails] Average hour rate for a Junior Rails developer.</title><content type='html'>&lt;div&gt;On Jan 27, 2012, at 8:10 AM, Walter McGinnis &amp;lt;&lt;a href="mailto:walter.mcginnis@gmail.com"&gt;walter.mcginnis@gmail.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&lt;/div&gt;&lt;blockquote type="cite"&gt;&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;br&gt;&lt;span&gt;I also know of recent jobs openings in Christchurch (if you can't take the shake), Nelson, and Auckland.&lt;/span&gt;&lt;br&gt;&lt;blockquote type="cite"&gt;&lt;font class="Apple-style-span" color="#0023a3"&gt;&lt;br&gt;&lt;/font&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;br&gt;&lt;div&gt;CAN take the shake, I mean.&lt;/div&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-3757010037038668421?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/3757010037038668421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-average-hour-rate-for-junior_2426.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/3757010037038668421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/3757010037038668421'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-average-hour-rate-for-junior_2426.html' title='Re: [Rails] Average hour rate for a Junior Rails developer.'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-8252612975751998100</id><published>2012-01-26T11:10:00.000-08:00</published><updated>2012-01-26T11:11:08.764-08:00</updated><title type='text'>Re: [Rails] Average hour rate for a Junior Rails developer.</title><content type='html'>It&amp;#39;s nowhere near the same scale as cities in the US and Europe, but Wellington, New Zealand definitely has a lot of demand for Rails developers right now.&lt;p&gt;I also know of recent jobs openings in Christchurch (if you can&amp;#39;t take the shake), Nelson, and Auckland.&lt;p&gt;I would suspect the market in Australia is hot. Sydney, Melbourne, and Brisbane probably best bets, though supposedly there is a big shortage of IT workers (haven&amp;#39;t heard Rails specifically) out west to support the mining industry.&lt;p&gt;Australian pay is better than NZ pay due to exchange rates.&lt;p&gt;Personally, I&amp;#39;m looking for at least one junior level developer to work with me on projects as a freelancer. Remote from anywhere is fine as long as you have excellent English language communication skills. If you can&amp;#39;t write and speak in English well, it&amp;#39;s a non-starter. I expect some sort of code on github to look at too. Contact me at wm -at- waltermcginnis dot com.&lt;p&gt;Cheers,&lt;br&gt;Walter&lt;br&gt;Twitter: wtem&lt;p&gt;On Jan 27, 2012, at 5:55 AM, Philip Hallstrom &amp;lt;&lt;a href="mailto:philip@pjkh.com"&gt;philip@pjkh.com&lt;/a&gt;&amp;gt; wrote:&lt;p&gt;&amp;gt;&amp;gt;&amp;gt; Basically, where is considered the best country to work in as a Rails&lt;br&gt;&amp;gt;&amp;gt;&amp;gt; developer? Where are the most rewarding job opportunities?&lt;br&gt;&amp;gt;&amp;gt; &lt;br&gt;&amp;gt;&amp;gt; From the numbers of opportunities I&amp;#39;ve seen, definitely the USA, but&lt;br&gt;&amp;gt;&amp;gt; that&amp;#39;s partly because we have so many big cities.&lt;br&gt;&amp;gt;&amp;gt; &lt;br&gt;&amp;gt;&amp;gt; Getting more granular and asking about cities, it seems San Francisco&lt;br&gt;&amp;gt;&amp;gt; is the mecca, so to speak, followed (distantly) by New York, Chicago,&lt;br&gt;&amp;gt;&amp;gt; and Washington DC.&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; Portland, OR and Austin, TX come up a lot as well...&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; -philip&lt;br&gt;&amp;gt; &lt;br&gt;&amp;gt; -- &lt;br&gt;&amp;gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;&amp;gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;&amp;gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;&amp;gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt;&amp;gt; &lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-8252612975751998100?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/8252612975751998100/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-average-hour-rate-for-junior_26.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8252612975751998100'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/8252612975751998100'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-average-hour-rate-for-junior_26.html' title='Re: [Rails] Average hour rate for a Junior Rails developer.'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-6453191630006379292</id><published>2012-01-26T11:08:00.001-08:00</published><updated>2012-01-26T11:08:57.917-08:00</updated><title type='text'>Re: [Rails] Re: Optimizing query</title><content type='html'>&lt;div class="gmail_quote"&gt;On Thu, Jan 26, 2012 at 6:37 PM, Peter Vandenabeele &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:peter@vandenabeele.com"&gt;peter@vandenabeele.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt; &lt;div class="gmail_quote"&gt;&lt;div class="im"&gt;On Thu, Jan 26, 2012 at 6:15 PM, Linus Pettersson &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:linus.pettersson@gmail.com" target="_blank"&gt;linus.pettersson@gmail.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt; &lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt; Hi&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I tested to remove the .order(...) part and indeed, the query time goes down to ~100ms. However, it doesn&amp;#39;t help to add indices, at least not as I did :)&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;add_index :categories, :name&lt;/div&gt;  &lt;div&gt;add_index :subcategories, :name&lt;/div&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Did some more testing and if I keep the .order... but don&amp;#39;t join the products table I get a query that runs at about ~55ms. So the bottleneck seems to be the products table.&lt;/div&gt;  &lt;div&gt;The query that I&amp;#39;m running looks like this:&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;div&gt;&lt;div&gt;Category.eager_load(:subcategories)&lt;/div&gt;&lt;div&gt;             .joins(&amp;quot;INNER JOIN products AS p ON &lt;a href="http://resellercategories.id" target="_blank"&gt;resellercategories.id&lt;/a&gt; = p.resellercategory_id&amp;quot;)&lt;/div&gt;  &lt;/div&gt;&lt;div&gt;&lt;div&gt;             .order(&amp;quot;&lt;a href="http://categories.name" target="_blank"&gt;categories.name&lt;/a&gt; ASC, &lt;a href="http://subcategories.name" target="_blank"&gt;subcategories.name&lt;/a&gt; ASC&amp;quot;)&lt;/div&gt;&lt;/div&gt; &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;(Skipping the gender here...)&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;What I have is Categories and Subcategories. They are related to each other through a Resellercategories table. Products are related to Resellercategories.&lt;/div&gt;  &lt;div&gt;So, the reason that I want to join the products as well is because I only want to show categories and subcategories that actually have some products (there are some empty categories/subcategories still).&lt;/div&gt;&lt;div&gt;&lt;br&gt;  &lt;/div&gt;&lt;div&gt;So the above query is what we came up with in another thread here in the group.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;- Maybe there is a better way to check if a category/subcategory has products without joining the entire products table?&lt;/div&gt;  &lt;/blockquote&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;br&gt;It is possible to add a :counter_cache , but then you need to make sure you&lt;br&gt;use the proper methods for each product that you add or remove from the&lt;br&gt;association.&lt;br&gt;&lt;br&gt;Alternative to the default counter cache (from Rails), you could build your own&lt;br&gt;  logic as in:&lt;br&gt;&lt;br&gt;* has_male_products&lt;br&gt;* ...&lt;br&gt;&lt;br&gt;changing you query to  ...&lt;br&gt;&lt;br&gt;Category.eager_load(:subcategories).&lt;br&gt;               where(:has_male_products =&amp;gt; true).&lt;br&gt;               order(...)&lt;br&gt;&lt;br&gt;Then you would need to set the cache on the appropriate categories in &lt;br&gt;  an after_save on the product you are creating/updating/deactivating/(deleting ?).&lt;br&gt;&lt;br&gt;Both ideas would probably be faster for querying, but certainly more&lt;br&gt; complex for making sure that cache is always correct.&lt;br&gt;&lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Sorry to reply to my own post.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;TL;DR  Is there pagination? Then a smaller set may return much faster.&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;I was thinking over my reply and may have forgotten a fundamental&lt;/div&gt;&lt;div&gt;aspect ... If you say 2200 categories, 8000 products.&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;How many entries does you query return ?&lt;/div&gt; &lt;div&gt;(replace .add with .count at the end).&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;How many do you need ?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;What happens when you add .limit(20) to your query ?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;By which &amp;quot;primary object&amp;quot; do you want to sort and paginate ?&lt;/div&gt; &lt;div&gt;(I will assume &amp;#39;Product&amp;#39; in the discussion below).&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;With the includes that are currently implemented, you may&lt;/div&gt;&lt;div&gt;have to redo the whole query into 2 qeuries ... &lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt; &lt;div&gt;1) for fetching the &amp;quot;primary objects&amp;quot;&lt;/div&gt;&lt;div&gt;(e.g. exactly 20 Products, no additional &amp;quot;has_many&amp;quot; data, because&lt;/div&gt;&lt;div&gt;that would increase the number of returned rows for 1 product and&lt;/div&gt;&lt;div&gt; make proper pagination in the database impossible; including&lt;/div&gt;&lt;div&gt;&amp;quot;belongs_to&amp;quot; here is no problem)&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;2) a second query for fetching eventual &amp;quot;has_many&amp;quot; data&lt;/div&gt;&lt;div&gt;on those 20 &amp;quot;primary products&amp;quot; (is that &amp;quot;Reification&amp;quot; ?)&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;If the performance problem could be solved by taking the&lt;/div&gt;&lt;div&gt;pagination into account, that would be a _much_ better&lt;/div&gt;&lt;div&gt;solution that building cache columns in this early phase&lt;/div&gt;&lt;div&gt;of your project.&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;HTH,&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Peter&lt;/div&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-6453191630006379292?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/6453191630006379292/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-optimizing-query_26.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/6453191630006379292'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/6453191630006379292'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-re-optimizing-query_26.html' title='Re: [Rails] Re: Optimizing query'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-3592692324385467421</id><published>2012-01-26T11:00:00.002-08:00</published><updated>2012-01-26T11:01:03.089-08:00</updated><title type='text'>[Rails] How to add multiple user create on single form using ActiveAdmin</title><content type='html'>&lt;p class="mobile-photo"&gt;&lt;a href="http://4.bp.blogspot.com/-iGT5SluMfK8/TyGi7_BtJ2I/AAAAAAAAAC8/EzkBWOiqOFs/s1600/customer-763090.png"&gt;&lt;img src="http://4.bp.blogspot.com/-iGT5SluMfK8/TyGi7_BtJ2I/AAAAAAAAAC8/EzkBWOiqOFs/s320/customer-763090.png"  border="0" alt="" id="BLOGGER_PHOTO_ID_5702017754642327394" /&gt;&lt;/a&gt;&lt;/p&gt;&lt;font face="tahoma,sans-serif"&gt;HI All,&lt;br&gt;&lt;br&gt;I am currently creating an Admin utility for courier management service, where I need to include a form to &lt;u&gt;submit two users(same model) on same form&lt;/u&gt;, I don&amp;#39;t know to implement exactly but duplicated the user form twice which is displaying the form twice on the browser but unable to save the both the users, listed below my Admin customer register file and attached the screen shot for your reference .&lt;br&gt;  &lt;br&gt;Also  want to know, how to add &lt;u&gt;additional business logics to admin&lt;/u&gt;, for example adding  print functionality for the single user on &amp;#39;view&amp;#39; page.&lt;br&gt;&lt;br&gt;&lt;span style="font-family:courier new,monospace"&gt;ActiveAdmin.register Customer do&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;  &lt;span style="font-family:courier new,monospace"&gt;form do |f|&lt;br&gt;    &lt;span style="background-color:rgb(255,204,0)"&gt;#User one&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;&lt;/span&gt;&lt;span style="font-family:courier new,monospace"&gt;     f.inputs &amp;quot;Sender Details&amp;quot; do&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;  &lt;span style="font-family:courier new,monospace"&gt;      f.input :name&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;&lt;span style="font-family:courier new,monospace"&gt;       f.input :email&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;  &lt;span style="font-family:courier new,monospace"&gt;       f.input :street&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;&lt;span style="font-family:courier new,monospace"&gt;       f.input :city&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;  &lt;span style="font-family:courier new,monospace"&gt;       f.input :state&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;&lt;span style="font-family:courier new,monospace"&gt;       f.input :pin&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;  &lt;span style="font-family:courier new,monospace"&gt;       f.input :customer_type,:as =&amp;gt; :select, :collection =&amp;gt; [[&amp;quot;Package Sender&amp;quot;, &amp;quot;Package Sender&amp;quot;], [&amp;quot;Package Receiver&amp;quot;,&amp;quot;Package Receiver&amp;quot;]]&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;  &lt;span style="font-family:courier new,monospace"&gt;    end&lt;br&gt;&lt;br&gt;&lt;/span&gt;&lt;/font&gt;&lt;font face="tahoma,sans-serif"&gt;&lt;span style="font-family:courier new,monospace"&gt;    &lt;span style="background-color:rgb(255,204,0)"&gt;#User two&lt;/span&gt;&lt;/span&gt;&lt;/font&gt;&lt;br style="font-family:courier new,monospace"&gt;  &lt;font face="tahoma,sans-serif"&gt;&lt;span style="font-family:courier new,monospace"&gt;&lt;/span&gt;&lt;span style="font-family:courier new,monospace"&gt;   f.inputs &amp;quot;Receiver Details&amp;quot; do&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;  &lt;span style="font-family:courier new,monospace"&gt;      f.input :name&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;&lt;span style="font-family:courier new,monospace"&gt;       f.input :email&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;  &lt;span style="font-family:courier new,monospace"&gt;       f.input :street&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;&lt;span style="font-family:courier new,monospace"&gt;       f.input :city&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;  &lt;span style="font-family:courier new,monospace"&gt;       f.input :state&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;&lt;span style="font-family:courier new,monospace"&gt;       f.input :pin&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;  &lt;span style="font-family:courier new,monospace"&gt;       f.input :customer_type,:as =&amp;gt; :select, :collection =&amp;gt; [[&amp;quot;Package Sender&amp;quot;, &amp;quot;Package Sender&amp;quot;], [&amp;quot;Package Receiver&amp;quot;,&amp;quot;Package Receiver&amp;quot;]]&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;  &lt;span style="font-family:courier new,monospace"&gt;    end&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;&lt;span style="font-family:courier new,monospace"&gt;&lt;br&gt;    f.inputs do&lt;/span&gt;&lt;span style="font-family:courier new,monospace"&gt;      &lt;br&gt;        f.has_many :packages do |p|&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;&lt;span style="font-family:courier new,monospace"&gt;       p.input :weight&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;&lt;span style="font-family:courier new,monospace"&gt;       p.input :amount&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;  &lt;span style="font-family:courier new,monospace"&gt;       p.input :received_date&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;&lt;span style="font-family:courier new,monospace"&gt;       p.input :amount&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;  &lt;span style="font-family:courier new,monospace"&gt;       end&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;&lt;span style="font-family:courier new,monospace"&gt;    end&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;&lt;span style="font-family:courier new,monospace"&gt;    f.buttons&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;  &lt;span style="font-family:courier new,monospace"&gt;  end&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;&lt;span style="font-family:courier new,monospace"&gt;end&lt;/span&gt;&lt;br style="font-family:courier new,monospace"&gt;&lt;br clear="all"&gt;  &lt;/font&gt;&lt;font face="tahoma, sans-serif"&gt;regards,&lt;br&gt;Loganathan&lt;/font&gt;&lt;br&gt;&lt;br&gt;&lt;br&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-3592692324385467421?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/3592692324385467421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-how-to-add-multiple-user-create.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/3592692324385467421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/3592692324385467421'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-how-to-add-multiple-user-create.html' title='[Rails] How to add multiple user create on single form using ActiveAdmin'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><media:thumbnail xmlns:media='http://search.yahoo.com/mrss/' url='http://4.bp.blogspot.com/-iGT5SluMfK8/TyGi7_BtJ2I/AAAAAAAAAC8/EzkBWOiqOFs/s72-c/customer-763090.png' height='72' width='72'/><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-335000839481512570</id><published>2012-01-26T11:00:00.001-08:00</published><updated>2012-01-26T11:00:41.810-08:00</updated><title type='text'>Re: [Rails] Devise - Sign up and sign in at same view</title><content type='html'>I also want to render a different page if the user is loged in.&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;How should I do that?&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;Oh, and all that with the root url&lt;/div&gt;&lt;div&gt;&lt;br&gt;&lt;/div&gt;&lt;div&gt;root :to =&amp;gt; &amp;#39;users/sessions/new&amp;#39;&lt;/div&gt; &lt;div&gt;&lt;br&gt;&lt;br&gt;&lt;div class="gmail_quote"&gt;On Thu, Jan 26, 2012 at 3:37 PM, Walter Lee Davis &lt;span dir="ltr"&gt;&amp;lt;&lt;a href="mailto:waltd@wdstudio.com"&gt;waltd@wdstudio.com&lt;/a&gt;&amp;gt;&lt;/span&gt; wrote:&lt;br&gt;&lt;blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"&gt; &lt;div class="im"&gt;&lt;br&gt; On Jan 26, 2012, at 11:26 AM, Rodrigo Ruiz wrote:&lt;br&gt; &lt;br&gt; &amp;gt; Do you think it is better than create a new view for it?&lt;br&gt; &lt;br&gt; &lt;/div&gt;I don&amp;#39;t know about better, it was expedient and didn&amp;#39;t create a third view file.&lt;br&gt; &lt;span class="HOEnZb"&gt;&lt;font color="#888888"&gt;&lt;br&gt; Walter&lt;br&gt; &lt;/font&gt;&lt;/span&gt;&lt;div class="HOEnZb"&gt;&lt;div class="h5"&gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; On Thu, Jan 26, 2012 at 1:09 PM, Walter Lee Davis &amp;lt;&lt;a href="mailto:waltd@wdstudio.com"&gt;waltd@wdstudio.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt; &amp;gt; I just did this. I let Devise generate the views (rake task, check the wiki) and then I modified the devise/sessions/new layout to combine sign in and sign up.&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; &amp;lt;%- title &amp;quot;Sign in or sign up&amp;quot; %&amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; &amp;lt;div class=&amp;quot;left half&amp;quot;&amp;gt;&lt;br&gt; &amp;gt;        &amp;lt;h3&amp;gt;Already registered?&amp;lt;/h3&amp;gt;&lt;br&gt; &amp;gt; &amp;lt;%= form_for(resource, :as =&amp;gt; resource_name, :url =&amp;gt; session_path(resource_name)) do |f| %&amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;p&amp;gt;&amp;lt;%= f.label :email %&amp;gt;&amp;lt;br /&amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;%= f.email_field :email %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;p&amp;gt;&amp;lt;%= f.label :password %&amp;gt;&amp;lt;br /&amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;%= f.password_field :password %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;% if devise_mapping.rememberable? -%&amp;gt;&lt;br&gt; &amp;gt;    &amp;lt;p&amp;gt;&amp;lt;%= f.check_box :remember_me %&amp;gt; &amp;lt;%= f.label :remember_me %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;% end -%&amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;  &amp;lt;p&amp;gt;&amp;lt;%= f.submit &amp;quot;Sign in&amp;quot; %&amp;gt;&amp;lt;/p&amp;gt;&lt;br&gt; &amp;gt; &amp;lt;% end %&amp;gt;&lt;br&gt; &amp;gt; &amp;lt;/div&amp;gt;&lt;br&gt; &amp;gt; &amp;lt;div class=&amp;quot;half left&amp;quot;&amp;gt;&lt;br&gt; &amp;gt;        &amp;lt;h3&amp;gt;Create an account&amp;lt;/h3&amp;gt;&lt;br&gt; &amp;gt;        &amp;lt;%= render :partial =&amp;gt; &amp;#39;devise/registrations/form&amp;#39; %&amp;gt;&lt;br&gt; &amp;gt; &amp;lt;/div&amp;gt;&lt;br&gt; &amp;gt; &amp;lt;div style=&amp;quot;clear:both&amp;quot;&amp;gt;&amp;lt;%= render :partial =&amp;gt; &amp;quot;devise/shared/links&amp;quot; %&amp;gt;&amp;lt;/div&amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; Walter&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; On Jan 26, 2012, at 9:58 AM, Rodrigo Ruiz wrote:&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; &amp;gt; Hi, I&amp;#39;d like to know what is the best way to do this. Right now I can see two options:&lt;br&gt; &amp;gt; &amp;gt; 1) create a new views at make a custom controller for registration controller to redirect to the right path&lt;br&gt; &amp;gt; &amp;gt; 2) change the registration views that devise generates for you (so, for example, the new view will have the session view inside it for the sign in too)&lt;br&gt; &amp;gt; &amp;gt;&lt;br&gt; &amp;gt; &amp;gt; Thanks in advance.&lt;br&gt; &amp;gt; &amp;gt;&lt;br&gt; &amp;gt; &amp;gt; --&lt;br&gt; &amp;gt; &amp;gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; &amp;gt; &amp;gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; &amp;gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; &amp;gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; --&lt;br&gt; &amp;gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; &amp;gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt;&lt;br&gt; &amp;gt; --&lt;br&gt; &amp;gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; &amp;gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; &amp;gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &lt;br&gt; --&lt;br&gt; You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt; To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt; To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt; For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en" target="_blank"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;br&gt; &lt;br&gt; &lt;/div&gt;&lt;/div&gt;&lt;/blockquote&gt;&lt;/div&gt;&lt;br&gt;&lt;/div&gt;  &lt;p&gt;&lt;/p&gt;  -- &lt;br /&gt; You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.&lt;br /&gt; To post to this group, send email to rubyonrails-talk@googlegroups.com.&lt;br /&gt; To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.&lt;br /&gt;  For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.&lt;br /&gt;   &lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-335000839481512570?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/335000839481512570/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-devise-sign-up-and-sign-in-at_9453.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/335000839481512570'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/335000839481512570'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/re-rails-devise-sign-up-and-sign-in-at_9453.html' title='Re: [Rails] Devise - Sign up and sign in at same view'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-5610267427499285140</id><published>2012-01-26T10:38:00.000-08:00</published><updated>2012-01-27T01:52:32.907-08:00</updated><title type='text'>[Rails] Can't access polymorphic associated model's attributes</title><content type='html'>Hi!!&lt;p&gt;I have a few models that use a Photo polymorphic model. It&amp;#39;s all good&lt;br&gt;and fine for saving or accessing the photos&amp;#39; attributes via console or&lt;br&gt;inspect or logger, but if I try to call them directly in the view&lt;br&gt;with, for example, @banner.photo.file, it returns a undefined method&lt;br&gt;&amp;#39;file&amp;#39; etc for nil:Nil&lt;p&gt;Photos are being uploaded via paperclip and all models are set with&lt;br&gt;has_one :photo, :as =&amp;gt; :imageable and&lt;br&gt;accepts_nested_attributes_for :photo, :allow_destroy =&amp;gt; true. And the&lt;br&gt;Photo model is set as belongs_to :imageable, :polymorphic =&amp;gt; true and&lt;br&gt;has_attached_file :file.&lt;p&gt;These are the columns for the Photo model:&lt;p&gt;id:integer&lt;br&gt;file:string&lt;br&gt;imageable_id:integer&lt;br&gt;imageable_type:string&lt;br&gt;file_file_name:string&lt;br&gt;file_content_type:string&lt;br&gt;file_file_size:integer&lt;br&gt;(besides created_at etc)&lt;p&gt;In my view:&lt;p&gt;&amp;lt;% @banners.each do |b| %&amp;gt;&lt;br&gt;  &amp;lt;%= b.photo.inspect %&amp;gt;&amp;lt;br /&amp;gt;&lt;br&gt;&amp;lt;% end %&amp;gt;&lt;br&gt;You can see the inspect at &lt;a href="http://bdyvu2.hospedagemweb.net/"&gt;http://bdyvu2.hospedagemweb.net/&lt;/a&gt;&lt;p&gt;Many thanks in advance!! Going out of my mind here!! (been at it for&lt;br&gt;days!)&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsubscribe@googlegroups.com&lt;/a&gt;.&lt;br&gt;For more options, visit this group at &lt;a href="http://groups.google.com/group/rubyonrails-talk?hl=en"&gt;http://groups.google.com/group/rubyonrails-talk?hl=en&lt;/a&gt;.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/4056961807189001841-5610267427499285140?l=netrubyonrails.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://netrubyonrails.blogspot.com/feeds/5610267427499285140/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-cant-access-polymorphic.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/5610267427499285140'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/4056961807189001841/posts/default/5610267427499285140'/><link rel='alternate' type='text/html' href='http://netrubyonrails.blogspot.com/2012/01/rails-cant-access-polymorphic.html' title='[Rails] Can&apos;t access polymorphic associated model&apos;s attributes'/><author><name>Ruby on Rails</name><uri>http://www.blogger.com/profile/14748132668734760482</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-4056961807189001841.post-2551893308891003380</id><published>2012-01-26T10:37:00.000-08:00</published><updated>2012-01-27T01:52:27.706-08:00</updated><title type='text'>[Rails] Re: :method =&gt; :delete not working</title><content type='html'>What this probably means is that the javascript that handles your&lt;br&gt;delete links is not being loaded.&lt;p&gt;What version of Rails is this? I hit this issue a couple times with&lt;br&gt;early iterations of Rails 3 before the asset pipeline kicked in.&lt;p&gt;- Brian Haberer&lt;p&gt;On Jan 26, 12:19&amp;#160;am, Daisy Di &amp;lt;&lt;a href="mailto:li...@ruby-forum.com"&gt;li...@ruby-forum.com&lt;/a&gt;&amp;gt; wrote:&lt;br&gt;&amp;gt; Dear All,&lt;br&gt;&amp;gt; i want to delect a record with the code&lt;br&gt;&amp;gt; &amp;#160;&amp;lt;% @reservations.each do |reservation| %&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;lt;tr&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;lt;td&amp;gt;00000&amp;lt;%= &lt;a href="http://reservation.id"&gt;reservation.id&lt;/a&gt;%&amp;gt;&amp;lt;/td&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;lt;td&amp;gt;&amp;lt;%= reservation.item_desc %&amp;gt;&amp;lt;/td&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;lt;td&amp;gt;&amp;lt;%= reservation.item_desc %&amp;gt;&amp;lt;/td&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;lt;td&amp;gt;&amp;lt;%= reservation.created_on %&amp;gt;&amp;lt;/td&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;lt;td&amp;gt;&amp;lt;%= reservation.valid_until %&amp;gt;&amp;lt;/td&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;lt;td&amp;gt;&amp;lt;%= link_to &amp;#39;Destroy&amp;#39;,reservation, :confirm =&amp;gt; &amp;#39;Are you&lt;br&gt;&amp;gt; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160; &amp;#160;sure?&amp;#39; ,:method =&amp;gt; :delete%&amp;gt;&amp;lt;/td&amp;gt;&lt;br&gt;&amp;gt; &amp;#160; &amp;lt;/tr&amp;gt;&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; but when i click the link ,it will redirect to the show page ,it means&lt;br&gt;&amp;gt; that the show action is invoked,acturally i want to delete it not show&lt;br&gt;&amp;gt; the details, so ,i think the :method=&amp;gt;:delete doesnt work, i search a&lt;br&gt;&amp;gt; lot to find the solution,some advise to add &amp;lt;%= javascript_include_tag&lt;br&gt;&amp;gt; :all %&amp;gt; to the layout,but it still doesnt work, anyone can help me ?&lt;br&gt;&amp;gt; Thanks very much.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; PS:&lt;a href="http://stackoverflow.com/questions/1317448/how-to-create-a-delete-lin...http://stackoverflow.com/questions/1317448/how-to-create-a-delete-lin."&gt;http://stackoverflow.com/questions/1317448/how-to-create-a-delete-lin...http://stackoverflow.com/questions/1317448/how-to-create-a-delete-lin.&lt;/a&gt;..&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; these two links provide the solution about this kind of problem,i tried,&lt;br&gt;&amp;gt; but it doesnt work.&lt;br&gt;&amp;gt;&lt;br&gt;&amp;gt; --&lt;br&gt;&amp;gt; Posted viahttp://&lt;a href="http://www.ruby-forum.com/"&gt;www.ruby-forum.com/&lt;/a&gt;.&lt;p&gt;-- &lt;br&gt;You received this message because you are subscribed to the Google Groups &amp;quot;Ruby on Rails: Talk&amp;quot; group.&lt;br&gt;To post to this group, send email to &lt;a href="mailto:rubyonrails-talk@googlegroups.com"&gt;rubyonrails-talk@googlegroups.com&lt;/a&gt;.&lt;br&gt;To unsubscribe from this group, send email to &lt;a href="mailto:rubyonrails-talk%2Bunsubscribe@googlegroups.com"&gt;rubyonrails-talk+unsu
