# Rails

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

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

---

## [Login for iPhone webapp](https://www.ruby-forum.com/t/login-for-iphone-webapp/167872)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 0\
**Last updated:** [May 13, 2009, 2:35pm UTC](https://www.ruby-forum.com/t/login-for-iphone-webapp/167872 "2009-05-13T14:35:17Z")

</div>

I can’t get a login action to work for an iPhone webapp (using the iPhone Simulator). Is there anything special that I should think about for a login action on the iPhone?

---

## [Compare this sql query and corresponding ruby code](https://www.ruby-forum.com/t/compare-this-sql-query-and-corresponding-ruby-code/167864)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 4\
**Last updated:** [May 13, 2009, 1:31pm UTC](https://www.ruby-forum.com/t/compare-this-sql-query-and-corresponding-ruby-code/167864 "2009-05-13T13:31:14Z")

</div>

Hi Suppose I have a two models Ticket and Activity Ticket has\_many activities Activity belongs\_to Ticket Now suppose if the Activity has field name Now for a Ticket with id=1 say there are 10 activities So to update…

---

## [Whatâ€™s faster for getting Mails into Rails: Pop vs. MySQL](https://www.ruby-forum.com/t/whata-s-faster-for-getting-mails-into-rails-pop-vs-mysql/167867)

<div class="topic-metadata">

**Author:** [@slafochmed](https://www.ruby-forum.com/u/slafochmed)\
**Replies:** 0\
**Last updated:** [May 13, 2009, 1:12pm UTC](https://www.ruby-forum.com/t/whata-s-faster-for-getting-mails-into-rails-pop-vs-mysql/167867 "2009-05-13T13:12:45Z")

</div>

Hi, Suppose I wanted to get mails from my mailserver (different machine) into my Rails App to process it there, what is faster: Connecting via net/Pop or net/imap to download the mails Storing the Mails on the Mailse…

---

## [Recaptcha plugin problem](https://www.ruby-forum.com/t/recaptcha-plugin-problem/167860)

<div class="topic-metadata">

**Author:** [@engSIlian\_Iliev](https://www.ruby-forum.com/u/engSIlian_Iliev)\
**Replies:** 0\
**Last updated:** [May 13, 2009, 11:54am UTC](https://www.ruby-forum.com/t/recaptcha-plugin-problem/167860 "2009-05-13T11:54:24Z")

</div>

Hi all, I am using radiant CMS and I am trying to create custom extension and add recaptcha validation to it but when I call if not verify\_recaptcha(:private\_key =\> ‘aaaaaaaaaaa’) #add error end I get: undefined m…

---

## [Apache / mod\_rails config](https://www.ruby-forum.com/t/apache-mod-rails-config/167822)

<div class="topic-metadata">

**Author:** [@giorgio](https://www.ruby-forum.com/u/giorgio)\
**Replies:** 1\
**Last updated:** [May 13, 2009, 11:18am UTC](https://www.ruby-forum.com/t/apache-mod-rails-config/167822 "2009-05-13T11:18:03Z")

</div>

Hi, I have mod\_rails on Apache serving a rails app just fine. What I want to do is have another folder served by apache as a downloadable list of files. Do I need to do mod\_rewrite stuff and mess around with htaccess…

---

## [A problem http POST params](https://www.ruby-forum.com/t/a-problem-http-post-params/167796)

<div class="topic-metadata">

**Author:** [@Learning](https://www.ruby-forum.com/u/Learning)\
**Replies:** 3\
**Last updated:** [May 13, 2009, 11:06am UTC](https://www.ruby-forum.com/t/a-problem-http-post-params/167796 "2009-05-13T11:06:20Z")

</div>

this is my HTML: and the form\_controller: class FormController \< ApplicationController def index @username=params\[:username\] end end what’s wrong about this? it works with GET method. but the API shows that pa…

---

## [Installing Warehouse- undefined symbol: apr\_dbm\_type\_db](https://www.ruby-forum.com/t/installing-warehouse-undefined-symbol-apr-dbm-type-db/164823)

<div class="topic-metadata">

**Author:** [@manohar\_amrutkar](https://www.ruby-forum.com/u/manohar_amrutkar)\
**Replies:** 3\
**Last updated:** [May 13, 2009, 10:01am UTC](https://www.ruby-forum.com/t/installing-warehouse-undefined-symbol-apr-dbm-type-db/164823 "2009-05-13T10:01:39Z")

</div>

Hi All, I want to install warehouse application but i could use rake command because of following error. Kindly support me to resolve the same. Error- !! No Ultraviolet gem found, defaulting to javascript syntax hi…

---

## [Forms & link css classes - not working](https://www.ruby-forum.com/t/forms-link-css-classes-not-working/167823)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [May 13, 2009, 9:59am UTC](https://www.ruby-forum.com/t/forms-link-css-classes-not-working/167823 "2009-05-13T09:59:53Z")

</div>

I used a scaffold to create an interface. I’m trying to style it and I’m having trouble. In my css I have: #content a, a:link, a:visited{ color: #ff8400; } #content a:hover{ background: #ff8400; color: #FFFFFF; } …

---

## [ActionController::RoutingError -\> Functional Tests and :path\_prefix in routes.rb](https://www.ruby-forum.com/t/actioncontroller-routingerror-functional-tests-and-path-prefix-in-routes-rb/167852)

<div class="topic-metadata">

**Author:** [@Pablo\_Alonso\_GarcSS](https://www.ruby-forum.com/u/Pablo_Alonso_GarcSS)\
**Replies:** 0\
**Last updated:** [May 13, 2009, 9:59am UTC](https://www.ruby-forum.com/t/actioncontroller-routingerror-functional-tests-and-path-prefix-in-routes-rb/167852 "2009-05-13T09:59:18Z")

</div>

Hi, I’m trying to write a test for my ProfilesController, which I mapped in my routes.rb, using: map.resource :profile, :path\_prefix =\> ‘:account’ This way, I have routes like: profile POST /:account/pr…

---

## [Contact us form (n00b)](https://www.ruby-forum.com/t/contact-us-form-n00b/167851)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [May 13, 2009, 9:57am UTC](https://www.ruby-forum.com/t/contact-us-form-n00b/167851 "2009-05-13T09:57:33Z")

</div>

Im at a loss…and its something with my routes… i have an index.html.erb that generates a partial \<% page\_title(“Contact Us”) %\> \<% content\_for :banner do %\> \<%= render :partial =\> ‘contacts/banner’ %\> \<% end %\> \<%=…

---

## [CMS and REST - best practices](https://www.ruby-forum.com/t/cms-and-rest-best-practices/167727)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 6\
**Last updated:** [May 13, 2009, 9:45am UTC](https://www.ruby-forum.com/t/cms-and-rest-best-practices/167727 "2009-05-13T09:45:12Z")

</div>

OK I need a bit of direction for this. I want to build an app where I have a CMS side that edits everything (which is all private), then a public side which just views is all. My dilemma is how to set this up. What is…

---

## [Multilingual model content](https://www.ruby-forum.com/t/multilingual-model-content/167848)

<div class="topic-metadata">

**Author:** [@roa](https://www.ruby-forum.com/u/roa)\
**Replies:** 7\
**Last updated:** [May 13, 2009, 9:43am UTC](https://www.ruby-forum.com/t/multilingual-model-content/167848 "2009-05-13T09:43:30Z")

</div>

Hi I’m looking for some insight in a small problem I have. I allready posted this in the Rails I18n forum, but didn’t got any respond, so maybe it was just the wrong forum. I need multilingual input in my models. Let…

---

## [Integration testing edit actions (PUT method)](https://www.ruby-forum.com/t/integration-testing-edit-actions-put-method/167816)

<div class="topic-metadata">

**Author:** [@jarl](https://www.ruby-forum.com/u/jarl)\
**Replies:** 2\
**Last updated:** [May 13, 2009, 9:27am UTC](https://www.ruby-forum.com/t/integration-testing-edit-actions-put-method/167816 "2009-05-13T09:27:00Z")

</div>

Hi. I am (integration) testing a standard edit action. I realise that the http request is not actually a PUT request, but rather a POST request with a hidden field in the form named “\_method”, which has the value “pu…

---

## [Plotting data with flot](https://www.ruby-forum.com/t/plotting-data-with-flot/167843)

<div class="topic-metadata">

**Author:** [@MrSBless](https://www.ruby-forum.com/u/MrSBless)\
**Replies:** 0\
**Last updated:** [May 13, 2009, 7:48am UTC](https://www.ruby-forum.com/t/plotting-data-with-flot/167843 "2009-05-13T07:48:21Z")

</div>

I know this is not the right place to raise this question and at the same time i do know that this is the right place to get the right people. So, I am raising it over here (because i am struck in the middle of nowher…

---

## [Encrypt passwords in the database](https://www.ruby-forum.com/t/encrypt-passwords-in-the-database/167578)

<div class="topic-metadata">

**Author:** [@Lakridserne](https://www.ruby-forum.com/u/Lakridserne)\
**Replies:** 4\
**Last updated:** [May 13, 2009, 6:36am UTC](https://www.ruby-forum.com/t/encrypt-passwords-in-the-database/167578 "2009-05-13T06:36:55Z")

</div>

Hi, I know that there is a way to encrypt passwords, but what would be the easiest? For example you have 2 functions in php. You use them by calling: fuction(“data-to-be-encrypted-here”); But is there a similar way …

---

## [\[ANN\] rubytest.vim 0.9.5 released](https://www.ruby-forum.com/t/ann-rubytest-vim-0-9-5-released/196960)

<div class="topic-metadata">

**Author:** [@flowerborn](https://www.ruby-forum.com/u/flowerborn)\
**Replies:** 0\
**Last updated:** [May 13, 2009, 5:58am UTC](https://www.ruby-forum.com/t/ann-rubytest-vim-0-9-5-released/196960 "2009-05-13T05:58:53Z")

</div>

Hi guys, I’m pleased to announce that rubytest.vim 0.9.5 is just released. Rubytest.vim is a vim (http://www.vim.org) plugin, which helps you to run many kinds of ruby test (including vanilla test, rspec, shoulda etc…

---

## [How to access to global i18n files in a plugin?](https://www.ruby-forum.com/t/how-to-access-to-global-i18n-files-in-a-plugin/167836)

<div class="topic-metadata">

**Author:** [@Peng\_Zuo](https://www.ruby-forum.com/u/Peng_Zuo)\
**Replies:** 0\
**Last updated:** [May 13, 2009, 4:38am UTC](https://www.ruby-forum.com/t/how-to-access-to-global-i18n-files-in-a-plugin/167836 "2009-05-13T04:38:11Z")

</div>

I’m writing a rails plugin.while it has its own locale files, I want to use some of the existing translations. how can I do that? TIA Regards, Peng Zuo

---

## [\[ANN/ADV\] "The Well-Grounded Rubyist" now out in paperback](https://www.ruby-forum.com/t/ann-adv-the-well-grounded-rubyist-now-out-in-paperback/167776)

<div class="topic-metadata">

**Author:** [@David\_ASBlack](https://www.ruby-forum.com/u/David_ASBlack)\
**Replies:** 1\
**Last updated:** [May 13, 2009, 2:24am UTC](https://www.ruby-forum.com/t/ann-adv-the-well-grounded-rubyist-now-out-in-paperback/167776 "2009-05-13T02:24:14Z")

</div>

Hello all – I’m delighted to announce that my new book “The Well-Grounded Rubyist” is now available in paperback (and still in PDF, of course). It’s published by Manning, and it’s in stock at the publisher\[1\] and Ama…

---

## [Html sitemap](https://www.ruby-forum.com/t/html-sitemap/167818)

<div class="topic-metadata">

**Author:** [@mumf83](https://www.ruby-forum.com/u/mumf83)\
**Replies:** 2\
**Last updated:** [May 13, 2009, 12:33am UTC](https://www.ruby-forum.com/t/html-sitemap/167818 "2009-05-13T00:33:52Z")

</div>

Hi, I’m trying to create a hierarchy html page of a sitemap from my routes.rb file. Each entry needs to use its name and link to its page. I keep finding stuff about using an XML sitmap but I don’t want this as I wan…

---

## [How much data can be stored in the cookie?](https://www.ruby-forum.com/t/how-much-data-can-be-stored-in-the-cookie/167820)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 3\
**Last updated:** [May 13, 2009, 12:02am UTC](https://www.ruby-forum.com/t/how-much-data-can-be-stored-in-the-cookie/167820 "2009-05-13T00:02:30Z")

</div>

I’ve looked online, but I can’t find a concrete answer to this. I’m considering storing some data in the user’s cookie, to be accessed by javascript. It’s not sensitive information, so security isn’t a problem. Altoge…

---

## [Belong to and search](https://www.ruby-forum.com/t/belong-to-and-search/167770)

<div class="topic-metadata">

**Author:** [@shinkaku](https://www.ruby-forum.com/u/shinkaku)\
**Replies:** 9\
**Last updated:** [May 12, 2009, 11:55pm UTC](https://www.ruby-forum.com/t/belong-to-and-search/167770 "2009-05-12T23:55:49Z")

</div>

Hi, I’m trying to understand belongs\_to and has\_many etc… I understand the relationship but I’m trying to figure how this can help me for example I have two tables i have 2 tables called mothers and another called ch…

---

## [Migrate VB.NET to ROR](https://www.ruby-forum.com/t/migrate-vb-net-to-ror/167756)

<div class="topic-metadata">

**Author:** [@GeoKid](https://www.ruby-forum.com/u/GeoKid)\
**Replies:** 3\
**Last updated:** [May 12, 2009, 11:00pm UTC](https://www.ruby-forum.com/t/migrate-vb-net-to-ror/167756 "2009-05-12T23:00:45Z")

</div>

Hi, We are currently hitting among ourselves to see if there is migration tool/process in place to convert a VB.NET code base into ROR. Essentially, our product is currently a desktop version and one of the options f…

---

## [Date/Time problems on Windows](https://www.ruby-forum.com/t/date-time-problems-on-windows/167802)

<div class="topic-metadata">

**Author:** [@Piers\_Denney](https://www.ruby-forum.com/u/Piers_Denney)\
**Replies:** 1\
**Last updated:** [May 12, 2009, 10:30pm UTC](https://www.ruby-forum.com/t/date-time-problems-on-windows/167802 "2009-05-12T22:30:43Z")

</div>

Hi All, I have a system running on Win Server2003 and SqlServer 2008. Machine is set to GMT-6 for its timezone i.e Central Time with Daylight Savings enabled. When I add records, the time shown in the fields is shown…

---

## [Upload file with url parameter](https://www.ruby-forum.com/t/upload-file-with-url-parameter/167668)

<div class="topic-metadata">

**Author:** [@hongseok.com](https://www.ruby-forum.com/u/hongseok.com)\
**Replies:** 7\
**Last updated:** [May 12, 2009, 10:21pm UTC](https://www.ruby-forum.com/t/upload-file-with-url-parameter/167668 "2009-05-12T22:21:54Z")

</div>

I want to upload file using get method. for example, “http://www.mydomain.com/upload?file=c:\\test.exe” upload my local file to the remote server. I found one useful link about file uploading here(http:// Ruby on Rail…

---

## [Where to put additional code for model](https://www.ruby-forum.com/t/where-to-put-additional-code-for-model/167750)

<div class="topic-metadata">

**Author:** [@jimb](https://www.ruby-forum.com/u/jimb)\
**Replies:** 12\
**Last updated:** [May 12, 2009, 9:47pm UTC](https://www.ruby-forum.com/t/where-to-put-additional-code-for-model/167750 "2009-05-12T21:47:48Z")

</div>

Hi, I have written a method to map three ‘virtual’ fields in my form to one ‘proper’ field in my model. It looks like this: class Class def map\_three\_fields(var1, var2, var3) string\_val = “…do stuff…” self.class\_e…

---

## [@new\_record\_before\_save](https://www.ruby-forum.com/t/new-record-before-save/167808)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [May 12, 2009, 9:47pm UTC](https://www.ruby-forum.com/t/new-record-before-save/167808 "2009-05-12T21:47:17Z")

</div>

Is there an easy way to access the ActiveRecord @new\_record\_before\_save attribute? Thanks, Tom

---

## [What to use for sanitize?](https://www.ruby-forum.com/t/what-to-use-for-sanitize/167775)

<div class="topic-metadata">

**Author:** [@mix](https://www.ruby-forum.com/u/mix)\
**Replies:** 2\
**Last updated:** [May 12, 2009, 9:44pm UTC](https://www.ruby-forum.com/t/what-to-use-for-sanitize/167775 "2009-05-12T21:44:56Z")

</div>

Hi, i’m allowing users to upload html stuff, what can i use to sanitize it? h() it’s not good as it escape everything, and i’ve found that the rails sanitize() is too strict, it sanitize also css style attributes, so …

---

## [Has\_many :through , extra data retrieval](https://www.ruby-forum.com/t/has-many-through-extra-data-retrieval/167811)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 0\
**Last updated:** [May 12, 2009, 9:16pm UTC](https://www.ruby-forum.com/t/has-many-through-extra-data-retrieval/167811 "2009-05-12T21:16:09Z")

</div>

I have a has\_many :through companies \<-\> markets with emails as the join table. The view is relatively easy: \<% form\_for :market, :html =\> { :id =\> ‘marketform’ } do |f|%\> \<%= hidden\_field\_tag “company\[companyid\]”, @…

---

## [Running rake test:units yields DEPRECIATION WARNING: Disabling sessions for a single controller](https://www.ruby-forum.com/t/running-rake-test-units-yields-depreciation-warning-disabling-sessions-for-a-single-controller/167784)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [May 12, 2009, 7:37pm UTC](https://www.ruby-forum.com/t/running-rake-test-units-yields-depreciation-warning-disabling-sessions-for-a-single-controller/167784 "2009-05-12T19:37:30Z")

</div>

When I run my rake test:units I get the following: DEPRECATION WARNING: Disabling sessions for a single controller has been deprecated. Sessions are now lazy loaded. So if you don’t access them, consider them off. You…

---

## [What database field type should i use?](https://www.ruby-forum.com/t/what-database-field-type-should-i-use/167387)

<div class="topic-metadata">

**Author:** [@Vipin](https://www.ruby-forum.com/u/Vipin)\
**Replies:** 13\
**Last updated:** [May 12, 2009, 7:07pm UTC](https://www.ruby-forum.com/t/what-database-field-type-should-i-use/167387 "2009-05-12T19:07:30Z")

</div>

in a database table if there is a field which has a certain set of fixed values. for example staus =\> {Single, Married, Divorced } OR state =\> {California, Albama, Olaska …} so what should be preferred way out of th…

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

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