# Rails

**URL:** https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=758

[Latest](https://www.ruby-forum.com/latest.md) · [Categories](https://www.ruby-forum.com/categories.md) · [Tags](https://www.ruby-forum.com/tags.md)

**Page:** 759

---

## [Validation in attachment\_fu](https://www.ruby-forum.com/t/validation-in-attachment-fu/179648)

<div class="topic-metadata">

**Author:** [@srikanth\_j](https://www.ruby-forum.com/u/srikanth_j)\
**Replies:** 1\
**Last updated:** [December 1, 2009, 7:46am UTC](https://www.ruby-forum.com/t/validation-in-attachment-fu/179648 "2009-12-01T07:46:33Z")

</div>

Hi, I have a doubt that how to validate in attachment\_fu when 2 different file formats(Image/Document) are used. I have a model named Image, Documents , class Images \< ActiveRecord::Base has\_many :attachments, :as =\>…

---

## [Reading and writing the html file](https://www.ruby-forum.com/t/reading-and-writing-the-html-file/179644)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 0\
**Last updated:** [December 1, 2009, 6:59am UTC](https://www.ruby-forum.com/t/reading-and-writing-the-html-file/179644 "2009-12-01T06:59:14Z")

</div>

Dear all, the below problem makes me worse. actually i read html file. @file\_path = d:/temp/History/regst.html @content = File.read ("#@file\_path}") i dispaly in my view like \<%=@content%\> this causes style issues …

---

## [How to display file contents from html file](https://www.ruby-forum.com/t/how-to-display-file-contents-from-html-file/179643)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 5\
**Last updated:** [December 1, 2009, 6:53am UTC](https://www.ruby-forum.com/t/how-to-display-file-contents-from-html-file/179643 "2009-12-01T06:53:26Z")

</div>

I want to get file contents from html file after getting i want to display it in the view page.any sample any helps Thanks

---

## [Replace the default home page](https://www.ruby-forum.com/t/replace-the-default-home-page/171872)

<div class="topic-metadata">

**Author:** [@vikas](https://www.ruby-forum.com/u/vikas)\
**Replies:** 8\
**Last updated:** [December 1, 2009, 6:50am UTC](https://www.ruby-forum.com/t/replace-the-default-home-page/171872 "2009-12-01T06:50:45Z")

</div>

How to replace the default home page. I tried map.root but it didn’t work. I should request to please provide me ways.

---

## [Named scope help](https://www.ruby-forum.com/t/named-scope-help/179610)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 2\
**Last updated:** [December 1, 2009, 6:49am UTC](https://www.ruby-forum.com/t/named-scope-help/179610 "2009-12-01T06:49:21Z")

</div>

Hi guys i am trying to figure out a named scope for Time.now I have this so far in my application model named\_scope :on\_time, lambda { |time| { :conditions =\> \[’(time = ?)’, Time.now\] } } then i will call it by using…

---

## [Form and split text](https://www.ruby-forum.com/t/form-and-split-text/179618)

<div class="topic-metadata">

**Author:** [@duffbeer](https://www.ruby-forum.com/u/duffbeer)\
**Replies:** 3\
**Last updated:** [December 1, 2009, 6:44am UTC](https://www.ruby-forum.com/t/form-and-split-text/179618 "2009-12-01T06:44:58Z")

</div>

Hi, I would like to split a text stock in my database and show it in different textbox: For example: my text is like this : server1;server2;server3;server4server5 When a user wants to edit the object text I would li…

---

## [Sorting Out My Countries](https://www.ruby-forum.com/t/sorting-out-my-countries/179613)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 1\
**Last updated:** [November 30, 2009, 10:59pm UTC](https://www.ruby-forum.com/t/sorting-out-my-countries/179613 "2009-11-30T22:59:27Z")

</div>

I’ve got a database structure which has this sort of thing. A Resort is in a particular country. Presently the country is stored in a field in the Resort model, Resort.country (a string). I want to do this properly a…

---

## [Trouble installing Ruby On Rails mysql gem in Windows XP](https://www.ruby-forum.com/t/trouble-installing-ruby-on-rails-mysql-gem-in-windows-xp/179592)

<div class="topic-metadata">

**Author:** [@rottenrobbie](https://www.ruby-forum.com/u/rottenrobbie)\
**Replies:** 2\
**Last updated:** [November 30, 2009, 10:47pm UTC](https://www.ruby-forum.com/t/trouble-installing-ruby-on-rails-mysql-gem-in-windows-xp/179592 "2009-11-30T22:47:31Z")

</div>

I have Ruby On Rails installed okay, but I can’t seem to get the mysql gem installed properly. I have MySQL 5.1 installed and the following ruby -v ruby 1.8.6 (2008-08-11 patchlevel 287) \[i386-mswin32\] gem -v 1.3.5 …

---

## [Index to show lost javascript](https://www.ruby-forum.com/t/index-to-show-lost-javascript/179574)

<div class="topic-metadata">

**Author:** [@dmcclean](https://www.ruby-forum.com/u/dmcclean)\
**Replies:** 7\
**Last updated:** [November 30, 2009, 7:24pm UTC](https://www.ruby-forum.com/t/index-to-show-lost-javascript/179574 "2009-11-30T19:24:15Z")

</div>

I am testing a local copy of my website using mongrel trying to introduce a scriptaculous multi-level drop down menu. the menu is a partial that is loaded into every layout I have many pages with their individual layo…

---

## [Help? Unitialized constant NameError in Model](https://www.ruby-forum.com/t/help-unitialized-constant-nameerror-in-model/179436)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 2\
**Last updated:** [November 30, 2009, 6:52pm UTC](https://www.ruby-forum.com/t/help-unitialized-constant-nameerror-in-model/179436 "2009-11-30T18:52:49Z")

</div>

Hello, I am totally stumped on this one. I have two classes sitting in the lib folder under the main application directory. For now, those two classes are identical except for the file name (attribute.rb and group.r…

---

## [mySQL connection error (for the love of sweet jebus)](https://www.ruby-forum.com/t/mysql-connection-error-for-the-love-of-sweet-jebus/179601)

<div class="topic-metadata">

**Author:** [@lyh](https://www.ruby-forum.com/u/lyh)\
**Replies:** 3\
**Last updated:** [November 30, 2009, 5:54pm UTC](https://www.ruby-forum.com/t/mysql-connection-error-for-the-love-of-sweet-jebus/179601 "2009-11-30T17:54:05Z")

</div>

This will come off as an incredibly noob question so please bear with me. I’ve “installed” (i.e. extracted and copied) Instant Rails 1.7 on my Windows XP machine for the purposes of running through O’Reilly’s RoR tut…

---

## [Will\_paginate after POST](https://www.ruby-forum.com/t/will-paginate-after-post/179611)

<div class="topic-metadata">

**Author:** [@kinunt](https://www.ruby-forum.com/u/kinunt)\
**Replies:** 1\
**Last updated:** [November 30, 2009, 1:46pm UTC](https://www.ruby-forum.com/t/will-paginate-after-post/179611 "2009-11-30T13:46:30Z")

</div>

Hi, I’m using will\_paginate in order to paginate the results of a search. My problem is that when I click Next, will\_paginate “forgets” what I was searching and shows the results as is nothing were searched. In other …

---

## [Creating a Shopfy kind of a website - pls help](https://www.ruby-forum.com/t/creating-a-shopfy-kind-of-a-website-pls-help/179506)

<div class="topic-metadata">

**Author:** [@sameera](https://www.ruby-forum.com/u/sameera)\
**Replies:** 3\
**Last updated:** [November 30, 2009, 12:10pm UTC](https://www.ruby-forum.com/t/creating-a-shopfy-kind-of-a-website-pls-help/179506 "2009-11-30T12:10:17Z")

</div>

Hi All, I want to create a site like shopfy, where I can hosted it in a central place merchants can create their own stores, But I want the following functionalities to happen, I should be able to give each merchant …

---

## [Search form in custom method in RESTful](https://www.ruby-forum.com/t/search-form-in-custom-method-in-restful/179499)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 2\
**Last updated:** [November 30, 2009, 9:51am UTC](https://www.ruby-forum.com/t/search-form-in-custom-method-in-restful/179499 "2009-11-30T09:51:58Z")

</div>

I have a custom method in my controller for doing a search. How do I access that with a form\_for using restful?

---

## [Gem install rails](https://www.ruby-forum.com/t/gem-install-rails/135784)

<div class="topic-metadata">

**Author:** [@acras](https://www.ruby-forum.com/u/acras)\
**Replies:** 10\
**Last updated:** [November 30, 2009, 5:43am UTC](https://www.ruby-forum.com/t/gem-install-rails/135784 "2009-11-30T05:43:15Z")

</div>

maybe this question was ment to be in a ruby specific group but… I am not getting to specify a version for my gems… C:\\Windows\\System32\>gem install rails --version=1.1.6 Updating metadata for 241 gems from http://gems…

---

## [Google-appengine environment](https://www.ruby-forum.com/t/google-appengine-environment/179591)

<div class="topic-metadata">

**Author:** [@james-calivar](https://www.ruby-forum.com/u/james-calivar)\
**Replies:** 0\
**Last updated:** [November 30, 2009, 12:39am UTC](https://www.ruby-forum.com/t/google-appengine-environment/179591 "2009-11-30T00:39:48Z")

</div>

Someone who is using the google-appengine gem, please give some tips on getting setup. If you get this working, please let us know what the missing setups are. The directions for rails-primer expect that appcfg.rb i…

---

## [Sending 2 different e-mail verification](https://www.ruby-forum.com/t/sending-2-different-e-mail-verification/179568)

<div class="topic-metadata">

**Author:** [@hugues](https://www.ruby-forum.com/u/hugues)\
**Replies:** 2\
**Last updated:** [November 29, 2009, 9:30pm UTC](https://www.ruby-forum.com/t/sending-2-different-e-mail-verification/179568 "2009-11-29T21:30:00Z")

</div>

Hello there, I need to send two different e-mail verification to users that subscribe to our website. Basically there is 2 kind of subscriptions : Beta Tester Program Sign Up Newsletter Two type of users within Use…

---

## [Having some questions about migrations](https://www.ruby-forum.com/t/having-some-questions-about-migrations/179546)

<div class="topic-metadata">

**Author:** [@alexanderl](https://www.ruby-forum.com/u/alexanderl)\
**Replies:** 6\
**Last updated:** [November 29, 2009, 6:54pm UTC](https://www.ruby-forum.com/t/having-some-questions-about-migrations/179546 "2009-11-29T18:54:05Z")

</div>

Hello! I have just started ruby on rails and i think it’s really funny. At the moment i am building a project just for fun, where i can post links to different websites, in different categories. For example i can add …

---

## [CGI, unescape HTML, sanitize rendering & views](https://www.ruby-forum.com/t/cgi-unescape-html-sanitize-rendering-views/179563)

<div class="topic-metadata">

**Author:** [@jeanluca](https://www.ruby-forum.com/u/jeanluca)\
**Replies:** 5\
**Last updated:** [November 29, 2009, 6:44pm UTC](https://www.ruby-forum.com/t/cgi-unescape-html-sanitize-rendering-views/179563 "2009-11-29T18:44:24Z")

</div>

Hi, I have an action which calls amazon API for customer reviews. His view render the content this way: \<%= CGI.unescapeHTML review\[:content\]%\> the output is a mix between escaped text and few html tags like the foll…

---

## [Validates\_each magic: How?](https://www.ruby-forum.com/t/validates-each-magic-how/179580)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 3\
**Last updated:** [November 29, 2009, 6:37pm UTC](https://www.ruby-forum.com/t/validates-each-magic-how/179580 "2009-11-29T18:37:49Z")

</div>

I have an attribute :x in a form validates\_each manages to be able to get to the value of :x in the form. (Source for validates\_each from http://api.rubyonrails.org/) # File vendor/rails/activerecord/lib/active\_recor…

---

## [Mikel's mail gem with Gmail](https://www.ruby-forum.com/t/mikels-mail-gem-with-gmail/179585)

<div class="topic-metadata">

**Author:** [@artchrst](https://www.ruby-forum.com/u/artchrst)\
**Replies:** 0\
**Last updated:** [November 29, 2009, 4:50pm UTC](https://www.ruby-forum.com/t/mikels-mail-gem-with-gmail/179585 "2009-11-29T16:50:55Z")

</div>

I am using rails 2.3.4 and ruby 1.8.7 Setting up the SMTP via Gmail but failed: ActionMailer::Base.smtp\_settings = { :address =\> “smtp.gmail.com”, :port =\> 587, :authentication =\> :plain, :enable\_starttls\_auto =\> t…

---

## [Mass Emailing in Rails](https://www.ruby-forum.com/t/mass-emailing-in-rails/105529)

<div class="topic-metadata">

**Author:** [@newmonarch](https://www.ruby-forum.com/u/newmonarch)\
**Replies:** 8\
**Last updated:** [November 28, 2009, 8:54pm UTC](https://www.ruby-forum.com/t/mass-emailing-in-rails/105529 "2009-11-28T20:54:17Z")

</div>

I’ve seen some discussions already in the mailing list about sending Mass Emails in Rails, but they’ve been pretty unsatisfying. I’m working with a non-profit with a low budget. They’d like to save money on email com…

---

## [Errno::EPROTO --- Protocol error Errno::EPROTO rails](https://www.ruby-forum.com/t/errno-eproto-protocol-error-errno-eproto-rails/171009)

<div class="topic-metadata">

**Author:** [@bencahen](https://www.ruby-forum.com/u/bencahen)\
**Replies:** 3\
**Last updated:** [November 28, 2009, 3:09pm UTC](https://www.ruby-forum.com/t/errno-eproto-protocol-error-errno-eproto-rails/171009 "2009-11-28T15:09:13Z")

</div>

Hi All, First post so be nice. I keep receiving this strange error that I can find almost no information about in other threads. Occasionally, I’ll receive an Errno:PROTO error when I navigate to a page on my site wh…

---

## [Feed normalizer and Atom](https://www.ruby-forum.com/t/feed-normalizer-and-atom/149335)

<div class="topic-metadata">

**Author:** [@kelleysislander](https://www.ruby-forum.com/u/kelleysislander)\
**Replies:** 5\
**Last updated:** [November 28, 2009, 9:32am UTC](https://www.ruby-forum.com/t/feed-normalizer-and-atom/149335 "2009-11-28T09:32:01Z")

</div>

Hi all - I can’t find any feed normalizer groups, so I’m trying here. In trying to parse an Atom feed with feed normalizer 1.5.1 and Ruby 1.8.7-p72, I get this error: feed = FeedNormalizer::FeedNormalizer.parse ope…

---

## [How to "encrypt" a string to an integer in a model?](https://www.ruby-forum.com/t/how-to-encrypt-a-string-to-an-integer-in-a-model/179547)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 4\
**Last updated:** [November 28, 2009, 3:11am UTC](https://www.ruby-forum.com/t/how-to-encrypt-a-string-to-an-integer-in-a-model/179547 "2009-11-28T03:11:35Z")

</div>

Newb here. I want to create a model/form in which a user enters a string, the string gets converted to an integer. The string/integer conversion is reversible. Don’t ask how… it just is. I want to store the result …

---

## [Simple Activity Stream](https://www.ruby-forum.com/t/simple-activity-stream/179543)

<div class="topic-metadata">

**Author:** [@bdmcnitt](https://www.ruby-forum.com/u/bdmcnitt)\
**Replies:** 3\
**Last updated:** [November 27, 2009, 11:15pm UTC](https://www.ruby-forum.com/t/simple-activity-stream/179543 "2009-11-27T23:15:51Z")

</div>

Hey all, I was wondering if anyone in here has an easy way to make a simple activity stream. I understand the concepts around it, but haven’t been able to get my code right. From what I understand, all the stream is a …

---

## [Map.rewrite problem - remap a file request to a url](https://www.ruby-forum.com/t/map-rewrite-problem-remap-a-file-request-to-a-url/179535)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 1\
**Last updated:** [November 27, 2009, 3:12pm UTC](https://www.ruby-forum.com/t/map-rewrite-problem-remap-a-file-request-to-a-url/179535 "2009-11-27T15:12:21Z")

</div>

I have a rewrite i need to do. I have a flash app that’s asking for a file with this location: /millionaire/millionaire\_quizzes/123/data/questions.XML Instead, i want it to load the xml which is generated for thi…

---

## [Question about has\_many :through association](https://www.ruby-forum.com/t/question-about-has-many-through-association/179536)

<div class="topic-metadata">

**Author:** [@polarapfel](https://www.ruby-forum.com/u/polarapfel)\
**Replies:** 0\
**Last updated:** [November 27, 2009, 2:52pm UTC](https://www.ruby-forum.com/t/question-about-has-many-through-association/179536 "2009-11-27T14:52:46Z")

</div>

Hi, I have two models called Group and User. A group shall have a leader and several members, whereas leader and members are of type User. I am using the following associations: class Group \< ActiveRecord::Base has\_…

---

## [Www.address.com/data?number=1&number2&number3](https://www.ruby-forum.com/t/www-address-com-data-number-1-number2-number3/179427)

<div class="topic-metadata">

**Author:** [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Replies:** 7\
**Last updated:** [November 27, 2009, 2:37pm UTC](https://www.ruby-forum.com/t/www-address-com-data-number-1-number2-number3/179427 "2009-11-27T14:37:37Z")

</div>

Hi, Any ideas how to get the the numbers from the url in the subject? That is sent as a POST but all the parameters have the same name. I can only get the last number of the params. What’s the trick? Thanks.

---

## [Trouble installing acts\_as\_taggable\_on\_steroids](https://www.ruby-forum.com/t/trouble-installing-acts-as-taggable-on-steroids/179334)

<div class="topic-metadata">

**Author:** [@ahead](https://www.ruby-forum.com/u/ahead)\
**Replies:** 2\
**Last updated:** [November 27, 2009, 12:49pm UTC](https://www.ruby-forum.com/t/trouble-installing-acts-as-taggable-on-steroids/179334 "2009-11-27T12:49:53Z")

</div>

Hi, I get this error when trying to install the plugin. Can anybody help? $ ruby -d script/plugin install git://github.com/jviney/acts\_as\_taggable\_on\_steroids.git Exception LoadError' at /Library/Ruby/Site/1.8/rubyge…

[Previous page](https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=757)

[Next page](https://www.ruby-forum.com/c/ruby-on-rails/6.md?page=759)
