# Rails

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

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

---

## [Ajax call once on page load](https://www.ruby-forum.com/t/ajax-call-once-on-page-load/150034)

<div class="topic-metadata">

**Author:** [@ratcheer](https://www.ruby-forum.com/u/ratcheer)\
**Replies:** 2\
**Last updated:** [October 2, 2008, 11:57pm UTC](https://www.ruby-forum.com/t/ajax-call-once-on-page-load/150034 "2008-10-02T23:57:28Z")

</div>

I want to run an Ajax call but I don’t want to do it through a link (link\_to\_remote), through a form (form\_remote\_tag) or periodically (periodically\_call\_remote). I just want to make the call once and I want to happe…

---

## [Alternative to "script/plugin install -x" that works with git](https://www.ruby-forum.com/t/alternative-to-script-plugin-install-x-that-works-with-git/150057)

<div class="topic-metadata">

**Author:** [@Miles\_G](https://www.ruby-forum.com/u/Miles_G)\
**Replies:** 1\
**Last updated:** [October 2, 2008, 11:15pm UTC](https://www.ruby-forum.com/t/alternative-to-script-plugin-install-x-that-works-with-git/150057 "2008-10-02T23:15:18Z")

</div>

I miss the svn:externals feature when installing plugins that are managed under git. the -x switch used to do this. I’ve released a gem called externals that manages subprojects in an scm agnostic way so that I can u…

---

## [Re: 'new' sql injection attack](https://www.ruby-forum.com/t/re-new-sql-injection-attack/150055)

<div class="topic-metadata">

**Author:** [@fcheung](https://www.ruby-forum.com/u/fcheung)\
**Replies:** 0\
**Last updated:** [October 2, 2008, 11:04pm UTC](https://www.ruby-forum.com/t/re-new-sql-injection-attack/150055 "2008-10-02T23:04:11Z")

</div>

While the payload may be slightly novel and quite crafty it looks like just good old fashioned SQL injection Fred Sent from my iPhone

---

## [How to handle asset groups within groups?](https://www.ruby-forum.com/t/how-to-handle-asset-groups-within-groups/149997)

<div class="topic-metadata">

**Author:** [@Sean\_CSHess](https://www.ruby-forum.com/u/Sean_CSHess)\
**Replies:** 1\
**Last updated:** [October 2, 2008, 10:44pm UTC](https://www.ruby-forum.com/t/how-to-handle-asset-groups-within-groups/149997 "2008-10-02T22:44:43Z")

</div>

Hi Everyone, I’m stumped. Imagine I have a bunch of assets. I want to be able to group them together (like in graphics programs), and then be able to group them into further groups. What is the best way to do this? …

---

## ['new' sql injection attack](https://www.ruby-forum.com/t/new-sql-injection-attack/150053)

<div class="topic-metadata">

**Author:** [@jshow](https://www.ruby-forum.com/u/jshow)\
**Replies:** 0\
**Last updated:** [October 2, 2008, 10:37pm UTC](https://www.ruby-forum.com/t/new-sql-injection-attack/150053 "2008-10-02T22:37:40Z")

</div>

I’ve found references to the following attack in our logs this week: http://www.lexa.ru/security-alerts/msg01435.html At the time of the above posts writing, it was targeted at IIS and mysql - but the general scheme l…

---

## [Param with map.resources](https://www.ruby-forum.com/t/param-with-map-resources/149893)

<div class="topic-metadata">

**Author:** [@ISESSmith-Heister](https://www.ruby-forum.com/u/ISESSmith-Heister)\
**Replies:** 5\
**Last updated:** [October 2, 2008, 8:46pm UTC](https://www.ruby-forum.com/t/param-with-map-resources/149893 "2008-10-02T20:46:11Z")

</div>

Hi all, With ye olde routes, you could do stuff like: map.connect ‘/foo/:id’, :controller =\> ‘bar’, :type =\> ‘foo’ but you can’t pass arbitrary params into #resources: map.resources :foo, :controller =\> ‘bar’, :type …

---

## [Convert html to plain text in ruby](https://www.ruby-forum.com/t/convert-html-to-plain-text-in-ruby/149989)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [October 2, 2008, 8:27pm UTC](https://www.ruby-forum.com/t/convert-html-to-plain-text-in-ruby/149989 "2008-10-02T20:27:25Z")

</div>

Hi, I’m looking for a way to convert html to plain text. Now, I know about strip\_tags, but - as the name says - that only strips the tags. What I need is to get stuff like & and \< back to & and \< too. Any help? Tha…

---

## [Multiple belong\_to associations & build](https://www.ruby-forum.com/t/multiple-belong-to-associations-build/150040)

<div class="topic-metadata">

**Author:** [@jonas\_s](https://www.ruby-forum.com/u/jonas_s)\
**Replies:** 1\
**Last updated:** [October 2, 2008, 8:10pm UTC](https://www.ruby-forum.com/t/multiple-belong-to-associations-build/150040 "2008-10-02T20:10:20Z")

</div>

Hey guys, I have a Comment model which belongs\_to a Post and a User model. Now I want to be able to build a comment for this User and this Post. Does it really have to go like this: @comment = @idea.comments.build @…

---

## [Dealing with accented characters](https://www.ruby-forum.com/t/dealing-with-accented-characters/149795)

<div class="topic-metadata">

**Author:** [@gwendydd](https://www.ruby-forum.com/u/gwendydd)\
**Replies:** 7\
**Last updated:** [October 2, 2008, 7:56pm UTC](https://www.ruby-forum.com/t/dealing-with-accented-characters/149795 "2008-10-02T19:56:48Z")

</div>

Is there any way to write a search function that can search for words that contain accented characters when the user types in words without accented characters? My database has a lot of names in it that have character…

---

## [Squirrel and acts\_as\_rails](https://www.ruby-forum.com/t/squirrel-and-acts-as-rails/150037)

<div class="topic-metadata">

**Author:** [@ant](https://www.ruby-forum.com/u/ant)\
**Replies:** 0\
**Last updated:** [October 2, 2008, 7:05pm UTC](https://www.ruby-forum.com/t/squirrel-and-acts-as-rails/150037 "2008-10-02T19:05:42Z")

</div>

I have been using Squirrel (thoughtbot case studies featuring design and development projects for websites, mobile and web applications.) for performing rails searches. It really takes the thinking out of sql conditio…

---

## [Wrong respond\_to format used](https://www.ruby-forum.com/t/wrong-respond-to-format-used/150028)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 1\
**Last updated:** [October 2, 2008, 6:58pm UTC](https://www.ruby-forum.com/t/wrong-respond-to-format-used/150028 "2008-10-02T18:58:05Z")

</div>

Hi all, I have a form that wrongly trigger the rjs respond to with ie7. The html repond\_to is correctly used in both FF 3 and Google Chrome. I use the standard form\_for helper and have no idea what could cause this i…

---

## [Simple testing question: Handling login in functional tests](https://www.ruby-forum.com/t/simple-testing-question-handling-login-in-functional-tests/150031)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 4\
**Last updated:** [October 2, 2008, 5:40pm UTC](https://www.ruby-forum.com/t/simple-testing-question-handling-login-in-functional-tests/150031 "2008-10-02T17:40:21Z")

</div>

When writing functional (e.g. controller unit) tests, I’m running into a simple problem that I’m sure is very easy to fix, but I’m not sure of the correct approach. If I request a resource in my test case, via somethi…

---

## [Problems with Routes for user area](https://www.ruby-forum.com/t/problems-with-routes-for-user-area/149863)

<div class="topic-metadata">

**Author:** [@Denix](https://www.ruby-forum.com/u/Denix)\
**Replies:** 1\
**Last updated:** [October 2, 2008, 4:59pm UTC](https://www.ruby-forum.com/t/problems-with-routes-for-user-area/149863 "2008-10-02T16:59:00Z")

</div>

I want such urls in at site: http://mysite.com/freddy/profile/view http://mysite.com/freddy/blog/view … so I want username in my url, and it should use controllers from folder: member And I use this route: map.use…

---

## [Off Topic: Lots of Ruby on Rails jobs available](https://www.ruby-forum.com/t/off-topic-lots-of-ruby-on-rails-jobs-available/150026)

<div class="topic-metadata">

**Author:** [@rorjobs](https://www.ruby-forum.com/u/rorjobs)\
**Replies:** 0\
**Last updated:** [October 2, 2008, 4:51pm UTC](https://www.ruby-forum.com/t/off-topic-lots-of-ruby-on-rails-jobs-available/150026 "2008-10-02T16:51:41Z")

</div>

Hi All - Just wanted to let you know about a bunch of new jobs now listed on http://www.RORJobs.com: Backend Lead Engineer for Social Network Startup at Plinky, Inc. (Lafayette, California) Website Developer/Producer…

---

## [How to use ActiveRecord associations to select from related](https://www.ruby-forum.com/t/how-to-use-activerecord-associations-to-select-from-related/149995)

<div class="topic-metadata">

**Author:** [@rup](https://www.ruby-forum.com/u/rup)\
**Replies:** 1\
**Last updated:** [October 2, 2008, 4:47pm UTC](https://www.ruby-forum.com/t/how-to-use-activerecord-associations-to-select-from-related/149995 "2008-10-02T16:47:38Z")

</div>

table “users” \[Stores user information\] id, username, password,email table “exams” \[Stores exam information\] id, name, description table “questions” \[stores question information\] id, question, opt1, opt2, opt3,opt4,…

---

## [Advice on](https://www.ruby-forum.com/t/advice-on/149902)

<div class="topic-metadata">

**Author:** [@Cameron\_McCloud](https://www.ruby-forum.com/u/Cameron_McCloud)\
**Replies:** 3\
**Last updated:** [October 2, 2008, 4:20pm UTC](https://www.ruby-forum.com/t/advice-on/149902 "2008-10-02T16:20:13Z")

</div>

Hi, Our group (team of 4) have done a few small-scale Rails applications. They’ve been successful enough that we’re contemplating a much larger scale development. By scale I don’t mean the number of users or hits/sec…

---

## [No such file or directory](https://www.ruby-forum.com/t/no-such-file-or-directory/150017)

<div class="topic-metadata">

**Author:** [@se\_pavel](https://www.ruby-forum.com/u/se_pavel)\
**Replies:** 0\
**Last updated:** [October 2, 2008, 3:57pm UTC](https://www.ruby-forum.com/t/no-such-file-or-directory/150017 "2008-10-02T15:57:56Z")

</div>

Hello All, Periodically I have get from live site the following error via email that send me from rescue action of application.rb What do you think happen ? Rails run under FastCGI. Regards, Pavel Error Msg: No su…

---

## [Can't load oracle oci8 libs](https://www.ruby-forum.com/t/cant-load-oracle-oci8-libs/149425)

<div class="topic-metadata">

**Author:** [@gers32](https://www.ruby-forum.com/u/gers32)\
**Replies:** 8\
**Last updated:** [October 2, 2008, 3:42pm UTC](https://www.ruby-forum.com/t/cant-load-oracle-oci8-libs/149425 "2008-10-02T15:42:40Z")

</div>

Hi, I’m deploying a Rails app with a Mongrel Cluster in Red Hat Linux. It communicates with an Oracle database on another machine. I tested ruby-oci8 from the command line, and that worked fine: $ ruby -r oci8 -e “OC…

---

## [HABTM and order by](https://www.ruby-forum.com/t/habtm-and-order-by/150015)

<div class="topic-metadata">

**Author:** [@vanight](https://www.ruby-forum.com/u/vanight)\
**Replies:** 0\
**Last updated:** [October 2, 2008, 2:43pm UTC](https://www.ruby-forum.com/t/habtm-and-order-by/150015 "2008-10-02T14:43:24Z")

</div>

Hi, I have 2 types A (HABTM B) and B (HABTM A). So I’m trying to get List of Bs belonging to A A.Bs but I’d like to get them ordered by B’s name. How can I ordered this array of Bs. Thanks

---

## [Map.resources doubt](https://www.ruby-forum.com/t/map-resources-doubt/149946)

<div class="topic-metadata">

**Author:** [@nilez](https://www.ruby-forum.com/u/nilez)\
**Replies:** 3\
**Last updated:** [October 2, 2008, 2:26pm UTC](https://www.ruby-forum.com/t/map-resources-doubt/149946 "2008-10-02T14:26:54Z")

</div>

Hi Rails experts, I have one doubt regarding map.resources. I am not clear with when to use :method and :collection in map.resources. Please help me out. Thanks.

---

## [Attachment\_fu, Paperclip, & S3](https://www.ruby-forum.com/t/attachment-fu-paperclip-s3/147499)

<div class="topic-metadata">

**Author:** [@chunkyslink](https://www.ruby-forum.com/u/chunkyslink)\
**Replies:** 4\
**Last updated:** [October 2, 2008, 2:25pm UTC](https://www.ruby-forum.com/t/attachment-fu-paperclip-s3/147499 "2008-10-02T14:25:46Z")

</div>

For various reasons, I made a git branch and installed Paperclip in place of attachment\_fu. Paperclip works great except that images seem to have lost some quality; edges have gone a little too jaggy to be able to dro…

---

## [Auto\_complete and protect\_from\_forgery](https://www.ruby-forum.com/t/auto-complete-and-protect-from-forgery/150012)

<div class="topic-metadata">

**Author:** [@pi3orama](https://www.ruby-forum.com/u/pi3orama)\
**Replies:** 0\
**Last updated:** [October 2, 2008, 2:15pm UTC](https://www.ruby-forum.com/t/auto-complete-and-protect-from-forgery/150012 "2008-10-02T14:15:44Z")

</div>

Hello, There are a lot of reports about the conflict between auto\_complete plugin and the protect\_from\_forgery option since 2007: http://www.ruby-forum.com/topic/128970 The solution is very easy. But I curious about …

---

## [STI problem](https://www.ruby-forum.com/t/sti-problem/150007)

<div class="topic-metadata">

**Author:** [@cool](https://www.ruby-forum.com/u/cool)\
**Replies:** 1\
**Last updated:** [October 2, 2008, 1:19pm UTC](https://www.ruby-forum.com/t/sti-problem/150007 "2008-10-02T13:19:13Z")

</div>

I have Person model in that i have used STI like class person \< ActiveRecord class student \<person class parent \< person for every thing i have table called people. when i am adding a student i have fields for paren…

---

## [Comparing created at](https://www.ruby-forum.com/t/comparing-created-at/150006)

<div class="topic-metadata">

**Author:** [@DanC](https://www.ruby-forum.com/u/DanC)\
**Replies:** 1\
**Last updated:** [October 2, 2008, 11:20am UTC](https://www.ruby-forum.com/t/comparing-created-at/150006 "2008-10-02T11:20:04Z")

</div>

I set up a simple blog in my rails app and on the forum index page would like to display when the most recent activity was. I have two table in my database, one for posts and the other for replies. My question is, ho…

---

## [Updating multiple records at once with update action](https://www.ruby-forum.com/t/updating-multiple-records-at-once-with-update-action/150010)

<div class="topic-metadata">

**Author:** [@davidtl](https://www.ruby-forum.com/u/davidtl)\
**Replies:** 0\
**Last updated:** [October 2, 2008, 11:18am UTC](https://www.ruby-forum.com/t/updating-multiple-records-at-once-with-update-action/150010 "2008-10-02T11:18:12Z")

</div>

I have a model called Setting, and I want to be able to edit and update multiple settings at once. Therefore I added this resource to routes.rb: map.resources :settings, :collection =\> {:edit =\> :get, :update =\> :put} …

---

## [Multiple associations in select list not working](https://www.ruby-forum.com/t/multiple-associations-in-select-list-not-working/149998)

<div class="topic-metadata">

**Author:** [@staypufd](https://www.ruby-forum.com/u/staypufd)\
**Replies:** 1\
**Last updated:** [October 2, 2008, 10:30am UTC](https://www.ruby-forum.com/t/multiple-associations-in-select-list-not-working/149998 "2008-10-02T10:30:17Z")

</div>

I would like to generate a select list from multiple associations. Do not know what the problem is. Hope anyone can help. the code below gives me a: “You have a nil object when you didn’t expect it! The error oc…

---

## [Cant save a record project-user-role](https://www.ruby-forum.com/t/cant-save-a-record-project-user-role/150008)

<div class="topic-metadata">

**Author:** [@Mau](https://www.ruby-forum.com/u/Mau)\
**Replies:** 0\
**Last updated:** [October 2, 2008, 10:29am UTC](https://www.ruby-forum.com/t/cant-save-a-record-project-user-role/150008 "2008-10-02T10:29:07Z")

</div>

I have a two models Projects and users. I have a many to many relation. Means that all users can be in a project and a user van be in many porjects. A user can be a Member, Admin. i created the relation table as proje…

---

## [Make a system call and proceed without waiting for result?](https://www.ruby-forum.com/t/make-a-system-call-and-proceed-without-waiting-for-result/149661)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 3\
**Last updated:** [October 2, 2008, 10:10am UTC](https://www.ruby-forum.com/t/make-a-system-call-and-proceed-without-waiting-for-result/149661 "2008-10-02T10:10:50Z")

</div>

This is probably a general ruby question: in one of my models i need to make loads (up to 600 or so) of system calls with the curl command. It’s a fire-and-forget kind of deal - i don’t care, at that particular momen…

---

## [Using ruby on rails to call the web service in java](https://www.ruby-forum.com/t/using-ruby-on-rails-to-call-the-web-service-in-java/149945)

<div class="topic-metadata">

**Author:** [@ruby\_on\_rail](https://www.ruby-forum.com/u/ruby_on_rail)\
**Replies:** 3\
**Last updated:** [October 2, 2008, 9:45am UTC](https://www.ruby-forum.com/t/using-ruby-on-rails-to-call-the-web-service-in-java/149945 "2008-10-02T09:45:03Z")

</div>

Hi Rail experts, I am learning to use ruby on rail to replace our old php based web application. I have one question: originally we have some web services developed in java, and they are running on the jSoapServer (j…

---

## [Problem getting Rails to emit the correct (proxy) domain in route urls](https://www.ruby-forum.com/t/problem-getting-rails-to-emit-the-correct-proxy-domain-in-route-urls/149327)

<div class="topic-metadata">

**Author:** [@sven](https://www.ruby-forum.com/u/sven)\
**Replies:** 1\
**Last updated:** [October 2, 2008, 7:37am UTC](https://www.ruby-forum.com/t/problem-getting-rails-to-emit-the-correct-proxy-domain-in-route-urls/149327 "2008-10-02T07:37:03Z")

</div>

Behind the scenes my app runs like this: http://myapp.mydomain.com/myapp and and https://myapp.mydomain.com/myapp are Apache 2.2 virtual hosts proxy-balanced to a mongrel cluster on the same machine. But I need to …

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

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