# Rails

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

[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:** 915

---

## [Url encryption](https://www.ruby-forum.com/t/url-encryption/168823)

<div class="topic-metadata">

**Author:** [@chandramit](https://www.ruby-forum.com/u/chandramit)\
**Replies:** 0\
**Last updated:** [May 26, 2009, 1:16pm UTC](https://www.ruby-forum.com/t/url-encryption/168823 "2009-05-26T13:16:46Z")

</div>

Hi I need to pass params through url.which should be done in an encrypted way … is there any methods to solve this… Example: http://example.com/controller/4

---

## [Contingent selects - AJAX style](https://www.ruby-forum.com/t/contingent-selects-ajax-style/168821)

<div class="topic-metadata">

**Author:** [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Replies:** 0\
**Last updated:** [May 26, 2009, 12:36pm UTC](https://www.ruby-forum.com/t/contingent-selects-ajax-style/168821 "2009-05-26T12:36:38Z")

</div>

If I have an html.erb file, wherein one select box’s selections displayed are contingent upon the value chosen in another select box (for example, if I have a state select box, contingent on the country showm in the c…

---

## [Deploying Rails project](https://www.ruby-forum.com/t/deploying-rails-project/168748)

<div class="topic-metadata">

**Author:** [@sirfAK](https://www.ruby-forum.com/u/sirfAK)\
**Replies:** 1\
**Last updated:** [May 26, 2009, 11:40am UTC](https://www.ruby-forum.com/t/deploying-rails-project/168748 "2009-05-26T11:40:54Z")

</div>

Hello Everyone, I am new into web developemnt and want to use Ruby on Rails for my project.Recently I have bought WebHosting Space with Linux OS and Apache Server but it seems they do not provide Rails hosting. Is it…

---

## [Path\_prefix for all routes](https://www.ruby-forum.com/t/path-prefix-for-all-routes/168812)

<div class="topic-metadata">

**Author:** [@milandobrota](https://www.ruby-forum.com/u/milandobrota)\
**Replies:** 0\
**Last updated:** [May 26, 2009, 10:47am UTC](https://www.ruby-forum.com/t/path-prefix-for-all-routes/168812 "2009-05-26T10:47:08Z")

</div>

I’m deploying RoR application on Hostgator (shared hosting). I want my application address to be www.domain.com/foo/bar/ Foo is the folder and bar is the symlink that points to the public folder of my rails applicatio…

---

## [Rails & Red5](https://www.ruby-forum.com/t/rails-red5/154667)

<div class="topic-metadata">

**Author:** [@enzor](https://www.ruby-forum.com/u/enzor)\
**Replies:** 3\
**Last updated:** [May 26, 2009, 10:08am UTC](https://www.ruby-forum.com/t/rails-red5/154667 "2009-05-26T10:08:10Z")

</div>

Hi there guys! I just was wondering if out there exists some plugin that would permit to rails to interact directly with the flash streaming server Red5 for purpose of video collaboration! I searched around the net a…

---

## [Find :include causing n+1 queires](https://www.ruby-forum.com/t/find-include-causing-n-1-queires/168799)

<div class="topic-metadata">

**Author:** [@timhunter](https://www.ruby-forum.com/u/timhunter)\
**Replies:** 1\
**Last updated:** [May 26, 2009, 9:36am UTC](https://www.ruby-forum.com/t/find-include-causing-n-1-queires/168799 "2009-05-26T09:36:28Z")

</div>

Hey guys, I just noticed one of my find calls is creating n+1 queries to be run. The find looks like this: Class.find(:all, :include =\> \[:user, :users\], :conditions =\> {:id=\> ids}, :order =\> order ) Th…

---

## [How does form\_for and validate\_presence\_of work hand in hand](https://www.ruby-forum.com/t/how-does-form-for-and-validate-presence-of-work-hand-in-hand/168797)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 1\
**Last updated:** [May 26, 2009, 9:31am UTC](https://www.ruby-forum.com/t/how-does-form-for-and-validate-presence-of-work-hand-in-hand/168797 "2009-05-26T09:31:12Z")

</div>

when we have validate\_presence\_of :name in the model and then when we put in the create action that we re-render ‘new’, then the form\_for will populate the fields, and error\_messages\_for ‘story’ will have the correct …

---

## [How show message in text file on web page?](https://www.ruby-forum.com/t/how-show-message-in-text-file-on-web-page/168805)

<div class="topic-metadata">

**Author:** [@ple\_mazako](https://www.ruby-forum.com/u/ple_mazako)\
**Replies:** 0\
**Last updated:** [May 26, 2009, 9:23am UTC](https://www.ruby-forum.com/t/how-show-message-in-text-file-on-web-page/168805 "2009-05-26T09:23:35Z")

</div>

Hello, i want to read text file and then want to show message in text file on web page.pls, introduce me how i can do. now i cant read file but i don’t know how write script on rhtml for show the massage in text file…

---

## [Rake db:schema:dump doesn't produce composite primary key instructions](https://www.ruby-forum.com/t/rake-dbdump-doesnt-produce-composite-primary-key-instructions/168800)

<div class="topic-metadata">

**Author:** [@timhunter](https://www.ruby-forum.com/u/timhunter)\
**Replies:** 0\
**Last updated:** [May 26, 2009, 7:42am UTC](https://www.ruby-forum.com/t/rake-dbdump-doesnt-produce-composite-primary-key-instructions/168800 "2009-05-26T07:42:56Z")

</div>

Hey there, I’ve adjusted some of my many to many join tables recently to use a composite primary key based on the id’s in the two columns - instead of using a surrogate key. I just did a db:schema:dump, and it looks …

---

## [Test to check that before filter is being run?](https://www.ruby-forum.com/t/test-to-check-that-before-filter-is-being-run/108420)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 2\
**Last updated:** [May 26, 2009, 5:50am UTC](https://www.ruby-forum.com/t/test-to-check-that-before-filter-is-being-run/108420 "2009-05-26T05:50:08Z")

</div>

Hi, On certain controllers I have various before filters, is there anything I can put in my functional tests to make sure these before filters are run? Thanks, Mark

---

## [Newbie question: Custom Validations](https://www.ruby-forum.com/t/newbie-question-custom-validations/168459)

<div class="topic-metadata">

**Author:** [@cardinallijr](https://www.ruby-forum.com/u/cardinallijr)\
**Replies:** 3\
**Last updated:** [May 26, 2009, 5:48am UTC](https://www.ruby-forum.com/t/newbie-question-custom-validations/168459 "2009-05-26T05:48:23Z")

</div>

Hi all, I’m trying to validate my model through equal values occuring a number of times on the same column. I think that I have to use a custom validation, right? I tried to use it but had no success. For example, th…

---

## [How upload file](https://www.ruby-forum.com/t/how-upload-file/168725)

<div class="topic-metadata">

**Author:** [@ple\_mazako](https://www.ruby-forum.com/u/ple_mazako)\
**Replies:** 2\
**Last updated:** [May 26, 2009, 3:46am UTC](https://www.ruby-forum.com/t/how-upload-file/168725 "2009-05-26T03:46:08Z")

</div>

Hello, i wonder about upload file in rails because i want user can browse the file . what fuction that i use? and please explain about upload file to me because i never do it. thank you

---

## [SSL testing on localhost - segfaults aplenty!](https://www.ruby-forum.com/t/ssl-testing-on-localhost-segfaults-aplenty/168361)

<div class="topic-metadata">

**Author:** [@zamo](https://www.ruby-forum.com/u/zamo)\
**Replies:** 3\
**Last updated:** [May 26, 2009, 3:19am UTC](https://www.ruby-forum.com/t/ssl-testing-on-localhost-segfaults-aplenty/168361 "2009-05-26T03:19:07Z")

</div>

Hello, I’ve followed the tutorial @ http://weeatbricks.com/2007/10/31/how-to-use-a-rails-app-with-https/ to setup SSL on localhost, wanting to use https for logging in and such. Using the method described above I get…

---

## [Mongrel error on read file after upload](https://www.ruby-forum.com/t/mongrel-error-on-read-file-after-upload/168557)

<div class="topic-metadata">

**Author:** [@jnicholson](https://www.ruby-forum.com/u/jnicholson)\
**Replies:** 3\
**Last updated:** [May 26, 2009, 3:13am UTC](https://www.ruby-forum.com/t/mongrel-error-on-read-file-after-upload/168557 "2009-05-26T03:13:57Z")

</div>

I have a java client that uploads files to a web server. The problem is that whenever the client uploads a file, and mongrel saves it in a temporary file (in this case, mongrel13800-0), mongrel can’t read the file re…

---

## [I18n and Javascript](https://www.ruby-forum.com/t/i18n-and-javascript/168767)

<div class="topic-metadata">

**Author:** [@hade](https://www.ruby-forum.com/u/hade)\
**Replies:** 4\
**Last updated:** [May 26, 2009, 2:43am UTC](https://www.ruby-forum.com/t/i18n-and-javascript/168767 "2009-05-26T02:43:59Z")

</div>

Hi, I have quite many pure javascript files (\*.js) in my rails project. Unfortunately some of those files contain strings to be translated. I have just started using I18n in rails. I’d like to hear your feedback abou…

---

## [Looping through java hashmap from ruby through rjb](https://www.ruby-forum.com/t/looping-through-java-hashmap-from-ruby-through-rjb/168785)

<div class="topic-metadata">

**Author:** [@drsharp](https://www.ruby-forum.com/u/drsharp)\
**Replies:** 2\
**Last updated:** [May 26, 2009, 1:29am UTC](https://www.ruby-forum.com/t/looping-through-java-hashmap-from-ruby-through-rjb/168785 "2009-05-26T01:29:26Z")

</div>

Greetings. I am trying to list all keys in a java.util.HashMap field. The Java code to do this looks like: Collection c = hMap.values(); //obtain an Iterator for Collection Iterator itr = c.iterator(); //iter…

---

## [Method or controller?](https://www.ruby-forum.com/t/method-or-controller/168774)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 3\
**Last updated:** [May 25, 2009, 10:59pm UTC](https://www.ruby-forum.com/t/method-or-controller/168774 "2009-05-25T22:59:40Z")

</div>

I wish to allow users to view collections of foreign currency exchange (forex) rates in the following manners: All currencies, only the most current forex rate. and One currency, the N most recent rates. I seem to…

---

## [Inserting fixture data with a primary key of 0](https://www.ruby-forum.com/t/inserting-fixture-data-with-a-primary-key-of-0/168747)

<div class="topic-metadata">

**Author:** [@happolati](https://www.ruby-forum.com/u/happolati)\
**Replies:** 2\
**Last updated:** [May 25, 2009, 8:33pm UTC](https://www.ruby-forum.com/t/inserting-fixture-data-with-a-primary-key-of-0/168747 "2009-05-25T20:33:39Z")

</div>

This doesn’t seem to work on mysql, at least. We depend on this functionality as we’re porting an old app over to rails; does anyone know where I can find out how to disable the magic going on here? For fixture a: a: …

---

## [Expired items](https://www.ruby-forum.com/t/expired-items/168707)

<div class="topic-metadata">

**Author:** [@semyou](https://www.ruby-forum.com/u/semyou)\
**Replies:** 3\
**Last updated:** [May 25, 2009, 7:54pm UTC](https://www.ruby-forum.com/t/expired-items/168707 "2009-05-25T19:54:23Z")

</div>

Hi guys, I have a model Post which has a expiry\_date. I want to know what is the best way to manage scalability in this case. 2 options: Whenever I want to SELECT from the table, I need to include where expiry\_date…

---

## [Use of global variables](https://www.ruby-forum.com/t/use-of-global-variables/168676)

<div class="topic-metadata">

**Author:** [@mk27](https://www.ruby-forum.com/u/mk27)\
**Replies:** 10\
**Last updated:** [May 25, 2009, 7:41pm UTC](https://www.ruby-forum.com/t/use-of-global-variables/168676 "2009-05-25T19:41:43Z")

</div>

I am using a global array to accumulate controller output as it is added to the display, eg, when the user adds more items to a list, I add them to the global. However, something strange is going on when I then try an…

---

## [Detecting Characters other the ASCII (Other than English)](https://www.ruby-forum.com/t/detecting-characters-other-the-ascii-other-than-english/168757)

<div class="topic-metadata">

**Author:** [@Ibrahim\_Mokdad](https://www.ruby-forum.com/u/Ibrahim_Mokdad)\
**Replies:** 2\
**Last updated:** [May 25, 2009, 7:35pm UTC](https://www.ruby-forum.com/t/detecting-characters-other-the-ascii-other-than-english/168757 "2009-05-25T19:35:10Z")

</div>

Dear all I kinda need help on a project I’m working on; and I’m stuck on the part were I have to detect any Unicode character in the text file; will regular expressions “\\w” work ? thnx in advance

---

## [Include path gems hostgator](https://www.ruby-forum.com/t/include-path-gems-hostgator/155867)

<div class="topic-metadata">

**Author:** [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Replies:** 2\
**Last updated:** [May 25, 2009, 6:58pm UTC](https://www.ruby-forum.com/t/include-path-gems-hostgator/155867 "2009-05-25T18:58:12Z")

</div>

i buyed a web hosting. i installed some gems. in the hostgator’s instructions there is write: Using Your Ruby Gem(s) You will need to add /home/nerto/ruby/gems to the include path. You can do this by adding the follo…

---

## [NameError (uninitialized constant FileColumn::Magick::ImageList](https://www.ruby-forum.com/t/nameerror-uninitialized-constant-filecolumn-imagelist/168776)

<div class="topic-metadata">

**Author:** [@simon1](https://www.ruby-forum.com/u/simon1)\
**Replies:** 0\
**Last updated:** [May 25, 2009, 6:54pm UTC](https://www.ruby-forum.com/t/nameerror-uninitialized-constant-filecolumn-imagelist/168776 "2009-05-25T18:54:40Z")

</div>

Hi, I have been using RMagick and File Column in my app together without a problem, but when I tried to add in some new functionality in my model where I use file\_column, I got the error in the subject line. The off…

---

## [Product Search Engine Design with Sphinx and Faceted Search](https://www.ruby-forum.com/t/product-search-engine-design-with-sphinx-and-faceted-search/168772)

<div class="topic-metadata">

**Author:** [@winsmith](https://www.ruby-forum.com/u/winsmith)\
**Replies:** 4\
**Last updated:** [May 25, 2009, 6:53pm UTC](https://www.ruby-forum.com/t/product-search-engine-design-with-sphinx-and-faceted-search/168772 "2009-05-25T18:53:30Z")

</div>

Hi, this is my first question on this forum! Please, take some time to read this message, since it is very big. (sorry) I’m building a search engine (crawler) that indexes products data from more than 500 online brazi…

---

## [After\_create and has\_one association bug?](https://www.ruby-forum.com/t/after-create-and-has-one-association-bug/168732)

<div class="topic-metadata">

**Author:** [@andrewkendall](https://www.ruby-forum.com/u/andrewkendall)\
**Replies:** 4\
**Last updated:** [May 25, 2009, 6:51pm UTC](https://www.ruby-forum.com/t/after-create-and-has-one-association-bug/168732 "2009-05-25T18:51:08Z")

</div>

Hello, I’ve come across an issue that I’m sure is a bug when using after\_create with a has\_one association, but I’m not 100% certain if I’m missing something. This is pretty much exactly the code I’m using. Two simp…

---

## [Can anyone help me with showing lists with conditions?](https://www.ruby-forum.com/t/can-anyone-help-me-with-showing-lists-with-conditions/168690)

<div class="topic-metadata">

**Author:** [@Mike75](https://www.ruby-forum.com/u/Mike75)\
**Replies:** 8\
**Last updated:** [May 25, 2009, 4:24pm UTC](https://www.ruby-forum.com/t/can-anyone-help-me-with-showing-lists-with-conditions/168690 "2009-05-25T16:24:40Z")

</div>

hi i’m trying things out with rails, and I’m having trouble with showing a list of products. i hope someone can help me out with this… my tables are simple and it contains the following fields product table : id | N…

---

## [Draggable ghosting](https://www.ruby-forum.com/t/draggable-ghosting/168764)

<div class="topic-metadata">

**Author:** [@pipistrellrf](https://www.ruby-forum.com/u/pipistrellrf)\
**Replies:** 0\
**Last updated:** [May 25, 2009, 3:29pm UTC](https://www.ruby-forum.com/t/draggable-ghosting/168764 "2009-05-25T15:29:18Z")

</div>

can anyone tell me how to make a Draggable element, which after drop doesn’t disappear. draggable\_element “item\_#{item.id}”, :revert =\> true, :ghosting =\> true don’t work, adding element disappears.

---

## [Testing fields](https://www.ruby-forum.com/t/testing-fields/168762)

<div class="topic-metadata">

**Author:** [@jimb](https://www.ruby-forum.com/u/jimb)\
**Replies:** 3\
**Last updated:** [May 25, 2009, 3:28pm UTC](https://www.ruby-forum.com/t/testing-fields/168762 "2009-05-25T15:28:29Z")

</div>

Hi, I have a model named ‘applicant’. Applicant has various fields, one of them is ‘date\_of\_birth’ I have split the field ‘date of birth’ into three fields: ‘dob\_day’, ‘dob\_month’, ‘dob\_year’ From the view: \<% form…

---

## [Named Scopes and Will\_paginate](https://www.ruby-forum.com/t/named-scopes-and-will-paginate/168754)

<div class="topic-metadata">

**Author:** [@Hunt\_J](https://www.ruby-forum.com/u/Hunt_J)\
**Replies:** 1\
**Last updated:** [May 25, 2009, 3:07pm UTC](https://www.ruby-forum.com/t/named-scopes-and-will-paginate/168754 "2009-05-25T15:07:31Z")

</div>

I would like to move the following code to a model using named\_scopes. I cannot find a good example to show me the way name\_scopes and will\_paginate go hand in hand. @images = Image.paginate :page =\> params\[:page\], :…

---

## [Help --- My phone number field saves blank](https://www.ruby-forum.com/t/help-my-phone-number-field-saves-blank/168758)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 1\
**Last updated:** [May 25, 2009, 2:22pm UTC](https://www.ruby-forum.com/t/help-my-phone-number-field-saves-blank/168758 "2009-05-25T14:22:20Z")

</div>

I have a phone field in my table. But in my form i have two text boxes to get the phone number and the country code like below Enter country code ----- Enter phone code ------ In my table i have to save the phone co…

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

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