# Rails

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

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

---

## [Seach users to invite, how ineficient is what I use?](https://www.ruby-forum.com/t/seach-users-to-invite-how-ineficient-is-what-i-use/151097)

<div class="topic-metadata">

**Author:** [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Replies:** 1\
**Last updated:** [October 17, 2008, 12:38pm UTC](https://www.ruby-forum.com/t/seach-users-to-invite-how-ineficient-is-what-i-use/151097 "2008-10-17T12:38:44Z")

</div>

Hi, I’m using HasManyFriends plugin. I’m listing friends so users can request friendship. From those I have to remove the admin, the current user and users that are friends already. For that I used this: def index …

---

## [Add fixtures Class mothodes](https://www.ruby-forum.com/t/add-fixtures-class-mothodes/151141)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [October 17, 2008, 10:27am UTC](https://www.ruby-forum.com/t/add-fixtures-class-mothodes/151141 "2008-10-17T10:27:37Z")

</div>

Dear All I am using fixtures to load data into my program. But when loading data into the table later, I use: directory = File.join(File.dirname(FILE), “data/2007”) Fixtures.create\_fixtures(directory, “filename”) Th…

---

## [2 Models: Same name, different namespace =\> Problems](https://www.ruby-forum.com/t/2-models-same-name-different-namespace-problems/151051)

<div class="topic-metadata">

**Author:** [@der\_flo](https://www.ruby-forum.com/u/der_flo)\
**Replies:** 5\
**Last updated:** [October 17, 2008, 10:04am UTC](https://www.ruby-forum.com/t/2-models-same-name-different-namespace-problems/151051 "2008-10-17T10:04:44Z")

</div>

Let’s start with an example: class Comment \< ActiveRecord::Base end dummy (to invent a “table namespace”) class Review \< ActiveRecord::Base end … dummy is “review\_comments” in the database class Review::Comment \< A…

---

## [How to deal with these 3 model's association?](https://www.ruby-forum.com/t/how-to-deal-with-these-3-models-association/151125)

<div class="topic-metadata">

**Author:** [@jette](https://www.ruby-forum.com/u/jette)\
**Replies:** 2\
**Last updated:** [October 17, 2008, 10:02am UTC](https://www.ruby-forum.com/t/how-to-deal-with-these-3-models-association/151125 "2008-10-17T10:02:22Z")

</div>

Now I have 3 models, item category and sub-category and 3 Tables in my database. I planed to set the association like this. Item Belongs\_to :category Belongs\_to :sub-category category Has\_many :items Has\_many :su…

---

## [Redirect for render\_component](https://www.ruby-forum.com/t/redirect-for-render-component/151132)

<div class="topic-metadata">

**Author:** [@balavrscse](https://www.ruby-forum.com/u/balavrscse)\
**Replies:** 1\
**Last updated:** [October 17, 2008, 10:02am UTC](https://www.ruby-forum.com/t/redirect-for-render-component/151132 "2008-10-17T10:02:21Z")

</div>

Hi, i am using \<%=render\_component(:controller=\>“mycontroller”,:action=\>“myaction”)%\> on the view. in my controller i am checking the conditions whether session is there or not. if session is there i am rendering m…

---

## [Link\_to + image\_tag](https://www.ruby-forum.com/t/link-to-image-tag/151135)

<div class="topic-metadata">

**Author:** [@lostwarrior](https://www.ruby-forum.com/u/lostwarrior)\
**Replies:** 2\
**Last updated:** [October 17, 2008, 9:25am UTC](https://www.ruby-forum.com/t/link-to-image-tag/151135 "2008-10-17T09:25:59Z")

</div>

i want to integrated link\_to with image\_tag before i did link\_to with image\_tag like this \<%=link\_to image\_tag(image.filename ,:size=\>‘110x85’),{:action=\>‘thumb\_crop’,:controller=\>‘light’,:id=\>image.id},:class=\>‘light…

---

## [Hot cache](https://www.ruby-forum.com/t/hot-cache/151069)

<div class="topic-metadata">

**Author:** [@stonebreaker](https://www.ruby-forum.com/u/stonebreaker)\
**Replies:** 2\
**Last updated:** [October 17, 2008, 8:41am UTC](https://www.ruby-forum.com/t/hot-cache/151069 "2008-10-17T08:41:30Z")

</div>

Hi, I have a page that takes about 1 second to generate, when the amount of data is large. This page is cached. When new data is comming in and imported by a background process I want to rebuild the cached pages beco…

---

## [Form\_remote\_tag and :with](https://www.ruby-forum.com/t/form-remote-tag-and-with/150080)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 5\
**Last updated:** [October 17, 2008, 8:37am UTC](https://www.ruby-forum.com/t/form-remote-tag-and-with/150080 "2008-10-17T08:37:23Z")

</div>

I am trying to pass the result from a javascript function along with the result from a text\_field with form\_remote\_tag. This is what I have so far, but no go: \<% form\_remote\_tag(:url =\> {:controller =\> 'requests', :a…

---

## [Changing error message](https://www.ruby-forum.com/t/changing-error-message/151120)

<div class="topic-metadata">

**Author:** [@inrila](https://www.ruby-forum.com/u/inrila)\
**Replies:** 1\
**Last updated:** [October 17, 2008, 7:05am UTC](https://www.ruby-forum.com/t/changing-error-message/151120 "2008-10-17T07:05:07Z")

</div>

Is there any way to change or hack the error message which we get on the form – usually it is like “field name” then “message itself”, which is pretty inconvenient. Any chance we can change that? Thanks!

---

## [HTTP Digest Authentication](https://www.ruby-forum.com/t/http-digest-authentication/126147)

<div class="topic-metadata">

**Author:** [@brian.oneill](https://www.ruby-forum.com/u/brian.oneill)\
**Replies:** 3\
**Last updated:** [October 17, 2008, 5:15am UTC](https://www.ruby-forum.com/t/http-digest-authentication/126147 "2008-10-17T05:15:31Z")

</div>

I just started using authenticate\_or\_request\_with\_http\_basic. Is anyone working on the digest version of that? (I realize it may get a little complicated with the handshaking) If not, I wouldn’t mind contributing it. …

---

## [Pragmatic's Adv. Ruby on Rails Studio in Denver (November 17-19)](https://www.ruby-forum.com/t/pragmatics-adv-ruby-on-rails-studio-in-denver-november-17-19/151119)

<div class="topic-metadata">

**Author:** [@DarthMacDougal](https://www.ruby-forum.com/u/DarthMacDougal)\
**Replies:** 0\
**Last updated:** [October 17, 2008, 3:32am UTC](https://www.ruby-forum.com/t/pragmatics-adv-ruby-on-rails-studio-in-denver-november-17-19/151119 "2008-10-17T03:32:36Z")

</div>

If you interested in attending this and haven’t signed up yet but want to save a few hundred smackers, DO NOT WAIT to contact us at http://groups.google.com/group/advanced-ror-studio. We only need ONE MORE intrepid R…

---

## [Memory Leak](https://www.ruby-forum.com/t/memory-leak/150304)

<div class="topic-metadata">

**Author:** [@Alex\_Gregianin](https://www.ruby-forum.com/u/Alex_Gregianin)\
**Replies:** 6\
**Last updated:** [October 17, 2008, 2:21am UTC](https://www.ruby-forum.com/t/memory-leak/150304 "2008-10-17T02:21:13Z")

</div>

Does anybody here had any luck on tracking down memory leaks on Rails apps? i’ve got a small application that no matter what i try to do,the mongrels processes keep growing and growing up.I’ve heard Evan made this g…

---

## [Running SQL file from inside rake task](https://www.ruby-forum.com/t/running-sql-file-from-inside-rake-task/151105)

<div class="topic-metadata">

**Author:** [@joep](https://www.ruby-forum.com/u/joep)\
**Replies:** 2\
**Last updated:** [October 17, 2008, 1:12am UTC](https://www.ruby-forum.com/t/running-sql-file-from-inside-rake-task/151105 "2008-10-17T01:12:18Z")

</div>

My friends, I have a rake task that I’m running to initialize some stuff for new servers. I need to run a SQL file from inside that rake task. It’s just a big, raw SQL file. How can I run the SQL file from inside t…

---

## [Mixing joins and include conflicts](https://www.ruby-forum.com/t/mixing-joins-and-include-conflicts/151091)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 4\
**Last updated:** [October 17, 2008, 1:04am UTC](https://www.ruby-forum.com/t/mixing-joins-and-include-conflicts/151091 "2008-10-17T01:04:42Z")

</div>

I have found that Rails doesn’t works well when mixing joins and includes. For example I have the following models: Event, Attendance and User. class Event \< ActiveRecord::Base User that creates the event belongs\_to …

---

## [Use of button\_to to access action "new"](https://www.ruby-forum.com/t/use-of-button-to-to-access-action-new/151103)

<div class="topic-metadata">

**Author:** [@markmt](https://www.ruby-forum.com/u/markmt)\
**Replies:** 2\
**Last updated:** [October 16, 2008, 11:19pm UTC](https://www.ruby-forum.com/t/use-of-button-to-to-access-action-new/151103 "2008-10-16T23:19:18Z")

</div>

I have a question about what is regarded as good practice in the context of RESTful Rails interfaces. I have a Subscribers Controller with “index” and “new” (and other) actions. In routes.rb I define resource-based ro…

---

## [Rails sessions working intermittently in IE7](https://www.ruby-forum.com/t/rails-sessions-working-intermittently-in-ie7/151020)

<div class="topic-metadata">

**Author:** [@gwgeller](https://www.ruby-forum.com/u/gwgeller)\
**Replies:** 9\
**Last updated:** [October 16, 2008, 10:28pm UTC](https://www.ruby-forum.com/t/rails-sessions-working-intermittently-in-ie7/151020 "2008-10-16T22:28:14Z")

</div>

Hello, We are developing in Rails 2.1.0 and serving the files with mongrels behind Apache. We are using SqlSessionStore. Recently I noticed that when logging into our site using IE7 the session doesn’t persist in som…

---

## [Xml missing template](https://www.ruby-forum.com/t/xml-missing-template/151046)

<div class="topic-metadata">

**Author:** [@matt](https://www.ruby-forum.com/u/matt)\
**Replies:** 3\
**Last updated:** [October 16, 2008, 10:27pm UTC](https://www.ruby-forum.com/t/xml-missing-template/151046 "2008-10-16T22:27:03Z")

</div>

Hello, I am building my first rails 2 app and using xml builder for the first time. After digging around I some builder tutorials, yay :slight\_smile: But I have quickly run into a problem. When I name my file titl…

---

## [Keep getting "Undefined local variable or method" when creating a new rails application](https://www.ruby-forum.com/t/keep-getting-undefined-local-variable-or-method-when-creating-a-new-rails-application/151033)

<div class="topic-metadata">

**Author:** [@command0](https://www.ruby-forum.com/u/command0)\
**Replies:** 4\
**Last updated:** [October 16, 2008, 8:38pm UTC](https://www.ruby-forum.com/t/keep-getting-undefined-local-variable-or-method-when-creating-a-new-rails-application/151033 "2008-10-16T20:38:19Z")

</div>

Hi, I’m fairly a noob to rails, and just trying to grasp the entire structure and concept. I think I’m getting it for the most part, but just can’t seem to get past this error. I keep getting “Action Controller” page …

---

## [Local path to public directory](https://www.ruby-forum.com/t/local-path-to-public-directory/151099)

<div class="topic-metadata">

**Author:** [@Seyit\_Caglar\_Abbaso](https://www.ruby-forum.com/u/Seyit_Caglar_Abbaso)\
**Replies:** 2\
**Last updated:** [October 16, 2008, 7:57pm UTC](https://www.ruby-forum.com/t/local-path-to-public-directory/151099 "2008-10-16T19:57:53Z")

</div>

I was searching web for sometime but I couldn’t find the answer. Is there a way to get the local path for public folder of a rails application. Lets say my applications name is ‘depot’. I want the path to its public …

---

## [Associated Models and :dependent =\> :destroy](https://www.ruby-forum.com/t/associated-models-and-dependent-destroy/151026)

<div class="topic-metadata">

**Author:** [@aviir](https://www.ruby-forum.com/u/aviir)\
**Replies:** 3\
**Last updated:** [October 16, 2008, 7:49pm UTC](https://www.ruby-forum.com/t/associated-models-and-dependent-destroy/151026 "2008-10-16T19:49:19Z")

</div>

Hello, I’m a rails beginner and I would appreciate any help on this problem. I have two models, Workbook and WorkbookContent. Workbook holds uploaded Excel workbooks (through attachment\_fu). I want to parse the dat…

---

## [Active merchant](https://www.ruby-forum.com/t/active-merchant/151095)

<div class="topic-metadata">

**Author:** [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Replies:** 0\
**Last updated:** [October 16, 2008, 7:38pm UTC](https://www.ruby-forum.com/t/active-merchant/151095 "2008-10-16T19:38:32Z")

</div>

Hello Friends, As i am using AuthorizeNetGateway for payment. So again with price i want to store the user information as well currently i am just passing the following information response = gateway.purchase(amoun…

---

## [RESTful question](https://www.ruby-forum.com/t/restful-question/151092)

<div class="topic-metadata">

**Author:** [@digant](https://www.ruby-forum.com/u/digant)\
**Replies:** 3\
**Last updated:** [October 16, 2008, 6:29pm UTC](https://www.ruby-forum.com/t/restful-question/151092 "2008-10-16T18:29:14Z")

</div>

I have a restful app which is laid out in true restful fashion. But I need a way to dump all the info since the purpose of this app is to generate a config file. Do I create a new model and have the index of that do t…

---

## [Modularisation: Using helper generating HTML output vs. using partials](https://www.ruby-forum.com/t/modularisation-using-helper-generating-html-output-vs-using-partials/151083)

<div class="topic-metadata">

**Author:** [@msmsms](https://www.ruby-forum.com/u/msmsms)\
**Replies:** 1\
**Last updated:** [October 16, 2008, 5:18pm UTC](https://www.ruby-forum.com/t/modularisation-using-helper-generating-html-output-vs-using-partials/151083 "2008-10-16T17:18:04Z")

</div>

Hey, I’ve got a general question: when do I use helper and when I do use partials to modularise certain gui elements? For example: I’ve got a faq list. Each item can be folded and unfolded using ajax. FAQ foo -\> qu…

---

## [Behaviour Accept header vs. respond\_to](https://www.ruby-forum.com/t/behaviour-accept-header-vs-respond-to/151065)

<div class="topic-metadata">

**Author:** [@tieleman](https://www.ruby-forum.com/u/tieleman)\
**Replies:** 1\
**Last updated:** [October 16, 2008, 5:12pm UTC](https://www.ruby-forum.com/t/behaviour-accept-header-vs-respond-to/151065 "2008-10-16T17:12:12Z")

</div>

Hi list, I noticed some strange behaviour while testing out a couple of things regarding building an API. Suppose I have a very basic Rails app with just one resource “widgets”, I’d have the following URLs: http://so…

---

## [\[Announcement\] Billing Module for your SaaS web application is here: ServiceMerchant](https://www.ruby-forum.com/t/announcement-billing-module-for-your-saas-web-application-is-here-servicemerchant/151084)

<div class="topic-metadata">

**Author:** [@Alex\_Lebedev](https://www.ruby-forum.com/u/Alex_Lebedev)\
**Replies:** 0\
**Last updated:** [October 16, 2008, 4:37pm UTC](https://www.ruby-forum.com/t/announcement-billing-module-for-your-saas-web-application-is-here-servicemerchant/151084 "2008-10-16T16:37:28Z")

</div>

\[Announcement\] Billing Module for your SaaS web application is here: ServiceMerchant == In two sentences ServiceMerchant is open-source library, developed in Ruby, which takes care of recurring billings and subscript…

---

## [Running several rails apps](https://www.ruby-forum.com/t/running-several-rails-apps/151082)

<div class="topic-metadata">

**Author:** [@spacechurro](https://www.ruby-forum.com/u/spacechurro)\
**Replies:** 1\
**Last updated:** [October 16, 2008, 4:36pm UTC](https://www.ruby-forum.com/t/running-several-rails-apps/151082 "2008-10-16T16:36:52Z")

</div>

i am currently running four concurrent rails apps on the same server… they are all running as individual mongrel apps… this seems to be an inefficient use of memory… is there a better way to do this? thanks!

---

## [Block default validation](https://www.ruby-forum.com/t/block-default-validation/151078)

<div class="topic-metadata">

**Author:** [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Replies:** 3\
**Last updated:** [October 16, 2008, 3:58pm UTC](https://www.ruby-forum.com/t/block-default-validation/151078 "2008-10-16T15:58:03Z")

</div>

Hello friends, How to avoid or block the default validation at the time of updating records? regards Abhishek

---

## [Favicon?](https://www.ruby-forum.com/t/favicon/76747)

<div class="topic-metadata">

**Author:** [@davidtl](https://www.ruby-forum.com/u/davidtl)\
**Replies:** 6\
**Last updated:** [October 16, 2008, 3:44pm UTC](https://www.ruby-forum.com/t/favicon/76747 "2008-10-16T15:44:09Z")

</div>

I’m sure I’m missing something rudimentary here… I seem to be having difficulty getting my favicon to appear. I have my favicon.ico in the public folder. I’ve configured my route.rb to route the intro page to my “home…

---

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

<div class="topic-metadata">

**Author:** [@Franz\_S](https://www.ruby-forum.com/u/Franz_S)\
**Replies:** 1\
**Last updated:** [October 16, 2008, 3:21pm UTC](https://www.ruby-forum.com/t/testing-question/151062 "2008-10-16T15:21:37Z")

</div>

Hello folks, I need to write a method that will return a PDF to the user. Does anyone know of any documentation on how to test such functionality? Thanks in advance. Regards, Franz

---

## [Rails Validation on update](https://www.ruby-forum.com/t/rails-validation-on-update/151073)

<div class="topic-metadata">

**Author:** [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Replies:** 0\
**Last updated:** [October 16, 2008, 3:12pm UTC](https://www.ruby-forum.com/t/rails-validation-on-update/151073 "2008-10-16T15:12:52Z")

</div>

Hello friends, I am using “validates\_presence\_of :password, :if =\> :password\_required?” for password validation but at the time of updating a profile i don’t want to use the default validation…

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

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