# Rails

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

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

---

## [How to get some eager loading to work](https://www.ruby-forum.com/t/how-to-get-some-eager-loading-to-work/144984)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 0\
**Last updated:** [August 4, 2008, 11:26pm UTC](https://www.ruby-forum.com/t/how-to-get-some-eager-loading-to-work/144984 "2008-08-04T23:26:21Z")

</div>

Hello, I am working on a query for the index action of a events\_controller. I fetch all the events followed by two methods which fetch for the users and the event\_categories related to the @events collection: @events …

---

## [Check\_box and that automatic hidden\_field messes up my form](https://www.ruby-forum.com/t/check-box-and-that-automatic-hidden-field-messes-up-my-form/144978)

<div class="topic-metadata">

**Author:** [@costi](https://www.ruby-forum.com/u/costi)\
**Replies:** 3\
**Last updated:** [August 4, 2008, 11:02pm UTC](https://www.ruby-forum.com/t/check-box-and-that-automatic-hidden-field-messes-up-my-form/144978 "2008-08-04T23:02:56Z")

</div>

I’m having a form where the user can select the line items that he wants to create. All line items are new and don’t have an id. I realized that check\_box created a hidden field that’s supposed to help me, but it does…

---

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

<div class="topic-metadata">

**Author:** [@snowbird122](https://www.ruby-forum.com/u/snowbird122)\
**Replies:** 2\
**Last updated:** [August 4, 2008, 10:48pm UTC](https://www.ruby-forum.com/t/restful-design-question/144845 "2008-08-04T22:48:17Z")

</div>

Hello- I’m creating an app where someone can register for an event. They can only register for one event at a time (the events are all concurrently scheduled). I have an event model that has a vanialla model and reso…

---

## [Looking for working example](https://www.ruby-forum.com/t/looking-for-working-example/144975)

<div class="topic-metadata">

**Author:** [@tomtt](https://www.ruby-forum.com/u/tomtt)\
**Replies:** 0\
**Last updated:** [August 4, 2008, 10:02pm UTC](https://www.ruby-forum.com/t/looking-for-working-example/144975 "2008-08-04T22:02:00Z")

</div>

HI im looking for this since … does anyone have an working example of how to cascade drowdowns? Of course with observers and db-relations. NOT RJS! thx in advance

---

## [Ssl\_requirement ajax call from non https to https](https://www.ruby-forum.com/t/ssl-requirement-ajax-call-from-non-https-to-https/144571)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 8\
**Last updated:** [August 4, 2008, 9:35pm UTC](https://www.ruby-forum.com/t/ssl-requirement-ajax-call-from-non-https-to-https/144571 "2008-08-04T21:35:30Z")

</div>

I have a page that has nothing on it that needs to be secured by SSL, except when someone wants to hit an ajax request to login. I don’t want to secure every page, just so that when I render a partial that needs to be…

---

## [Bigger image rendering difficulty using RMagick](https://www.ruby-forum.com/t/bigger-image-rendering-difficulty-using-rmagick/144957)

<div class="topic-metadata">

**Author:** [@nishi](https://www.ruby-forum.com/u/nishi)\
**Replies:** 7\
**Last updated:** [August 4, 2008, 9:31pm UTC](https://www.ruby-forum.com/t/bigger-image-rendering-difficulty-using-rmagick/144957 "2008-08-04T21:31:00Z")

</div>

I am using RMagick for uploading Pictures of Bigger JPG formats. I am able to render the images properly at my page if the image pixels are below 900x900 pixels, but if the images are bigger lets say when I tried to s…

---

## [Ajax update attribute](https://www.ruby-forum.com/t/ajax-update-attribute/144774)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 1\
**Last updated:** [August 4, 2008, 9:26pm UTC](https://www.ruby-forum.com/t/ajax-update-attribute/144774 "2008-08-04T21:26:59Z")

</div>

in controller (that gets called by a link\_to\_remote) session.model.update\_attribute(:viewing, “blah”) It doesn’t seem to update, any ideas? Thanks!

---

## [Is there a RR plugin for RPP?](https://www.ruby-forum.com/t/is-there-a-rr-plugin-for-rpp/144972)

<div class="topic-metadata">

**Author:** [@RR-GYN](https://www.ruby-forum.com/u/RR-GYN)\
**Replies:** 1\
**Last updated:** [August 4, 2008, 9:03pm UTC](https://www.ruby-forum.com/t/is-there-a-rr-plugin-for-rpp/144972 "2008-08-04T21:03:42Z")

</div>

Hi, all. I and my friend are starting a new project and we decided to use Ruby on Rails and pair programming. The fact is that we live around 300km far from each other and we still want to produce using pair programm…

---

## [Parameters](https://www.ruby-forum.com/t/parameters/144785)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 8\
**Last updated:** [August 4, 2008, 8:17pm UTC](https://www.ruby-forum.com/t/parameters/144785 "2008-08-04T20:17:40Z")

</div>

\<% for post in @posts %\> \<%= link\_to\_remote “Edit”, :url =\> { :controller =\> “threads”, :action =\> :new\_req }, :with =\> “‘description=#{post.description}’” \<% end %\> When I make a post with the form and enter a desc…

---

## [Ruby hash confusion](https://www.ruby-forum.com/t/ruby-hash-confusion/144967)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [August 4, 2008, 8:14pm UTC](https://www.ruby-forum.com/t/ruby-hash-confusion/144967 "2008-08-04T20:14:31Z")

</div>

I have a hash: $output\_hash={} I have a loop where “key” will remain the same while port\_num increments. $output\_hash\[key\] = {port\_num =\> status} I only get the last item when I do a $output\_hash.inspect. “status” …

---

## [\[ANN\] Call for papers for the 3rd edition of the Rails Conference for Spanish speakers in Madrid, Sp](https://www.ruby-forum.com/t/ann-call-for-papers-for-the-3rd-edition-of-the-rails-conference-for-spanish-speakers-in-madrid-sp/144969)

<div class="topic-metadata">

**Author:** [@javier\_ramirez](https://www.ruby-forum.com/u/javier_ramirez)\
**Replies:** 0\
**Last updated:** [August 4, 2008, 8:11pm UTC](https://www.ruby-forum.com/t/ann-call-for-papers-for-the-3rd-edition-of-the-rails-conference-for-spanish-speakers-in-madrid-sp/144969 "2008-08-04T20:11:35Z")

</div>

Hi, After the success of the last two editions (about 30 sessions and 200 attendants every year) we are pleased to announce the third edition of the Rails Conference (http://www.conferenciarails.org) for Spanish spea…

---

## [Using rjs after a redirect](https://www.ruby-forum.com/t/using-rjs-after-a-redirect/144941)

<div class="topic-metadata">

**Author:** [@chunkyslink](https://www.ruby-forum.com/u/chunkyslink)\
**Replies:** 6\
**Last updated:** [August 4, 2008, 8:10pm UTC](https://www.ruby-forum.com/t/using-rjs-after-a-redirect/144941 "2008-08-04T20:10:42Z")

</div>

Let’s say I have an app where a user creates something, e.g. maybe they create a new recipe, and the app redirects to the :show action of the recipes controller after a successful post to the :create action. How would…

---

## [How would I construct this validation rule?](https://www.ruby-forum.com/t/how-would-i-construct-this-validation-rule/144960)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [August 4, 2008, 7:11pm UTC](https://www.ruby-forum.com/t/how-would-i-construct-this-validation-rule/144960 "2008-08-04T19:11:15Z")

</div>

Hi, I have this model, class EcOrder \< ActiveRecord::Base has\_many :ec\_line\_items validates\_associated :ec\_line\_items … end and what I want to do is construct a validation rule that says an order is not valid unle…

---

## [Apache, mongrel and slash in route variable](https://www.ruby-forum.com/t/apache-mongrel-and-slash-in-route-variable/144929)

<div class="topic-metadata">

**Author:** [@tracerek](https://www.ruby-forum.com/u/tracerek)\
**Replies:** 4\
**Last updated:** [August 4, 2008, 7:04pm UTC](https://www.ruby-forum.com/t/apache-mongrel-and-slash-in-route-variable/144929 "2008-08-04T19:04:59Z")

</div>

Hi, in my app i’m ussing this route mapping map.connect “:controller/:action/view/:file” where :file can have another slash inside (eg. /config/basics/view/some\_folder/another\_file) . While accesing this link in FF…

---

## [Safely override an association accessor](https://www.ruby-forum.com/t/safely-override-an-association-accessor/144955)

<div class="topic-metadata">

**Author:** [@tonypm](https://www.ruby-forum.com/u/tonypm)\
**Replies:** 0\
**Last updated:** [August 4, 2008, 6:19pm UTC](https://www.ruby-forum.com/t/safely-override-an-association-accessor/144955 "2008-08-04T18:19:39Z")

</div>

At the moment, when I print say an invoice, I access @order.customer.address. Now I need to enhance the app to introduce the ability to map in customer\_detail from a new CustomerDetail model if one exists for that or…

---

## [Escaping SQL when using connection.execute?](https://www.ruby-forum.com/t/escaping-sql-when-using-connection-execute/144749)

<div class="topic-metadata">

**Author:** [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Replies:** 3\
**Last updated:** [August 4, 2008, 6:19pm UTC](https://www.ruby-forum.com/t/escaping-sql-when-using-connection-execute/144749 "2008-08-04T18:19:39Z")

</div>

Hi all, Here’s the situation: I’m writing a Rails app that connect to a SQL Server DB via the ODBC adapter. As an outside, non-negotiable requirement, and writes to the DB must be performed using stored procedures. (…

---

## [Shopping cart with arbitrary promotions model](https://www.ruby-forum.com/t/shopping-cart-with-arbitrary-promotions-model/144956)

<div class="topic-metadata">

**Author:** [@txco](https://www.ruby-forum.com/u/txco)\
**Replies:** 0\
**Last updated:** [August 4, 2008, 6:10pm UTC](https://www.ruby-forum.com/t/shopping-cart-with-arbitrary-promotions-model/144956 "2008-08-04T18:10:50Z")

</div>

Not exactly a rails question, but my cart is in rails :-p I’m looking for a model which allows for promotions to make arbitrary changes to a users shopping cart / session — pretty much anything my account management w…

---

## [\[ADV\] Last week to register for the Ruby Hoedown!](https://www.ruby-forum.com/t/adv-last-week-to-register-for-the-ruby-hoedown/144950)

<div class="topic-metadata">

**Author:** [@Jeremy\_McAnally](https://www.ruby-forum.com/u/Jeremy_McAnally)\
**Replies:** 0\
**Last updated:** [August 4, 2008, 5:23pm UTC](https://www.ruby-forum.com/t/adv-last-week-to-register-for-the-ruby-hoedown/144950 "2008-08-04T17:23:57Z")

</div>

Hi all, This is the last week to register for The Ruby Hoedown, sponsored by Engine Y. and Hashrocket. You won’t want to miss talks by Chris Wanstrath, David Black, Giles B., Rick B., Jim W., Joe O’Brien and more! …

---

## [Method to strip linefeeds](https://www.ruby-forum.com/t/method-to-strip-linefeeds/144947)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 1\
**Last updated:** [August 4, 2008, 5:19pm UTC](https://www.ruby-forum.com/t/method-to-strip-linefeeds/144947 "2008-08-04T17:19:15Z")

</div>

Hi - I imagine there is some easy method but I just can’t find it. I want to take a string that has \\r\\n’s in it and replace them with a space. Anyone know if this is built in? thanks, dino

---

## [How to allow only the owner of the uploaded file(s) to access these file(s)](https://www.ruby-forum.com/t/how-to-allow-only-the-owner-of-the-uploaded-file-s-to-access-these-file-s/144944)

<div class="topic-metadata">

**Author:** [@nik](https://www.ruby-forum.com/u/nik)\
**Replies:** 1\
**Last updated:** [August 4, 2008, 5:13pm UTC](https://www.ruby-forum.com/t/how-to-allow-only-the-owner-of-the-uploaded-file-s-to-access-these-file-s/144944 "2008-08-04T17:13:58Z")

</div>

Hello! I am allowing my users to upload files, and it will end up in public \\videos. How can I ensure that user A can see only his files? Is there a plug in for this? Thank You!

---

## [Associations (belongs\_to, has\_one, and has\_many) questions](https://www.ruby-forum.com/t/associations-belongs-to-has-one-and-has-many-questions/144881)

<div class="topic-metadata">

**Author:** [@tinney](https://www.ruby-forum.com/u/tinney)\
**Replies:** 7\
**Last updated:** [August 4, 2008, 5:05pm UTC](https://www.ruby-forum.com/t/associations-belongs-to-has-one-and-has-many-questions/144881 "2008-08-04T17:05:44Z")

</div>

Greetings, This is something that has completely stumped my development processes on my new application. The application helps members exchange feedback on their stories (for creative writers). With that in mind, I’m …

---

## [jRuby Sanity Check](https://www.ruby-forum.com/t/jruby-sanity-check/144943)

<div class="topic-metadata">

**Author:** [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Replies:** 1\
**Last updated:** [August 4, 2008, 5:05pm UTC](https://www.ruby-forum.com/t/jruby-sanity-check/144943 "2008-08-04T17:05:44Z")

</div>

Hey all, We’re building a beta for a large organization that is primarily a Java shop. Ideally, we’d like to build the initial beta in Rails and run it like a traditional rails app. However, it would be great to at…

---

## [Find an element in an array](https://www.ruby-forum.com/t/find-an-element-in-an-array/144942)

<div class="topic-metadata">

**Author:** [@billv](https://www.ruby-forum.com/u/billv)\
**Replies:** 1\
**Last updated:** [August 4, 2008, 3:58pm UTC](https://www.ruby-forum.com/t/find-an-element-in-an-array/144942 "2008-08-04T15:58:15Z")

</div>

Hi, I have a very basic question: How can I check to see if an array includes a certain type of element. Specifically, I an creating an array of file names from a directory on the server. I then want to identify wh…

---

## [Help me understand ruby on rails (beginner)](https://www.ruby-forum.com/t/help-me-understand-ruby-on-rails-beginner/144879)

<div class="topic-metadata">

**Author:** [@bloodsample](https://www.ruby-forum.com/u/bloodsample)\
**Replies:** 13\
**Last updated:** [August 4, 2008, 3:57pm UTC](https://www.ruby-forum.com/t/help-me-understand-ruby-on-rails-beginner/144879 "2008-08-04T15:57:14Z")

</div>

Hi, Please forgive the simplicity of the questions to follow. I’ve written “offline” software in C++/Java/Actionscript 3.0, etc but have never gotten into web development before. I heard about ruby on rails and got …

---

## [Mysql updates kills mongrel instance](https://www.ruby-forum.com/t/mysql-updates-kills-mongrel-instance/144937)

<div class="topic-metadata">

**Author:** [@pfr](https://www.ruby-forum.com/u/pfr)\
**Replies:** 0\
**Last updated:** [August 4, 2008, 3:19pm UTC](https://www.ruby-forum.com/t/mysql-updates-kills-mongrel-instance/144937 "2008-08-04T15:19:32Z")

</div>

trying to troubleshoot an issue where 1 of the mongrel instances goes haywire (99% CPU Util.) and i am forced to kill that PID and restart the cluster. I have found that I can reproduce the issue at will by calling my…

---

## [REST doubt](https://www.ruby-forum.com/t/rest-doubt/144631)

<div class="topic-metadata">

**Author:** [@srijith](https://www.ruby-forum.com/u/srijith)\
**Replies:** 6\
**Last updated:** [August 4, 2008, 3:07pm UTC](https://www.ruby-forum.com/t/rest-doubt/144631 "2008-08-04T15:07:15Z")

</div>

Hi i am function in my controller like def user\_list … end and i need to call this function in link\_to method. and i written like this \<%=link\_to ‘User\_list’,student,:method=\>:get%\> when i click the link action b…

---

## [Acts As Attachment :storage=\> :db\_system tutorial version](https://www.ruby-forum.com/t/acts-as-attachment-storage-db-system-tutorial-version/85336)

<div class="topic-metadata">

**Author:** [@paron](https://www.ruby-forum.com/u/paron)\
**Replies:** 3\
**Last updated:** [August 4, 2008, 2:49pm UTC](https://www.ruby-forum.com/t/acts-as-attachment-storage-db-system-tutorial-version/85336 "2008-08-04T14:49:04Z")

</div>

This is just a tweak to Rick O.'s tutorial, because his shows file\_system storage, and because I got file\_system running on the first go every time I tried, but only got db\_system running after a lot of struggling. I …

---

## [Setup on Ubuntu](https://www.ruby-forum.com/t/setup-on-ubuntu/138906)

<div class="topic-metadata">

**Author:** [@jdemarco](https://www.ruby-forum.com/u/jdemarco)\
**Replies:** 5\
**Last updated:** [August 4, 2008, 2:49pm UTC](https://www.ruby-forum.com/t/setup-on-ubuntu/138906 "2008-08-04T14:49:04Z")

</div>

So far my experience with Rails has been that is an absolute nightmare to setup. I followed the tutorial found here=\> https://help.ubuntu.com/community/RubyOnRails Which is simple enough, although now IRB does not wor…

---

## [Most frequent searched query string - Ferret](https://www.ruby-forum.com/t/most-frequent-searched-query-string-ferret/196770)

<div class="topic-metadata">

**Author:** [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Replies:** 3\
**Last updated:** [August 4, 2008, 2:46pm UTC](https://www.ruby-forum.com/t/most-frequent-searched-query-string-ferret/196770 "2008-08-04T14:46:43Z")

</div>

Hi, I need to calculate most frequent searches on a particular model. I am using ferret for searching in full text mode. For eg: Search on hospital names. I have a form which allows user to enter a search query, and …

---

## [Merge two arrays](https://www.ruby-forum.com/t/merge-two-arrays/144711)

<div class="topic-metadata">

**Author:** [@srinathbtech](https://www.ruby-forum.com/u/srinathbtech)\
**Replies:** 12\
**Last updated:** [August 4, 2008, 2:43pm UTC](https://www.ruby-forum.com/t/merge-two-arrays/144711 "2008-08-04T14:43:13Z")

</div>

Hi, is there any method to merge one array values in to another array, i mean i have a different situation here. There are 2 instance variables and generating output like this : \[code=\]@users\_count = \[\[“Feb 2008”, 1\]…

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

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