# Rails

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

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

---

## [Avoid reloading parent of association?](https://www.ruby-forum.com/t/avoid-reloading-parent-of-association/106561)

<div class="topic-metadata">

**Author:** [@dasil003](https://www.ruby-forum.com/u/dasil003)\
**Replies:** 5\
**Last updated:** [June 14, 2007, 6:32am UTC](https://www.ruby-forum.com/t/avoid-reloading-parent-of-association/106561 "2007-06-14T06:32:25Z")

</div>

Consider this situation class Property \< ActiveRecord::Base has\_many :photos end Now if you reference: @property.photos\[0\].property It reloads the property. I’m looking for a way to suggest the association direct…

---

## [Validates\_mutual\_exclusivity](https://www.ruby-forum.com/t/validates-mutual-exclusivity/106754)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 6\
**Last updated:** [June 14, 2007, 6:19am UTC](https://www.ruby-forum.com/t/validates-mutual-exclusivity/106754 "2007-06-14T06:19:24Z")

</div>

Railsters: We have a model with 2 variables. Neither may be nil or non-nil at the same time. They must pass this truth table: def test\_mutually\_exclude assert\_equal false, Model.new.save assert\_equal false, Model.ne…

---

## [Rails tidy](https://www.ruby-forum.com/t/rails-tidy/106714)

<div class="topic-metadata">

**Author:** [@mark](https://www.ruby-forum.com/u/mark)\
**Replies:** 4\
**Last updated:** [June 14, 2007, 5:41am UTC](https://www.ruby-forum.com/t/rails-tidy/106714 "2007-06-14T05:41:22Z")

</div>

Hi, I am looking at using Tidy to clean up some html, but having a few problems running it. The gem seems to be installed ok, But according to the rDoc I need to give the path of tidylib.so e.g. Tidy.path = ‘/usr/l…

---

## [Unit test question!](https://www.ruby-forum.com/t/unit-test-question/106674)

<div class="topic-metadata">

**Author:** [@DBC\_User](https://www.ruby-forum.com/u/DBC_User)\
**Replies:** 3\
**Last updated:** [June 14, 2007, 5:36am UTC](https://www.ruby-forum.com/t/unit-test-question/106674 "2007-06-14T05:36:22Z")

</div>

Hi, I have a model and I am trying to do the testing. So my test code is something like the following def test\_first assert\_nil Person.find(1) end in this I am expecting the test to run against the development dat…

---

## [Delete the fixtures on a functionnal test](https://www.ruby-forum.com/t/delete-the-fixtures-on-a-functionnal-test/106678)

<div class="topic-metadata">

**Author:** [@cyril\_mougel](https://www.ruby-forum.com/u/cyril_mougel)\
**Replies:** 1\
**Last updated:** [June 14, 2007, 5:31am UTC](https://www.ruby-forum.com/t/delete-the-fixtures-on-a-functionnal-test/106678 "2007-06-14T05:31:22Z")

</div>

Hi, Since couple a day, I block with the delete of my fixtures in my functionnals test. In my controller, I need test a redirect if there are no value. But i load my fixtures in start of my test and in a specific tes…

---

## [Google preference feature?](https://www.ruby-forum.com/t/google-preference-feature/106729)

<div class="topic-metadata">

**Author:** [@green](https://www.ruby-forum.com/u/green)\
**Replies:** 2\
**Last updated:** [June 14, 2007, 5:23am UTC](https://www.ruby-forum.com/t/google-preference-feature/106729 "2007-06-14T05:23:11Z")

</div>

I want the feature as same as google preference. it does not require visitors to register, just select a preference, for instance, a city, next time, when the same user who uses the same computer visits my website, he…

---

## [Date\_select css options](https://www.ruby-forum.com/t/date-select-css-options/106749)

<div class="topic-metadata">

**Author:** [@gabordemeter](https://www.ruby-forum.com/u/gabordemeter)\
**Replies:** 3\
**Last updated:** [June 14, 2007, 3:04am UTC](https://www.ruby-forum.com/t/date-select-css-options/106749 "2007-06-14T03:04:07Z")

</div>

Just looked at the Date helper in the rails API and noticed that none of the functions there (i.e. date\_select) allow me to specify html options (i.e. class) for the generated selects. I was wondering how do other gro…

---

## [Nested Resources. What does the controller look like?](https://www.ruby-forum.com/t/nested-resources-what-does-the-controller-look-like/106781)

<div class="topic-metadata">

**Author:** [@liquid](https://www.ruby-forum.com/u/liquid)\
**Replies:** 3\
**Last updated:** [June 14, 2007, 2:56am UTC](https://www.ruby-forum.com/t/nested-resources-what-does-the-controller-look-like/106781 "2007-06-14T02:56:06Z")

</div>

Hi, A recent thread on the ruby list has got me thinking about what a controller would look like for nested resources. However, in terms of template and controller lines, Damage probably (simplistically) only accou…

---

## [Session: a poor man's global?](https://www.ruby-forum.com/t/session-a-poor-mans-global/106772)

<div class="topic-metadata">

**Author:** [@george\_b](https://www.ruby-forum.com/u/george_b)\
**Replies:** 3\
**Last updated:** [June 14, 2007, 2:32am UTC](https://www.ruby-forum.com/t/session-a-poor-mans-global/106772 "2007-06-14T02:32:45Z")

</div>

As I learn Rails I find myself all too often tempted to dump something into the session hash just because I can’t think of a better way to make it briefly persistent (no oxymoron intended!). For instance, I have repor…

---

## [Has and belongs to many with a single table](https://www.ruby-forum.com/t/has-and-belongs-to-many-with-a-single-table/106745)

<div class="topic-metadata">

**Author:** [@emmanueloga](https://www.ruby-forum.com/u/emmanueloga)\
**Replies:** 3\
**Last updated:** [June 14, 2007, 1:14am UTC](https://www.ruby-forum.com/t/has-and-belongs-to-many-with-a-single-table/106745 "2007-06-14T01:14:56Z")

</div>

Is it posible to implement “Has and belongs to many” with a single table? Like this: table events id: integer description: text table related\_events id\_event: integer id\_related\_event: integer class Even…

---

## [Seleniumrc\_fu fails with safari](https://www.ruby-forum.com/t/seleniumrc-fu-fails-with-safari/106775)

<div class="topic-metadata">

**Author:** [@MichaelLatta](https://www.ruby-forum.com/u/MichaelLatta)\
**Replies:** 0\
**Last updated:** [June 14, 2007, 12:19am UTC](https://www.ruby-forum.com/t/seleniumrc-fu-fails-with-safari/106775 "2007-06-14T00:19:48Z")

</div>

I have seleniumrc\_fu working with firefox, but not with Safari. This appears to be a server side issue as it is complaining about a missing route for one of the selenium files: no route found to match “/selenium-serv…

---

## [Curl/Curb](https://www.ruby-forum.com/t/curl-curb/106760)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [June 13, 2007, 11:43pm UTC](https://www.ruby-forum.com/t/curl-curb/106760 "2007-06-13T23:43:34Z")

</div>

Hi, I have some PHP that I need to emulate in Rails. The PHP is: curl\_setopt($ch, CURLOPT\_URL,“http://127.0.0.1/handler.php”); curl\_setopt($ch, CURLOPT\_POST, 1); curl\_setopt($ch, CURLOPT\_POSTFIELDS, "USERNAME=name&P…

---

## [Rails store / e-commerce suite?](https://www.ruby-forum.com/t/rails-store-e-commerce-suite/106762)

<div class="topic-metadata">

**Author:** [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Replies:** 3\
**Last updated:** [June 13, 2007, 11:30pm UTC](https://www.ruby-forum.com/t/rails-store-e-commerce-suite/106762 "2007-06-13T23:30:42Z")

</div>

I know the point of rails is to make things so easy that you don’t need to do this, but I have a friend of mine that wants to sell t-shirts. I need a simple / easy to set up a store suite for rails. Is there anything …

---

## [Manual route redundancy with .:format (REST from scratch)](https://www.ruby-forum.com/t/manual-route-redundancy-with-format-rest-from-scratch/106756)

<div class="topic-metadata">

**Author:** [@stephanie](https://www.ruby-forum.com/u/stephanie)\
**Replies:** 5\
**Last updated:** [June 13, 2007, 11:27pm UTC](https://www.ruby-forum.com/t/manual-route-redundancy-with-format-rest-from-scratch/106756 "2007-06-13T23:27:42Z")

</div>

I am building an RESTful search application in Rails. Unfortunately I can’t take advantage of map.resources routing because the application has no models (it communicates with a SOAP service). So I am building a REST …

---

## [Can i know the name of my current controller in my views?](https://www.ruby-forum.com/t/can-i-know-the-name-of-my-current-controller-in-my-views/106768)

<div class="topic-metadata">

**Author:** [@emmanueloga](https://www.ruby-forum.com/u/emmanueloga)\
**Replies:** 2\
**Last updated:** [June 13, 2007, 11:14pm UTC](https://www.ruby-forum.com/t/can-i-know-the-name-of-my-current-controller-in-my-views/106768 "2007-06-13T23:14:39Z")

</div>

Just that: can i know the name of my current controller in my views? I want to highlite in my main template (the one i use for all the pages) the current page, to do that i need to know the current controller, and i d…

---

## [Displaying "Site Title" from MySQL Throughout Entire Site](https://www.ruby-forum.com/t/displaying-site-title-from-mysql-throughout-entire-site/106693)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 6\
**Last updated:** [June 13, 2007, 11:14pm UTC](https://www.ruby-forum.com/t/displaying-site-title-from-mysql-throughout-entire-site/106693 "2007-06-13T23:14:02Z")

</div>

I’m an absolute noob, so please excuse my ignorance here :slight\_smile: I’m looking for away to display the site’s title that I’ve entered into a mysql database. Assuming I created the table using this: create table …

---

## [Seeking Rails companies](https://www.ruby-forum.com/t/seeking-rails-companies/106725)

<div class="topic-metadata">

**Author:** [@harm\_kabisa](https://www.ruby-forum.com/u/harm_kabisa)\
**Replies:** 3\
**Last updated:** [June 13, 2007, 10:52pm UTC](https://www.ruby-forum.com/t/seeking-rails-companies/106725 "2007-06-13T22:52:35Z")

</div>

Hi all, Currently our company Kabisa, located in the Netherlands, is looking for companies specialized in Ruby and ‘Ruby on Rails’, to meet our demand on Ruby on Rails development capacity. We aim for long-term colla…

---

## [Attachment\_fu with animated gifs?](https://www.ruby-forum.com/t/attachment-fu-with-animated-gifs/106759)

<div class="topic-metadata">

**Author:** [@supaspoida](https://www.ruby-forum.com/u/supaspoida)\
**Replies:** 5\
**Last updated:** [June 13, 2007, 10:43pm UTC](https://www.ruby-forum.com/t/attachment-fu-with-animated-gifs/106759 "2007-06-13T22:43:30Z")

</div>

Is this possible? I want to be able to upload animated gifs and have attachment\_fu retain the animation. I’ve got everything set up but when I upload .gifs the new files do not animated. Is there something special I n…

---

## [Db access problem](https://www.ruby-forum.com/t/db-access-problem/106688)

<div class="topic-metadata">

**Author:** [@darrenevans](https://www.ruby-forum.com/u/darrenevans)\
**Replies:** 1\
**Last updated:** [June 13, 2007, 10:24pm UTC](https://www.ruby-forum.com/t/db-access-problem/106688 "2007-06-13T22:24:09Z")

</div>

I access a Db on a server externally. My scripts worked before, but they do not work on the new server. I’m quite new to this and wondered where I am going wrong. The error I have is: Mysql::Error: Lost connection to…

---

## [Crash Ruby Forum! =\]](https://www.ruby-forum.com/t/crash-ruby-forum/106758)

<div class="topic-metadata">

**Author:** [@sthorpe](https://www.ruby-forum.com/u/sthorpe)\
**Replies:** 1\
**Last updated:** [June 13, 2007, 9:54pm UTC](https://www.ruby-forum.com/t/crash-ruby-forum/106758 "2007-06-13T21:54:12Z")

</div>

Do a search for :media =\> ‘print’ oops!

---

## [Seleniumrc\_fu initial test issue](https://www.ruby-forum.com/t/seleniumrc-fu-initial-test-issue/106751)

<div class="topic-metadata">

**Author:** [@MichaelLatta](https://www.ruby-forum.com/u/MichaelLatta)\
**Replies:** 1\
**Last updated:** [June 13, 2007, 9:39pm UTC](https://www.ruby-forum.com/t/seleniumrc-fu-initial-test-issue/106751 "2007-06-13T21:39:24Z")

</div>

I have the seleniumrc\_fu plugin installed and setup according to the instructions, and can run the selenium:test task if there are no test cases. My first test case simply does an open\_home\_page to verify that things…

---

## [Filtering object list with select\_tags + pagination + Ajax f](https://www.ruby-forum.com/t/filtering-object-list-with-select-tags-pagination-ajax-f/106761)

<div class="topic-metadata">

**Author:** [@Sam\_Pierson](https://www.ruby-forum.com/u/Sam_Pierson)\
**Replies:** 0\
**Last updated:** [June 13, 2007, 9:32pm UTC](https://www.ruby-forum.com/t/filtering-object-list-with-select-tags-pagination-ajax-f/106761 "2007-06-13T21:32:23Z")

</div>

With ruby 1.8.5 / Rails 1.2.3 I am trying to develop a page that: o Displays a list of objects. o Allows you to filter the list of objects using criteria selected from pulldown menus, o Paginates the objects with Pr…

---

## [Ajax - problems with uploading files](https://www.ruby-forum.com/t/ajax-problems-with-uploading-files/103331)

<div class="topic-metadata">

**Author:** [@Daniello](https://www.ruby-forum.com/u/Daniello)\
**Replies:** 2\
**Last updated:** [June 13, 2007, 8:43pm UTC](https://www.ruby-forum.com/t/ajax-problems-with-uploading-files/103331 "2007-06-13T20:43:09Z")

</div>

This is my working! model view and controller (without AJAX): Model: attachment.rb class Attachment \< ActiveRecord::Base belongs\_to :task belongs\_to :user validates\_presence\_of :comment def uploaded\_file=(file\_fie…

---

## [Native mysql gem vs pure-ruby gem (determing which is being](https://www.ruby-forum.com/t/native-mysql-gem-vs-pure-ruby-gem-determing-which-is-being/106750)

<div class="topic-metadata">

**Author:** [@phallstrom](https://www.ruby-forum.com/u/phallstrom)\
**Replies:** 0\
**Last updated:** [June 13, 2007, 8:06pm UTC](https://www.ruby-forum.com/t/native-mysql-gem-vs-pure-ruby-gem-determing-which-is-being/106750 "2007-06-13T20:06:01Z")

</div>

Hi all - I just experienced a problem I didn’t even realize I had. The problem was that I have installed the native mysql gem, but it wasn’t being used. I base this on this post: http://blog.duncandavidson.com/200…

---

## [Sending GPG encrypted e-mails](https://www.ruby-forum.com/t/sending-gpg-encrypted-e-mails/106748)

<div class="topic-metadata">

**Author:** [@redgar](https://www.ruby-forum.com/u/redgar)\
**Replies:** 0\
**Last updated:** [June 13, 2007, 8:03pm UTC](https://www.ruby-forum.com/t/sending-gpg-encrypted-e-mails/106748 "2007-06-13T20:03:00Z")

</div>

Hi, Has anyone has any success using GPG through ruby on rails? WHAT I’VE TRIED: I followed all the instructions from this tutorial: http://www.ahgsoftware.com/articles/2007/03/18/how-to-encrypt-ruby-on-rails-mail-wi…

---

## [RJS and Rails](https://www.ruby-forum.com/t/rjs-and-rails/106719)

<div class="topic-metadata">

**Author:** [@turnkeytraders](https://www.ruby-forum.com/u/turnkeytraders)\
**Replies:** 9\
**Last updated:** [June 13, 2007, 7:53pm UTC](https://www.ruby-forum.com/t/rjs-and-rails/106719 "2007-06-13T19:53:27Z")

</div>

Ok this is the code I have in my view: - Select - Male Female now in my change.rjs, I have: if @client\_gender.value = ‘Male’ page.remove ‘client\_gender’ page.show ‘male\_form’ else page.remove ‘client\_gender’ …

---

## [Thanks for giving chance to be part of this exciting group](https://www.ruby-forum.com/t/thanks-for-giving-chance-to-be-part-of-this-exciting-group/106742)

<div class="topic-metadata">

**Author:** [@ilogicnet\_consultin](https://www.ruby-forum.com/u/ilogicnet_consultin)\
**Replies:** 0\
**Last updated:** [June 13, 2007, 6:36pm UTC](https://www.ruby-forum.com/t/thanks-for-giving-chance-to-be-part-of-this-exciting-group/106742 "2007-06-13T18:36:45Z")

</div>

Thanks for giving chance to be part of this exciting group

---

## [Map.resources custom url?](https://www.ruby-forum.com/t/map-resources-custom-url/106722)

<div class="topic-metadata">

**Author:** [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Replies:** 1\
**Last updated:** [June 13, 2007, 6:20pm UTC](https://www.ruby-forum.com/t/map-resources-custom-url/106722 "2007-06-13T18:20:43Z")

</div>

Hey all, I have the following route which nests a has\_many :through association: map.resources :groups do |group| group.resources :enrollments end With that I can hit urls like: /groups/1/enrollments While this wo…

---

## [HTML Entity Reference in tags](https://www.ruby-forum.com/t/html-entity-reference-in-tags/106740)

<div class="topic-metadata">

**Author:** [@xmg-eric](https://www.ruby-forum.com/u/xmg-eric)\
**Replies:** 0\
**Last updated:** [June 13, 2007, 6:20pm UTC](https://www.ruby-forum.com/t/html-entity-reference-in-tags/106740 "2007-06-13T18:20:43Z")

</div>

If I have the following markup: \<% form\_tag do %\> \<%=text\_field\_tag ‘html’, params\[:html\]%\> \<%=submit\_tag ‘Update’%\> \<% end %\> and input “©” and submit. The form when it comes back up will have the actual copyright…

---

## [What is it with localhost:3000?](https://www.ruby-forum.com/t/what-is-it-with-localhost-3000/106702)

<div class="topic-metadata">

**Author:** [@driverails](https://www.ruby-forum.com/u/driverails)\
**Replies:** 1\
**Last updated:** [June 13, 2007, 5:49pm UTC](https://www.ruby-forum.com/t/what-is-it-with-localhost-3000/106702 "2007-06-13T17:49:37Z")

</div>

I am on Windows, I got Instant Rails v1.3a (as mentioned in the book by Patrick Lenz- “Build your own Ruby on Rails web applications”). Now, going through the tutorial, I created new app shovell, then started WEBrick.…

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

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