# Rails

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

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

---

## [MySQL Gem - x86\_64-linux](https://www.ruby-forum.com/t/mysql-gem-x86-64-linux/89976)

<div class="topic-metadata">

**Author:** [@al-evans](https://www.ruby-forum.com/u/al-evans)\
**Replies:** 1\
**Last updated:** [March 24, 2007, 4:04pm UTC](https://www.ruby-forum.com/t/mysql-gem-x86-64-linux/89976 "2007-03-24T16:04:44Z")

</div>

Can somebody tell me how to get the MySQL Gem to build its native extensions under x86\_64 linux? I say: gem install mysql – -with-mysql-dir=/usr/lib64/mysql I get: checking for mysql\_query() in -lmysqlclient… no ch…

---

## [User login?](https://www.ruby-forum.com/t/user-login/89887)

<div class="topic-metadata">

**Author:** [@scot](https://www.ruby-forum.com/u/scot)\
**Replies:** 1\
**Last updated:** [March 24, 2007, 2:06pm UTC](https://www.ruby-forum.com/t/user-login/89887 "2007-03-24T14:06:09Z")

</div>

Hi, I am looking for a login system / plugin / code to use with rails 1.2.x. Has anyone got any recommendations on any samples or know what 37signals tend to use for their apps? Cheers Scot

---

## [Validations only don't work in tests!](https://www.ruby-forum.com/t/validations-only-dont-work-in-tests/89979)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 0\
**Last updated:** [March 24, 2007, 2:06pm UTC](https://www.ruby-forum.com/t/validations-only-dont-work-in-tests/89979 "2007-03-24T14:06:06Z")

</div>

Hi all I have written the following unit tests: def test\_invalid\_characters\_in\_abbrevation @country = Country.new(valid\_country\_attrs) assert @country.valid? %w{ a1 11 09 Ã¤Ã¼ '(a' 'd&' }.each do |abbr| @country.a…

---

## [Datetime\_select](https://www.ruby-forum.com/t/datetime-select/89973)

<div class="topic-metadata">

**Author:** [@fafa](https://www.ruby-forum.com/u/fafa)\
**Replies:** 0\
**Last updated:** [March 24, 2007, 12:12pm UTC](https://www.ruby-forum.com/t/datetime-select/89973 "2007-03-24T12:12:31Z")

</div>

Is that possible to force helper datetime\_select to use custom month names? I tryied :use\_month\_names =\> %w(xx yyy xx yy xx yyy xx yy xx yyy xx yy) but didn’t work… thanks

---

## [Select helper is a mess](https://www.ruby-forum.com/t/select-helper-is-a-mess/89969)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 1\
**Last updated:** [March 24, 2007, 10:39am UTC](https://www.ruby-forum.com/t/select-helper-is-a-mess/89969 "2007-03-24T10:39:37Z")

</div>

I am using a select helper in my partial view, as stated in the API doc \<%= select ‘distance’, ‘radius’, \[\[“2 km” ,2\], \[“5 km”, 5\], \[“10 km” , 10\], \[“15 km”, 15\], \[“25 kilomÃ¨tres”, 25\] \], {:selected =\> 10}, {:style =\>…

---

## [Upload image and display same time](https://www.ruby-forum.com/t/upload-image-and-display-same-time/89967)

<div class="topic-metadata">

**Author:** [@Jennie](https://www.ruby-forum.com/u/Jennie)\
**Replies:** 0\
**Last updated:** [March 24, 2007, 8:32am UTC](https://www.ruby-forum.com/t/upload-image-and-display-same-time/89967 "2007-03-24T08:32:12Z")

</div>

hi i want to display image as it is uploaded, –\> i have a render partial form in which i used iframe like this, Select Image: where image is uploaded, for that on click of update button in …

---

## [How to encrypt and decyrpt password](https://www.ruby-forum.com/t/how-to-encrypt-and-decyrpt-password/89965)

<div class="topic-metadata">

**Author:** [@shiva\_98](https://www.ruby-forum.com/u/shiva_98)\
**Replies:** 1\
**Last updated:** [March 24, 2007, 7:36am UTC](https://www.ruby-forum.com/t/how-to-encrypt-and-decyrpt-password/89965 "2007-03-24T07:36:27Z")

</div>

How to encrypt the password before saving into database and while taking from database it should be dycrpted??? anyone knows help me

---

## [Does anyone use ROR in Vista?](https://www.ruby-forum.com/t/does-anyone-use-ror-in-vista/89946)

<div class="topic-metadata">

**Author:** [@neo](https://www.ruby-forum.com/u/neo)\
**Replies:** 1\
**Last updated:** [March 24, 2007, 6:03am UTC](https://www.ruby-forum.com/t/does-anyone-use-ror-in-vista/89946 "2007-03-24T06:03:23Z")

</div>

I want to know is it compatible to Vista?

---

## [Gmaps on Rails](https://www.ruby-forum.com/t/gmaps-on-rails/89940)

<div class="topic-metadata">

**Author:** [@colinloretz](https://www.ruby-forum.com/u/colinloretz)\
**Replies:** 5\
**Last updated:** [March 24, 2007, 5:02am UTC](https://www.ruby-forum.com/t/gmaps-on-rails/89940 "2007-03-24T05:02:24Z")

</div>

I’m working with the Google Maps API and picked up the book “Beginning Google Maps Applications with Rails & AJAX”. I have encountered an interesting problem. I’m working in chapter 3 (for anyone who has the book) and…

---

## [Nested List Tag Helper](https://www.ruby-forum.com/t/nested-list-tag-helper/89947)

<div class="topic-metadata">

**Author:** [@SBSBSB](https://www.ruby-forum.com/u/SBSBSB)\
**Replies:** 0\
**Last updated:** [March 24, 2007, 3:53am UTC](https://www.ruby-forum.com/t/nested-list-tag-helper/89947 "2007-03-24T03:53:14Z")

</div>

I’ve taken a useful snippet for creating lists from the blog below and turned it into something that can create a nested list from an array of arrays. Thought I’d share it since some of you might find it useful and I…

---

## [Overloading to\_json with JSON gem installed causing error](https://www.ruby-forum.com/t/overloading-to-json-with-json-gem-installed-causing-error/89948)

<div class="topic-metadata">

**Author:** [@yottameter](https://www.ruby-forum.com/u/yottameter)\
**Replies:** 0\
**Last updated:** [March 24, 2007, 3:18am UTC](https://www.ruby-forum.com/t/overloading-to-json-with-json-gem-installed-causing-error/89948 "2007-03-24T03:18:12Z")

</div>

I installed the JSON gem because I wanted the JSON parser. Before installing the JSON gem, overloading worked fine. Before I remove it, I’d like to see if anyone has an idea of what is going on. It’s the only JSON par…

---

## [How does this helper work? (agile book)](https://www.ruby-forum.com/t/how-does-this-helper-work-agile-book/89941)

<div class="topic-metadata">

**Author:** [@desertfox](https://www.ruby-forum.com/u/desertfox)\
**Replies:** 1\
**Last updated:** [March 24, 2007, 1:15am UTC](https://www.ruby-forum.com/t/how-does-this-helper-work-agile-book/89941 "2007-03-24T01:15:05Z")

</div>

Hello, Im trying to understand how this helper method works: def hidden\_div\_if(condition, attributes = {}) if condition attributes\[“style”\] = “display: none” end attrs = tag\_options(attributes.stringify\_keys) “\<di…

---

## [Why is this method protected? (from agile book)](https://www.ruby-forum.com/t/why-is-this-method-protected-from-agile-book/89234)

<div class="topic-metadata">

**Author:** [@desertfox](https://www.ruby-forum.com/u/desertfox)\
**Replies:** 4\
**Last updated:** [March 24, 2007, 12:29am UTC](https://www.ruby-forum.com/t/why-is-this-method-protected-from-agile-book/89234 "2007-03-24T00:29:11Z")

</div>

Hello, This is form the 2.ed agile book in the product model: /models/product.rb: validates\_presence\_of :title, :description, :image\_url validates\_numericality\_of :price validates\_uniqueness\_of :title protected de…

---

## [Error - Conflicting types for parameter containers](https://www.ruby-forum.com/t/error-conflicting-types-for-parameter-containers/89939)

<div class="topic-metadata">

**Author:** [@scott](https://www.ruby-forum.com/u/scott)\
**Replies:** 0\
**Last updated:** [March 24, 2007, 12:17am UTC](https://www.ruby-forum.com/t/error-conflicting-types-for-parameter-containers/89939 "2007-03-24T00:17:00Z")

</div>

Hi, I am trying to implement password-reset functionality. I have an email sent out to a user when they request a password. The URL in the email contains a cgi param, of which is a SHA 256 hex digest. The user clicks…

---

## [Render\_to\_string undefined?](https://www.ruby-forum.com/t/render-to-string-undefined/89933)

<div class="topic-metadata">

**Author:** [@plambert](https://www.ruby-forum.com/u/plambert)\
**Replies:** 1\
**Last updated:** [March 23, 2007, 11:18pm UTC](https://www.ruby-forum.com/t/render-to-string-undefined/89933 "2007-03-23T23:18:28Z")

</div>

Do I need to include anything special in order to call render\_to\_string from the view? When I try to do something like this in my rhtml template: \<%= render\_to\_string(:partial =\> “user\_description”) %\> I get the err…

---

## [Converting JSON to XML](https://www.ruby-forum.com/t/converting-json-to-xml/89929)

<div class="topic-metadata">

**Author:** [@yottameter](https://www.ruby-forum.com/u/yottameter)\
**Replies:** 0\
**Last updated:** [March 23, 2007, 10:50pm UTC](https://www.ruby-forum.com/t/converting-json-to-xml/89929 "2007-03-23T22:50:25Z")

</div>

What is the group using to convert JSON to XML?

---

## [Equivelent of php include](https://www.ruby-forum.com/t/equivelent-of-php-include/89926)

<div class="topic-metadata">

**Author:** [@Bryce](https://www.ruby-forum.com/u/Bryce)\
**Replies:** 1\
**Last updated:** [March 23, 2007, 10:33pm UTC](https://www.ruby-forum.com/t/equivelent-of-php-include/89926 "2007-03-23T22:33:23Z")

</div>

Hey Rails people, I would like to do some really easy consuming of other web pages. Specifically, I’d like to show the public instance of my google calendar on my website. I have the calendar’s public address ( we’ll …

---

## [Doable ? action caching if anonymous, fragment caching if lo](https://www.ruby-forum.com/t/doable-action-caching-if-anonymous-fragment-caching-if-lo/89790)

<div class="topic-metadata">

**Author:** [@aravet](https://www.ruby-forum.com/u/aravet)\
**Replies:** 1\
**Last updated:** [March 23, 2007, 10:21pm UTC](https://www.ruby-forum.com/t/doable-action-caching-if-anonymous-fragment-caching-if-lo/89790 "2007-03-23T22:21:21Z")

</div>

Hi All, I’d like to use different caching strategies based on the visitor status anonymous =\> action caching logged in =\> fragment caching Is that doable? Where should I start? TIA Alain

---

## [Mongrell issues "HTTP element REQUEST\_URI is longer than the](https://www.ruby-forum.com/t/mongrell-issues-http-element-request-uri-is-longer-than-the/89925)

<div class="topic-metadata">

**Author:** [@jimache](https://www.ruby-forum.com/u/jimache)\
**Replies:** 2\
**Last updated:** [March 23, 2007, 9:59pm UTC](https://www.ruby-forum.com/t/mongrell-issues-http-element-request-uri-is-longer-than-the/89925 "2007-03-23T21:59:18Z")

</div>

Hi every one, I use a couple of urls that base64 encode a rather complex query into the URI. I get this error on mongrel “HTTP element REQUEST\_URI is longer than the 512 allowed length”. Is there any way around this …

---

## [Noob: Error object in controller?](https://www.ruby-forum.com/t/noob-error-object-in-controller/89850)

<div class="topic-metadata">

**Author:** [@Thogra](https://www.ruby-forum.com/u/Thogra)\
**Replies:** 3\
**Last updated:** [March 23, 2007, 9:18pm UTC](https://www.ruby-forum.com/t/noob-error-object-in-controller/89850 "2007-03-23T21:18:14Z")

</div>

Hi all. First some confession I have to make: I’m coming from Java. This will possibly explain my question :wink: In Java you have an error object when -hm- some error has happened. You can ask this object for the er…

---

## [Update a textarea with RJS](https://www.ruby-forum.com/t/update-a-textarea-with-rjs/89815)

<div class="topic-metadata">

**Author:** [@Bolo](https://www.ruby-forum.com/u/Bolo)\
**Replies:** 2\
**Last updated:** [March 23, 2007, 9:02pm UTC](https://www.ruby-forum.com/t/update-a-textarea-with-rjs/89815 "2007-03-23T21:02:12Z")

</div>

Hello I would like a update a texteara with JS. with this simple code. It’s working well RJS page\[“objectif”\].value = “test” View \<%= f.text\_area :objectif, :rows =\> 10 , :cols =\> 55 , :id =\> “objectif”%\> But whe…

---

## [Best way to maintian a users viewing history](https://www.ruby-forum.com/t/best-way-to-maintian-a-users-viewing-history/89924)

<div class="topic-metadata">

**Author:** [@jgrosjean](https://www.ruby-forum.com/u/jgrosjean)\
**Replies:** 0\
**Last updated:** [March 23, 2007, 8:59pm UTC](https://www.ruby-forum.com/t/best-way-to-maintian-a-users-viewing-history/89924 "2007-03-23T20:59:37Z")

</div>

I’d like for uses to my site to be able to tell what content has changed since they last viewed it. To do this I’ll need to record each time a user views some content and store the content id and time in the users vie…

---

## [Routing Question w/ Separators](https://www.ruby-forum.com/t/routing-question-w-separators/89921)

<div class="topic-metadata">

**Author:** [@wilson](https://www.ruby-forum.com/u/wilson)\
**Replies:** 0\
**Last updated:** [March 23, 2007, 8:29pm UTC](https://www.ruby-forum.com/t/routing-question-w-separators/89921 "2007-03-23T20:29:10Z")

</div>

How can I create a route that resembles “myhost.com/news/page1”? I have tried this using: map.connect “news/page.:page”, :controller =\> “article”, :action =\> “all” I get “myhost.com/news/page.1”. It gives me the sepa…

---

## [Link\_to\_remote url isn't recognized like link\_to urls are?](https://www.ruby-forum.com/t/link-to-remote-url-isnt-recognized-like-link-to-urls-are/89890)

<div class="topic-metadata">

**Author:** [@jeff](https://www.ruby-forum.com/u/jeff)\
**Replies:** 1\
**Last updated:** [March 23, 2007, 8:12pm UTC](https://www.ruby-forum.com/t/link-to-remote-url-isnt-recognized-like-link-to-urls-are/89890 "2007-03-23T20:12:09Z")

</div>

I’m starting to learn about the Ajax support in Rails. I had a link that looked like this: link\_to “View Game Details”, admin\_game\_path(@game) and it worked great. (I’m using map.resources :games, :path\_prefix =\> ‘a…

---

## [Ajax substitute for "redirect\_to"](https://www.ruby-forum.com/t/ajax-substitute-for-redirect-to/89597)

<div class="topic-metadata">

**Author:** [@wotanabi](https://www.ruby-forum.com/u/wotanabi)\
**Replies:** 3\
**Last updated:** [March 23, 2007, 8:03pm UTC](https://www.ruby-forum.com/t/ajax-substitute-for-redirect-to/89597 "2007-03-23T20:03:44Z")

</div>

\######## Short version: I need an ajax version of “redirect\_to” that either triggers the browser to do a new XHR (XML-HTTP-Request) or triggers rails to behave as if a clean new XHR had come in. ######## Long versio…

---

## [Migration Strategy (Reverse Engineering) Existing Database](https://www.ruby-forum.com/t/migration-strategy-reverse-engineering-existing-database/89919)

<div class="topic-metadata">

**Author:** [@BrendanC](https://www.ruby-forum.com/u/BrendanC)\
**Replies:** 0\
**Last updated:** [March 23, 2007, 7:40pm UTC](https://www.ruby-forum.com/t/migration-strategy-reverse-engineering-existing-database/89919 "2007-03-23T19:40:04Z")

</div>

What is the optimum strategy for getting started/reverse engineering an existing (SQL Server) database for ROR development. Can I reverse migrate (??terminology??) from an existing production database and have all the…

---

## [In place ajax button](https://www.ruby-forum.com/t/in-place-ajax-button/89871)

<div class="topic-metadata">

**Author:** [@cnicolaou](https://www.ruby-forum.com/u/cnicolaou)\
**Replies:** 6\
**Last updated:** [March 23, 2007, 7:39pm UTC](https://www.ruby-forum.com/t/in-place-ajax-button/89871 "2007-03-23T19:39:03Z")

</div>

Hello, I am trying to create a button on the list page that triggers an action, like for example a list of type of wood, and the button adds dynamically upon clicking the number of packages linked to a certain type of…

---

## [Benefit of RJS in views over controller](https://www.ruby-forum.com/t/benefit-of-rjs-in-views-over-controller/89917)

<div class="topic-metadata">

**Author:** [@jko170](https://www.ruby-forum.com/u/jko170)\
**Replies:** 0\
**Last updated:** [March 23, 2007, 7:33pm UTC](https://www.ruby-forum.com/t/benefit-of-rjs-in-views-over-controller/89917 "2007-03-23T19:33:02Z")

</div>

For me, it seems like putting RJS in the controller is more organized than putting it in the views just because there is less files to deal with. Are there any real benefits for putting RJS in views rather than the co…

---

## [How to share a collection of model files across many apps?](https://www.ruby-forum.com/t/how-to-share-a-collection-of-model-files-across-many-apps/89897)

<div class="topic-metadata">

**Author:** [@eblatt](https://www.ruby-forum.com/u/eblatt)\
**Replies:** 1\
**Last updated:** [March 23, 2007, 7:24pm UTC](https://www.ruby-forum.com/t/how-to-share-a-collection-of-model-files-across-many-apps/89897 "2007-03-23T19:24:02Z")

</div>

Hi, I’ve got three files that (a.rb, b.rb, c.rb) that currently live in app/models. I’d like these models to shared by multiple rails apps. These models are associated with a separate database. My rails projects are…

---

## [Adding Business Logic in ActiveRecord](https://www.ruby-forum.com/t/adding-business-logic-in-activerecord/89888)

<div class="topic-metadata">

**Author:** [@reg](https://www.ruby-forum.com/u/reg)\
**Replies:** 4\
**Last updated:** [March 23, 2007, 6:59pm UTC](https://www.ruby-forum.com/t/adding-business-logic-in-activerecord/89888 "2007-03-23T18:59:59Z")

</div>

I have some business logic in a class class Account \< ActiveRecord::Base … … def received\_accounttransactions accounttransactions.inject(0) {|total, accounttransaction| total + accounttransaction.amount } end end …

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

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