# Rails

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

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

---

## [Generator problem; ERB seems not to work - HELP needed](https://www.ruby-forum.com/t/generator-problem-erb-seems-not-to-work-help-needed/116963)

<div class="topic-metadata">

**Author:** [@Feurio](https://www.ruby-forum.com/u/Feurio)\
**Replies:** 0\
**Last updated:** [October 11, 2007, 6:27pm UTC](https://www.ruby-forum.com/t/generator-problem-erb-seems-not-to-work-help-needed/116963 "2007-10-11T18:27:50Z")

</div>

Hello folks, I do have a hard time with a generator that come with the active active-rbac-plugin (v0.5). In order to find the source of the problem I did compare the existing controller generator with the active-rbac…

---

## [HABTM and has\_many through only work in one direction](https://www.ruby-forum.com/t/habtm-and-has-many-through-only-work-in-one-direction/116955)

<div class="topic-metadata">

**Author:** [@blim8183](https://www.ruby-forum.com/u/blim8183)\
**Replies:** 1\
**Last updated:** [October 11, 2007, 5:27pm UTC](https://www.ruby-forum.com/t/habtm-and-has-many-through-only-work-in-one-direction/116955 "2007-10-11T17:27:20Z")

</div>

I have two models that have a habtm relationship and it only seems to be working in one direction. The two models are “recipe” and “msn\_lifestyles\_feed” with a join table called “msn\_lifestyles\_feeds\_recipes” the tab…

---

## [Pdf-writer - SimpleTable - change font betweent columns](https://www.ruby-forum.com/t/pdf-writer-simpletable-change-font-betweent-columns/116956)

<div class="topic-metadata">

**Author:** [@dgm](https://www.ruby-forum.com/u/dgm)\
**Replies:** 0\
**Last updated:** [October 11, 2007, 5:25pm UTC](https://www.ruby-forum.com/t/pdf-writer-simpletable-change-font-betweent-columns/116956 "2007-10-11T17:25:35Z")

</div>

The client wants the top of the pdf laid out like this: From: John S. To: Jane Doe 999-999-9999 888-333-3333 555 W. 55th Street 222 W. 55th Street Somewhere, Som…

---

## [Memcached session storage not work for activerecord object?](https://www.ruby-forum.com/t/memcached-session-storage-not-work-for-activerecord-object/116954)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [October 11, 2007, 5:13pm UTC](https://www.ruby-forum.com/t/memcached-session-storage-not-work-for-activerecord-object/116954 "2007-10-11T17:13:51Z")

</div>

I use memcached to store session. It works great if store string in session, but not work if I store activerecord object. for example, \[view1\] \<% session\[:k\] = “test” %\> \<% session\[:o\] = User.find(1) %\> \[view2\] \<%…

---

## [ActionWebServer and SOAPFault](https://www.ruby-forum.com/t/actionwebserver-and-soapfault/115274)

<div class="topic-metadata">

**Author:** [@locky2003](https://www.ruby-forum.com/u/locky2003)\
**Replies:** 1\
**Last updated:** [October 11, 2007, 4:56pm UTC](https://www.ruby-forum.com/t/actionwebserver-and-soapfault/115274 "2007-10-11T16:56:50Z")

</div>

I’m really new to RoR and my first task is to write SOAP web service. The problem is that I don’t understand how to send custom SOAPFault messages in case of the errors. For example, I have FindCustomerById API signat…

---

## [Sorting with find(:all, :order) and belongs\_to](https://www.ruby-forum.com/t/sorting-with-find-all-order-and-belongs-to/116846)

<div class="topic-metadata">

**Author:** [@gustav](https://www.ruby-forum.com/u/gustav)\
**Replies:** 9\
**Last updated:** [October 11, 2007, 4:40pm UTC](https://www.ruby-forum.com/t/sorting-with-find-all-order-and-belongs-to/116846 "2007-10-11T16:40:23Z")

</div>

I want to sort a collection of tasks based on their project name, but the project name is referenced thru project\_id in the task table and belongs\_to in the task-model. I can’t seem to find the proper way to use find(…

---

## [Form builder](https://www.ruby-forum.com/t/form-builder/116881)

<div class="topic-metadata">

**Author:** [@linojon](https://www.ruby-forum.com/u/linojon)\
**Replies:** 1\
**Last updated:** [October 11, 2007, 3:47pm UTC](https://www.ruby-forum.com/t/form-builder/116881 "2007-10-11T15:47:28Z")

</div>

hi, I’m creating a custom form\_builder and i’m trying to figure out how would helpers like text\_field know if the field has an error message so I can highlight it and show the message text thanks linoj

---

## [Radio\_button\_tag](https://www.ruby-forum.com/t/radio-button-tag/116947)

<div class="topic-metadata">

**Author:** [@crazybass](https://www.ruby-forum.com/u/crazybass)\
**Replies:** 1\
**Last updated:** [October 11, 2007, 3:28pm UTC](https://www.ruby-forum.com/t/radio-button-tag/116947 "2007-10-11T15:28:54Z")

</div>

Hello I have a view which have 2 radio buttons : … Actuel \<%= radio\_button\_tag(:actuel, value = "1", checked = false, options = {}) %\> Last \<%= radio\_button\_tag(:last, value = "1", checked = false, options = {}) %\> ..…

---

## [Re: radio\_button\_tag](https://www.ruby-forum.com/t/re-radio-button-tag/116945)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [October 11, 2007, 3:28pm UTC](https://www.ruby-forum.com/t/re-radio-button-tag/116945 "2007-10-11T15:28:15Z")

</div>

Hi Radio buttons need to belong to the same group to be able to work together. In your code you have two different groups, or attributes, :actuel and :last. These need to be the same - the general form of the radio\_b…

---

## [Form.select problem](https://www.ruby-forum.com/t/form-select-problem/116903)

<div class="topic-metadata">

**Author:** [@nick](https://www.ruby-forum.com/u/nick)\
**Replies:** 2\
**Last updated:** [October 11, 2007, 3:22pm UTC](https://www.ruby-forum.com/t/form-select-problem/116903 "2007-10-11T15:22:49Z")

</div>

Dear all, I tried to implement the code for 2 select boxes that are dependent on each other. One has a list of countries, and one a list of states. Now, this code works: \<%= select :state, :id, Country.find(@count…

---

## [Sharing data between views?](https://www.ruby-forum.com/t/sharing-data-between-views/116938)

<div class="topic-metadata">

**Author:** [@gavin](https://www.ruby-forum.com/u/gavin)\
**Replies:** 5\
**Last updated:** [October 11, 2007, 3:00pm UTC](https://www.ruby-forum.com/t/sharing-data-between-views/116938 "2007-10-11T15:00:36Z")

</div>

I’m new to Rails and this is surely and super easy question. I have a show\_companies.rhtml that produces a list of ships for each company. I have an add\_ship link next to each company which goes through the controlle…

---

## [How to trim the 0](https://www.ruby-forum.com/t/how-to-trim-the-0/116934)

<div class="topic-metadata">

**Author:** [@vidyagayathri](https://www.ruby-forum.com/u/vidyagayathri)\
**Replies:** 8\
**Last updated:** [October 11, 2007, 2:34pm UTC](https://www.ruby-forum.com/t/how-to-trim-the-0/116934 "2007-10-11T14:34:07Z")

</div>

hi all, I want to remove o, which is present in the before statement, like @a=EDIA00050 (in this EDIA is common) @t=@a.spilt(“EDIA”) render\_text @t\[1\] so i will get the output like 000050, but i want 50 only, like …

---

## [Rails with Paypal Payments Pro error](https://www.ruby-forum.com/t/rails-with-paypal-payments-pro-error/116861)

<div class="topic-metadata">

**Author:** [@3quid](https://www.ruby-forum.com/u/3quid)\
**Replies:** 1\
**Last updated:** [October 11, 2007, 2:24pm UTC](https://www.ruby-forum.com/t/rails-with-paypal-payments-pro-error/116861 "2007-10-11T14:24:29Z")

</div>

Hi I am trying to get up and running using active merchant and have been following the article here I have set up all of my sandbox accounts, downloaded the certificates and pulled in all of the login info supplied b…

---

## [Find\_by \_sql problems](https://www.ruby-forum.com/t/find-by-sql-problems/116474)

<div class="topic-metadata">

**Author:** [@whitewolfaustria](https://www.ruby-forum.com/u/whitewolfaustria)\
**Replies:** 6\
**Last updated:** [October 11, 2007, 2:13pm UTC](https://www.ruby-forum.com/t/find-by-sql-problems/116474 "2007-10-11T14:13:30Z")

</div>

I am creating a find by sql method to update various tables, but when the values get inserted into the script there are surrounded by single quotes, is there a way around this to get it to just enter in the string? T…

---

## [Set\_table\_name on RoR 1.2.4](https://www.ruby-forum.com/t/set-table-name-on-ror-1-2-4/116927)

<div class="topic-metadata">

**Author:** [@dima](https://www.ruby-forum.com/u/dima)\
**Replies:** 1\
**Last updated:** [October 11, 2007, 1:50pm UTC](https://www.ruby-forum.com/t/set-table-name-on-ror-1-2-4/116927 "2007-10-11T13:50:37Z")

</div>

Unfortunately I had to work on some proprietary MSSQL database building some internal web application. Naturally, I use RoR 1.2.4. Even I add set\_table\_name and set\_primary\_key in Model (RegionalIndex) of mine it have…

---

## [Dymanic changes for model name](https://www.ruby-forum.com/t/dymanic-changes-for-model-name/116890)

<div class="topic-metadata">

**Author:** [@demoversion](https://www.ruby-forum.com/u/demoversion)\
**Replies:** 4\
**Last updated:** [October 11, 2007, 1:15pm UTC](https://www.ruby-forum.com/t/dymanic-changes-for-model-name/116890 "2007-10-11T13:15:24Z")

</div>

Hello, I have a question. But first take a look on this code: Attachments \<%= view\_attachments\_field(Garage.find(@partial\_object\_id), {}) %\> This code loading images for model Garage in my view by id. This is a p…

---

## [Belongs-to relationship question](https://www.ruby-forum.com/t/belongs-to-relationship-question/116885)

<div class="topic-metadata">

**Author:** [@LAB](https://www.ruby-forum.com/u/LAB)\
**Replies:** 2\
**Last updated:** [October 11, 2007, 12:37pm UTC](https://www.ruby-forum.com/t/belongs-to-relationship-question/116885 "2007-10-11T12:37:03Z")

</div>

High level question, with a “belongs-to” relationship … you usually put the primary key of the parent object into the table of the child. I would like to know if there is a way to reference the parent object, via so…

---

## [Acts\_as\_taggable vs has\_many\_polymorphs](https://www.ruby-forum.com/t/acts-as-taggable-vs-has-many-polymorphs/116922)

<div class="topic-metadata">

**Author:** [@warren](https://www.ruby-forum.com/u/warren)\
**Replies:** 1\
**Last updated:** [October 11, 2007, 12:07pm UTC](https://www.ruby-forum.com/t/acts-as-taggable-vs-has-many-polymorphs/116922 "2007-10-11T12:07:41Z")

</div>

So, which of these is now recommended for a tag system? I’ll be putting together a collection of media and allowing users to tag their media. I’ll also allow consumers to add tags of their own, but want to distinguis…

---

## [DEPRECATION WARNING: service is deprecated](https://www.ruby-forum.com/t/deprecation-warning-service-is-deprecated/116933)

<div class="topic-metadata">

**Author:** [@Valehru](https://www.ruby-forum.com/u/Valehru)\
**Replies:** 0\
**Last updated:** [October 11, 2007, 12:04pm UTC](https://www.ruby-forum.com/t/deprecation-warning-service-is-deprecated/116933 "2007-10-11T12:04:45Z")

</div>

Updating an old rails app to 1.8.6 and rails 1.2.3. Getting the following error: DEPRECATION WARNING: service is deprecated and will be removed from Rails 2.0 See Ruby on Rails — A web-app framework that includes ev…

---

## [Auto set value for a model field](https://www.ruby-forum.com/t/auto-set-value-for-a-model-field/116901)

<div class="topic-metadata">

**Author:** [@demoversion](https://www.ruby-forum.com/u/demoversion)\
**Replies:** 6\
**Last updated:** [October 11, 2007, 11:36am UTC](https://www.ruby-forum.com/t/auto-set-value-for-a-model-field/116901 "2007-10-11T11:36:33Z")

</div>

Hello, I have a model - Post with datetime field \<added\_at\>. I need to set this value to time when in created or when it updated automatically. Thanks

---

## [Having problem with spliting record](https://www.ruby-forum.com/t/having-problem-with-spliting-record/116931)

<div class="topic-metadata">

**Author:** [@vidyagayathri](https://www.ruby-forum.com/u/vidyagayathri)\
**Replies:** 0\
**Last updated:** [October 11, 2007, 11:36am UTC](https://www.ruby-forum.com/t/having-problem-with-spliting-record/116931 "2007-10-11T11:36:05Z")

</div>

Hi all, My problem is i have to remove the “~” value from the last end of the record, actually first i will read from the file, while reading the file i have remove this “~” 1)LINEDIA0000050000005705700697RCSHEPLER’S…

---

## [Integrate legacy tables](https://www.ruby-forum.com/t/integrate-legacy-tables/116930)

<div class="topic-metadata">

**Author:** [@inriz](https://www.ruby-forum.com/u/inriz)\
**Replies:** 0\
**Last updated:** [October 11, 2007, 11:23am UTC](https://www.ruby-forum.com/t/integrate-legacy-tables/116930 "2007-10-11T11:23:03Z")

</div>

hello list, weve got some tables of a earlier project, which have to integrate into rails. im now testing two tables. RailsModelName | DatabaseTableName | primary\_key | foreign\_key Advertiser INSERENT …

---

## [.match in for condition](https://www.ruby-forum.com/t/match-in-for-condition/112502)

<div class="topic-metadata">

**Author:** [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Replies:** 4\
**Last updated:** [October 11, 2007, 11:16am UTC](https://www.ruby-forum.com/t/match-in-for-condition/112502 "2007-10-11T11:16:47Z")

</div>

Hello frnds I want to give .match condition in the for loop. wat i want to do is that i want to display only those contents with matched with the .match criteria. Thanks Dhaval P.

---

## [Script/console problem](https://www.ruby-forum.com/t/script-console-problem/116915)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 5\
**Last updated:** [October 11, 2007, 11:00am UTC](https://www.ruby-forum.com/t/script-console-problem/116915 "2007-10-11T11:00:07Z")

</div>

Hi everytime i try to run script/console on my ubuntu box it gives me this error Loading development environment. /var/lib/gems/1.8/gems/rails-1.2.3/lib/commands/console.rb:25:in exec': No such file or directory - i…

---

## [Displaying records by week submitted](https://www.ruby-forum.com/t/displaying-records-by-week-submitted/116867)

<div class="topic-metadata">

**Author:** [@matt](https://www.ruby-forum.com/u/matt)\
**Replies:** 1\
**Last updated:** [October 11, 2007, 8:58am UTC](https://www.ruby-forum.com/t/displaying-records-by-week-submitted/116867 "2007-10-11T08:58:46Z")

</div>

I have a simple model structure. Projects have many notes. For each of my project pages I would like to have a simple display like the following: Project Name Week of MM/DD/YYYY Notes that fall under that week So …

---

## [Speed](https://www.ruby-forum.com/t/speed/116880)

<div class="topic-metadata">

**Author:** [@Rav](https://www.ruby-forum.com/u/Rav)\
**Replies:** 8\
**Last updated:** [October 11, 2007, 8:58am UTC](https://www.ruby-forum.com/t/speed/116880 "2007-10-11T08:58:41Z")

</div>

Hi! What can i do to speed up executing my Rails app on my personal PC at home on localhost? It’s really slllooooooow. I have Pentium 3GHz (1 core), 512MB RAM, Windows XP and i deploy my app as JRuby on GlassFish V3. …

---

## [Display problem with to\_csv](https://www.ruby-forum.com/t/display-problem-with-to-csv/116924)

<div class="topic-metadata">

**Author:** [@vidyagayathri](https://www.ruby-forum.com/u/vidyagayathri)\
**Replies:** 0\
**Last updated:** [October 11, 2007, 8:51am UTC](https://www.ruby-forum.com/t/display-problem-with-to-csv/116924 "2007-10-11T08:51:13Z")

</div>

Hi all, I need to export the document as csv file, i have exported successfully, but the problem is not displayed as per my format, in csv file the format is suffuled, i want the orderwise as how i have mentioned in …

---

## [:or?](https://www.ruby-forum.com/t/or/116908)

<div class="topic-metadata">

**Author:** [@Jables](https://www.ruby-forum.com/u/Jables)\
**Replies:** 1\
**Last updated:** [October 11, 2007, 7:31am UTC](https://www.ruby-forum.com/t/or/116908 "2007-10-11T07:31:51Z")

</div>

Can anyone tell me what the :or option does or what is required to use it. I am trying to integrate the beast forum and it is littered with statements such as submit\_tag ‘Submit’, :or =\> link\_to(somewhere else). Any…

---

## [ActiveRecord: how to preload just a column of a child](https://www.ruby-forum.com/t/activerecord-how-to-preload-just-a-column-of-a-child/116920)

<div class="topic-metadata">

**Author:** [@donut](https://www.ruby-forum.com/u/donut)\
**Replies:** 0\
**Last updated:** [October 11, 2007, 7:21am UTC](https://www.ruby-forum.com/t/activerecord-how-to-preload-just-a-column-of-a-child/116920 "2007-10-11T07:21:16Z")

</div>

The find() method has a :include option to preload its children. However, when I do something like this: Article.find(:all, :include =\> \[comments, :user\]) The above call returns all the columns of both ‘user’ and ‘com…

---

## [Partial data load on :include](https://www.ruby-forum.com/t/partial-data-load-on-include/116795)

<div class="topic-metadata">

**Author:** [@shredluc](https://www.ruby-forum.com/u/shredluc)\
**Replies:** 2\
**Last updated:** [October 11, 2007, 5:47am UTC](https://www.ruby-forum.com/t/partial-data-load-on-include/116795 "2007-10-11T05:47:02Z")

</div>

Hello everyone, I am working on a support tool. I have two models, one called Service and another called Issues. A service may have many issues. I then output tables showing what services have what issues. When cr…

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

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