# Rails

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

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

---

## [REST search parameters](https://www.ruby-forum.com/t/rest-search-parameters/143348)

<div class="topic-metadata">

**Author:** [@roa](https://www.ruby-forum.com/u/roa)\
**Replies:** 7\
**Last updated:** [July 17, 2008, 5:30pm UTC](https://www.ruby-forum.com/t/rest-search-parameters/143348 "2008-07-17T17:30:43Z")

</div>

Hi, I’m trying to implement a search form in my index view. Since the app is designed REST, I need to submit the form with “get” method. This way, all the search parameters get passed in the url. Is there a way to ge…

---

## [Opinion on saving objects needed](https://www.ruby-forum.com/t/opinion-on-saving-objects-needed/143317)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 3\
**Last updated:** [July 17, 2008, 5:24pm UTC](https://www.ruby-forum.com/t/opinion-on-saving-objects-needed/143317 "2008-07-17T17:24:51Z")

</div>

Hello, Well, right now I have the following models. I have three tables: users, events and attendances. Attendances is a join table that contains the event\_id, user\_id and rsvp (boolean representing if the user is g…

---

## [Strategy for partials needed--DRYing up list-generating code](https://www.ruby-forum.com/t/strategy-for-partials-needed-drying-up-list-generating-code/143360)

<div class="topic-metadata">

**Author:** [@rpardee](https://www.ruby-forum.com/u/rpardee)\
**Replies:** 0\
**Last updated:** [July 17, 2008, 5:19pm UTC](https://www.ruby-forum.com/t/strategy-for-partials-needed-drying-up-list-generating-code/143360 "2008-07-17T17:19:34Z")

</div>

Hey All, I’m fighting the urge to just copy/paste view template code & would like advice on a better strategy. Consider this model: Project name start\_date status \* funder \* funding\_mechanism \* \<etc.\> Where th…

---

## [Rendering another model's views](https://www.ruby-forum.com/t/rendering-another-models-views/143175)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 16\
**Last updated:** [July 17, 2008, 5:19pm UTC](https://www.ruby-forum.com/t/rendering-another-models-views/143175 "2008-07-17T17:19:34Z")

</div>

I want to render Model B’s views inside Model A’s, how would I do this? For instance, I want to display the “new.html.erb” of Model B in A’s index.html.erb, and be able to create new B’s in A. Thanks.

---

## [Render partial vs. render subtemplate?](https://www.ruby-forum.com/t/render-partial-vs-render-subtemplate/143359)

<div class="topic-metadata">

**Author:** [@Danimal](https://www.ruby-forum.com/u/Danimal)\
**Replies:** 0\
**Last updated:** [July 17, 2008, 5:18pm UTC](https://www.ruby-forum.com/t/render-partial-vs-render-subtemplate/143359 "2008-07-17T17:18:58Z")

</div>

Can anyone shed any light on the pros/cons of one vs. the other? Certainly the “render partial” option is advantageous as an abstraction of one or many objects and what to do with them. But I’m noticing that my code i…

---

## [Method\_missing, respond\_to? and AR](https://www.ruby-forum.com/t/method-missing-respond-to-and-ar/143304)

<div class="topic-metadata">

**Author:** [@wawaloo](https://www.ruby-forum.com/u/wawaloo)\
**Replies:** 5\
**Last updated:** [July 17, 2008, 5:08pm UTC](https://www.ruby-forum.com/t/method-missing-respond-to-and-ar/143304 "2008-07-17T17:08:54Z")

</div>

Hi, I have a class Page with attribute ‘title’. I want Project objects to call Page methods when they don’t find the called method. If the method is not found whithin Page, super is called. For example, I can write: p…

---

## [A Mongrel parsing bug: "&" and "&amp;"](https://www.ruby-forum.com/t/a-mongrel-parsing-bug-and-amp/143325)

<div class="topic-metadata">

**Author:** [@gavin](https://www.ruby-forum.com/u/gavin)\
**Replies:** 4\
**Last updated:** [July 17, 2008, 4:44pm UTC](https://www.ruby-forum.com/t/a-mongrel-parsing-bug-and-amp/143325 "2008-07-17T16:44:12Z")

</div>

When using url\_for to send path to a script (such as with auto\_complete), multiple params are joined with the “&” code. For example: text\_field\_with\_auto\_complete :blog :post, {}, { :posts\_path(:a =\> 1, :b =\> 2), :m…

---

## [Postgres text field returns wrong data](https://www.ruby-forum.com/t/postgres-text-field-returns-wrong-data/143253)

<div class="topic-metadata">

**Author:** [@rickf](https://www.ruby-forum.com/u/rickf)\
**Replies:** 2\
**Last updated:** [July 17, 2008, 4:42pm UTC](https://www.ruby-forum.com/t/postgres-text-field-returns-wrong-data/143253 "2008-07-17T16:42:36Z")

</div>

I am having an interesting problem. I have a Postgres database with a table containing a text field. In the text field is stored data that in some cases has a ‘\*’ and a newline return as the first line first few char…

---

## [\[ANN\] FOSCON 2008 -- "Cooking With Ruby"](https://www.ruby-forum.com/t/ann-foscon-2008-cooking-with-ruby/143347)

<div class="topic-metadata">

**Author:** [@MSEdward\_SEdS\_Bora](https://www.ruby-forum.com/u/MSEdward_SEdS_Bora)\
**Replies:** 0\
**Last updated:** [July 17, 2008, 4:39pm UTC](https://www.ruby-forum.com/t/ann-foscon-2008-cooking-with-ruby/143347 "2008-07-17T16:39:06Z")

</div>

What: FOSCON is a free, fun gathering of Ruby fans held during an evening of O’Reilly’s OSCON conference with cool presentations, food, discussions, and a live coding competition. Who: Anyone interested in Ruby…

---

## [Add a SQL Statement to every query](https://www.ruby-forum.com/t/add-a-sql-statement-to-every-query/143323)

<div class="topic-metadata">

**Author:** [@tdellaringa](https://www.ruby-forum.com/u/tdellaringa)\
**Replies:** 2\
**Last updated:** [July 17, 2008, 4:29pm UTC](https://www.ruby-forum.com/t/add-a-sql-statement-to-every-query/143323 "2008-07-17T16:29:06Z")

</div>

Hi, im trying to create an application for multiple customers, where data shouldnt be accessible to others. So ive added a customer\_id to every db-table where it matters. Question: How can i add a Statement to find a…

---

## [ActiveRecord Session Store](https://www.ruby-forum.com/t/activerecord-session-store/143227)

<div class="topic-metadata">

**Author:** [@johnk](https://www.ruby-forum.com/u/johnk)\
**Replies:** 1\
**Last updated:** [July 17, 2008, 4:18pm UTC](https://www.ruby-forum.com/t/activerecord-session-store/143227 "2008-07-17T16:18:58Z")

</div>

I just recently moved from Cookie session store to ActiveRecord session store and I saaw my average page response time go from 300-500ms go to 800-1100ms. Would ActiveRecord session store be the cause of such a diffe…

---

## [Install Ruby, Rails on Lepard](https://www.ruby-forum.com/t/install-ruby-rails-on-lepard/143199)

<div class="topic-metadata">

**Author:** [@giovanni](https://www.ruby-forum.com/u/giovanni)\
**Replies:** 12\
**Last updated:** [July 17, 2008, 3:39pm UTC](https://www.ruby-forum.com/t/install-ruby-rails-on-lepard/143199 "2008-07-17T15:39:03Z")

</div>

Wow what hell(can that be said here?) I am no novice in working on osx command line nor windows and this has been a very frustrating experience. I have spent 5 days(on and off) trying to consistently use rails. It ju…

---

## [How does Rails implement filters?](https://www.ruby-forum.com/t/how-does-rails-implement-filters/143332)

<div class="topic-metadata">

**Author:** [@ryan](https://www.ruby-forum.com/u/ryan)\
**Replies:** 1\
**Last updated:** [July 17, 2008, 2:35pm UTC](https://www.ruby-forum.com/t/how-does-rails-implement-filters/143332 "2008-07-17T14:35:33Z")

</div>

Hi, I got to thinking this morning about filters and how they are actually implemented. If I was gonna implement it, I’d be tempted to do something like this: class Base def perform\_action action\_name if self.cla…

---

## [How to Reverse Engineer ER Diagram from Mysql](https://www.ruby-forum.com/t/how-to-reverse-engineer-er-diagram-from-mysql/143331)

<div class="topic-metadata">

**Author:** [@ror\_arch](https://www.ruby-forum.com/u/ror_arch)\
**Replies:** 0\
**Last updated:** [July 17, 2008, 2:03pm UTC](https://www.ruby-forum.com/t/how-to-reverse-engineer-er-diagram-from-mysql/143331 "2008-07-17T14:03:00Z")

</div>

Morning everyone, I was going to ask someone here about how to reverse engineer a schema diagram from Mysql and visio because its hard to locate such information (Balm Upon Technical Challenges: Creating an Entity Rel…

---

## [Final Opinion :: Need final opinions on the best way to handle arrays in forms](https://www.ruby-forum.com/t/final-opinion-need-final-opinions-on-the-best-way-to-handle-arrays-in-forms/143305)

<div class="topic-metadata">

**Author:** [@validkeys](https://www.ruby-forum.com/u/validkeys)\
**Replies:** 2\
**Last updated:** [July 17, 2008, 1:42pm UTC](https://www.ruby-forum.com/t/final-opinion-need-final-opinions-on-the-best-way-to-handle-arrays-in-forms/143305 "2008-07-17T13:42:08Z")

</div>

Hi There, rails noob just trying to suss a few things out. So I have 2 tables. 1 called Posts and the other called comments. On one page I need to be able to edit both the information about the post and the attributes…

---

## [Sessions+draggable element](https://www.ruby-forum.com/t/sessions-draggable-element/143310)

<div class="topic-metadata">

**Author:** [@torso](https://www.ruby-forum.com/u/torso)\
**Replies:** 2\
**Last updated:** [July 17, 2008, 1:36pm UTC](https://www.ruby-forum.com/t/sessions-draggable-element/143310 "2008-07-17T13:36:17Z")

</div>

Hi I am doing draggable element with sessions. But sessions are new to me. I have a draggable\_element which should be dragged to the cart. I have defined action add for receving element. How I can delivery variable o…

---

## [Recommended install method on OSX?](https://www.ruby-forum.com/t/recommended-install-method-on-osx/143302)

<div class="topic-metadata">

**Author:** [@helix\_tp](https://www.ruby-forum.com/u/helix_tp)\
**Replies:** 2\
**Last updated:** [July 17, 2008, 11:58am UTC](https://www.ruby-forum.com/t/recommended-install-method-on-osx/143302 "2008-07-17T11:58:30Z")

</div>

So what is the recommended Rails install method on OSX? http://wiki.rubyonrails.org/rails/pages/HowtoInstallOnOSXTiger seems surprisingly convoluted (and maybe even out of date?), given that it usually seems like most…

---

## [Problems with validation on STI](https://www.ruby-forum.com/t/problems-with-validation-on-sti/143311)

<div class="topic-metadata">

**Author:** [@rainyglade](https://www.ruby-forum.com/u/rainyglade)\
**Replies:** 2\
**Last updated:** [July 17, 2008, 10:34am UTC](https://www.ruby-forum.com/t/problems-with-validation-on-sti/143311 "2008-07-17T10:34:41Z")

</div>

I have the following STI table: def self.up create\_table :distributions do |t| t.string :type t.integer :simulation\_id t.string :dist\_name t.string :desc, :default=\> ‘fixed’ t.float :param1, :default =\> 5.0 t.flo…

---

## [Requirement - ROR Lead (Mastiff - Navi Mumbai)](https://www.ruby-forum.com/t/requirement-ror-lead-mastiff-navi-mumbai/143318)

<div class="topic-metadata">

**Author:** [@Gladys](https://www.ruby-forum.com/u/Gladys)\
**Replies:** 0\
**Last updated:** [July 17, 2008, 10:03am UTC](https://www.ruby-forum.com/t/requirement-ror-lead-mastiff-navi-mumbai/143318 "2008-07-17T10:03:38Z")

</div>

Hi: We, Mastiff Tech Pvt Ltd would like to introduce ourselves as a ‘Consumer Internet Product Development Company’. (Navi Mumbai based leading “Outsourced Product Development” firm in Consumer Internet Market) Curr…

---

## [To\_json performing inconsistently](https://www.ruby-forum.com/t/to-json-performing-inconsistently/143316)

<div class="topic-metadata">

**Author:** [@timhunter](https://www.ruby-forum.com/u/timhunter)\
**Replies:** 0\
**Last updated:** [July 17, 2008, 9:55am UTC](https://www.ruby-forum.com/t/to-json-performing-inconsistently/143316 "2008-07-17T09:55:59Z")

</div>

Hi there, I have two projects, both looking like they use the same version of ruby, same version of rails, on the same machine. When I run console within each project, the to\_json call returns a different result. ‘…

---

## [Define INLINEDIR or HOME in your environment error](https://www.ruby-forum.com/t/define-inlinedir-or-home-in-your-environment-error/143204)

<div class="topic-metadata">

**Author:** [@torso](https://www.ruby-forum.com/u/torso)\
**Replies:** 5\
**Last updated:** [July 17, 2008, 9:50am UTC](https://www.ruby-forum.com/t/define-inlinedir-or-home-in-your-environment-error/143204 "2008-07-17T09:50:06Z")

</div>

Hi I have a proplem. I am using attachment fu plugin and image science for uploading images on my server. I am getting error : Define INLINEDIR or HOME in your environment and try again. How I can define my HOME in e…

---

## [Purging logs](https://www.ruby-forum.com/t/purging-logs/143247)

<div class="topic-metadata">

**Author:** [@pepe](https://www.ruby-forum.com/u/pepe)\
**Replies:** 5\
**Last updated:** [July 17, 2008, 9:19am UTC](https://www.ruby-forum.com/t/purging-logs/143247 "2008-07-17T09:19:41Z")

</div>

Hello. Sorry if this is too simple a question. How do I go about automatically purging logs of an application in production? The application runs on a Windows server. Thanks. Pepe

---

## [Csv problem; help](https://www.ruby-forum.com/t/csv-problem-help/143212)

<div class="topic-metadata">

**Author:** [@kanekcwu](https://www.ruby-forum.com/u/kanekcwu)\
**Replies:** 2\
**Last updated:** [July 17, 2008, 8:35am UTC](https://www.ruby-forum.com/t/csv-problem-help/143212 "2008-07-17T08:35:53Z")

</div>

Hi, I am following the tutorial at which teaches ppl how to import csv files. The problem though is that when I try to run the code rails upload the information but is not saving it into the database or making it int…

---

## [Ferret](https://www.ruby-forum.com/t/ferret/196745)

<div class="topic-metadata">

**Author:** [@gaurav\_dua123](https://www.ruby-forum.com/u/gaurav_dua123)\
**Replies:** 0\
**Last updated:** [July 17, 2008, 6:49am UTC](https://www.ruby-forum.com/t/ferret/196745 "2008-07-17T06:49:27Z")

</div>

Hi, I had made one apllication for job posting. in which a user has to fill a form. In that form there are section like Personal Information(in which he has to to fill his personal information), Professional Informati…

---

## [\[Error\] responds\_to\_parent not respond rjs action](https://www.ruby-forum.com/t/error-responds-to-parent-not-respond-rjs-action/226014)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 1\
**Last updated:** [July 17, 2008, 6:23am UTC](https://www.ruby-forum.com/t/error-responds-to-parent-not-respond-rjs-action/226014 "2008-07-17T06:23:49Z")

</div>

Hi, (first of all, I have English as second language. I’m sorry for any mistake.) So, I’m getting used to RoR but there are quite things that I can’t do. I’m having a problem whit responds\_to\_parent. All the action w…

---

## [How to set an Environment variable from command line](https://www.ruby-forum.com/t/how-to-set-an-environment-variable-from-command-line/143285)

<div class="topic-metadata">

**Author:** [@philipv](https://www.ruby-forum.com/u/philipv)\
**Replies:** 1\
**Last updated:** [July 17, 2008, 3:48am UTC](https://www.ruby-forum.com/t/how-to-set-an-environment-variable-from-command-line/143285 "2008-07-17T03:48:37Z")

</div>

Hello, I am looking to set a Variable from the command line during starting up my server that will be accessible to the whole ruby on rails application. One way of setting such a config variable was putting defining …

---

## [Building an array which contains arrays grouped by 3 items (in a line)](https://www.ruby-forum.com/t/building-an-array-which-contains-arrays-grouped-by-3-items-in-a-line/143288)

<div class="topic-metadata">

**Author:** [@paco.onrails](https://www.ruby-forum.com/u/paco.onrails)\
**Replies:** 1\
**Last updated:** [July 17, 2008, 3:39am UTC](https://www.ruby-forum.com/t/building-an-array-which-contains-arrays-grouped-by-3-items-in-a-line/143288 "2008-07-17T03:39:18Z")

</div>

Hello again. I have an array which contains several items (Array\_a) and what I need is create a new array (Array\_b) which includes same items of Array\_a, but grouped in arrays within 3 items each. For example: Array…

---

## [Logic and Syntax Help - Count](https://www.ruby-forum.com/t/logic-and-syntax-help-count/143303)

<div class="topic-metadata">

**Author:** [@KTKTKT](https://www.ruby-forum.com/u/KTKTKT)\
**Replies:** 0\
**Last updated:** [July 17, 2008, 3:39am UTC](https://www.ruby-forum.com/t/logic-and-syntax-help-count/143303 "2008-07-17T03:39:13Z")

</div>

Given 3 tables: COURSES, REQUESTS, CLASSROOMS joined properly in the model (hopefully). I want to either: show all courses, but prohibit (onclick) enrollment in a course based on its classroom reaching capacity (sta…

---

## [Share code between view and controller](https://www.ruby-forum.com/t/share-code-between-view-and-controller/143259)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [July 17, 2008, 3:35am UTC](https://www.ruby-forum.com/t/share-code-between-view-and-controller/143259 "2008-07-17T03:35:45Z")

</div>

I am not using 2.1 Rails yet. But I need to define a common function to be used by both views and controllers. it is a formatting function to be used to format output for logger in controllers and by views. I am hav…

---

## [Params for link\_to\_remote](https://www.ruby-forum.com/t/params-for-link-to-remote/143264)

<div class="topic-metadata">

**Author:** [@Parity](https://www.ruby-forum.com/u/Parity)\
**Replies:** 2\
**Last updated:** [July 17, 2008, 2:06am UTC](https://www.ruby-forum.com/t/params-for-link-to-remote/143264 "2008-07-17T02:06:47Z")

</div>

Hello :-), i want to use ‘link\_to\_remote’ to create a simple form on the website. The form is a simple editor to post a comment to an article. I need to know the article\_id in the new view/controller. With ‘render’ e…

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

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