# Rails

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

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

---

## [Dealing with not-so-nice legacy schema](https://www.ruby-forum.com/t/dealing-with-not-so-nice-legacy-schema/159559)

<div class="topic-metadata">

**Author:** [@Ojis](https://www.ruby-forum.com/u/Ojis)\
**Replies:** 1\
**Last updated:** [February 6, 2009, 4:16am UTC](https://www.ruby-forum.com/t/dealing-with-not-so-nice-legacy-schema/159559 "2009-02-06T04:16:57Z")

</div>

Hello Gurus! I have a problem with legacy database-schema and I would like to get some ideas and suggestions how to handle it with ActiveRecord. First the idea with database is that there can be several versions of th…

---

## [Click tracking for external links](https://www.ruby-forum.com/t/click-tracking-for-external-links/159577)

<div class="topic-metadata">

**Author:** [@Shannon](https://www.ruby-forum.com/u/Shannon)\
**Replies:** 2\
**Last updated:** [February 6, 2009, 3:02am UTC](https://www.ruby-forum.com/t/click-tracking-for-external-links/159577 "2009-02-06T03:02:04Z")

</div>

I’m new to Rails. I have an application with a group of external links . I would like to track the first time someone clicks on one of those links in my DB. What is the standard “Rails” way to do something like thi…

---

## [Rendering error page for "Unauthorized" from before\_filter](https://www.ruby-forum.com/t/rendering-error-page-for-unauthorized-from-before-filter/159480)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 2\
**Last updated:** [February 6, 2009, 1:32am UTC](https://www.ruby-forum.com/t/rendering-error-page-for-unauthorized-from-before-filter/159480 "2009-02-06T01:32:01Z")

</div>

Hey all, I am writing a plugin in which I want to stop the rendering of an action with an unauthorized response if the user is not authorized to view the resource. I am using a before filter to achieve this and insid…

---

## [If one has a nested transaction does the outer-most transaction take precedence?](https://www.ruby-forum.com/t/if-one-has-a-nested-transaction-does-the-outer-most-transaction-take-precedence/159528)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 5\
**Last updated:** [February 6, 2009, 1:26am UTC](https://www.ruby-forum.com/t/if-one-has-a-nested-transaction-does-the-outer-most-transaction-take-precedence/159528 "2009-02-06T01:26:10Z")

</div>

Hi, Anyone know, if I have a nested transaction, will it be the outer most transaction (i.e. from outermost transaction start, to outermost transaction end) that will be used? i.e. noting Rails doesn’t currently supp…

---

## [Cattr\_accessor for all attributes](https://www.ruby-forum.com/t/cattr-accessor-for-all-attributes/159548)

<div class="topic-metadata">

**Author:** [@bide](https://www.ruby-forum.com/u/bide)\
**Replies:** 1\
**Last updated:** [February 6, 2009, 1:03am UTC](https://www.ruby-forum.com/t/cattr-accessor-for-all-attributes/159548 "2009-02-06T01:03:21Z")

</div>

Hi, I´ve created an “acts\_as” plugin where the user can add several attributes of his choice to the model. Now I´m looking for a way to allow the users to access all attributes without changing the plugin code e.g.,…

---

## [Displaying JSON response in view](https://www.ruby-forum.com/t/displaying-json-response-in-view/159581)

<div class="topic-metadata">

**Author:** [@builtbysimple](https://www.ruby-forum.com/u/builtbysimple)\
**Replies:** 1\
**Last updated:** [February 6, 2009, 1:02am UTC](https://www.ruby-forum.com/t/displaying-json-response-in-view/159581 "2009-02-06T01:02:46Z")

</div>

Dear all, I’m totally new with Ajax and Rails. How do I display JSON objects that I get from the controller to the view. Is there any way we can display the JSON objects directly in the DOM, or do I have to manipulat…

---

## [ActiveRecord Unexplainable SystemStackError - Only in WEBrick](https://www.ruby-forum.com/t/activerecord-unexplainable-systemstackerror-only-in-webrick/159264)

<div class="topic-metadata">

**Author:** [@MaggotChild](https://www.ruby-forum.com/u/MaggotChild)\
**Replies:** 9\
**Last updated:** [February 5, 2009, 11:42pm UTC](https://www.ruby-forum.com/t/activerecord-unexplainable-systemstackerror-only-in-webrick/159264 "2009-02-05T23:42:03Z")

</div>

This SystemStackError is driving me crazy. It only takes place when testing with WEBrick - I can’t reproduce it with any tests. It is caused by calling the “missing” id method (base.rb:2435) on my ActiveRecord class. …

---

## [Detecting rake db:migrate?](https://www.ruby-forum.com/t/detecting-rake-db-migrate/159566)

<div class="topic-metadata">

**Author:** [@Harold](https://www.ruby-forum.com/u/Harold)\
**Replies:** 3\
**Last updated:** [February 5, 2009, 10:26pm UTC](https://www.ruby-forum.com/t/detecting-rake-db-migrate/159566 "2009-02-05T22:26:24Z")

</div>

Hi group, I have a line of code in environment.rb that cannot be run during a rake db:migrate, as it depends on some tables being present. I need to find a way to enclose this line in a check for db:migrate. I know h…

---

## [\[FEEDBACK\] on new site](https://www.ruby-forum.com/t/feedback-on-new-site/159258)

<div class="topic-metadata">

**Author:** [@Daly](https://www.ruby-forum.com/u/Daly)\
**Replies:** 7\
**Last updated:** [February 5, 2009, 8:54pm UTC](https://www.ruby-forum.com/t/feedback-on-new-site/159258 "2009-02-05T20:54:29Z")

</div>

Hi, I just released this new dating site built in Ruby on Rails called http://moredating.com. I was wondering if you guys could check it out and provide any feedback you may have. I’m especially interested in any sec…

---

## [Help for the hidden fileds](https://www.ruby-forum.com/t/help-for-the-hidden-fileds/159563)

<div class="topic-metadata">

**Author:** [@ramya](https://www.ruby-forum.com/u/ramya)\
**Replies:** 0\
**Last updated:** [February 5, 2009, 8:15pm UTC](https://www.ruby-forum.com/t/help-for-the-hidden-fileds/159563 "2009-02-05T20:15:41Z")

</div>

hi there I am a newbie i am creating a report a bug application. while the user clicks the link i need to catch up few hidden fields like http\_user\_agent and save it database. So i did something like this \<%= link\_…

---

## [Delete\_if does not work on associations](https://www.ruby-forum.com/t/delete-if-does-not-work-on-associations/159520)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [February 5, 2009, 7:57pm UTC](https://www.ruby-forum.com/t/delete-if-does-not-work-on-associations/159520 "2009-02-05T19:57:23Z")

</div>

I tried to user delete\_if on an association: class Group \< ActiveRecord::Base has\_many :memberships, :dependent =\> :destroy has\_many :users, :through =\> :memberships … end This is the controller method, trying to u…

---

## [Thin Webserver keeps going down](https://www.ruby-forum.com/t/thin-webserver-keeps-going-down/158879)

<div class="topic-metadata">

**Author:** [@butterchops](https://www.ruby-forum.com/u/butterchops)\
**Replies:** 1\
**Last updated:** [February 5, 2009, 7:26pm UTC](https://www.ruby-forum.com/t/thin-webserver-keeps-going-down/158879 "2009-02-05T19:26:25Z")

</div>

Hey all, Have just released my first RoR application into a production setting on a VPS and am having some stability troubles with Thin. After roughly 1 hour of running the webserver it will fail and I will have to l…

---

## [5-second code syntax question](https://www.ruby-forum.com/t/5-second-code-syntax-question/159551)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 7\
**Last updated:** [February 5, 2009, 6:46pm UTC](https://www.ruby-forum.com/t/5-second-code-syntax-question/159551 "2009-02-05T18:46:51Z")

</div>

Hi there, I have a n00b question regarding the correct code syntax: The aim is to have code that looks like this… ========================== if @user.low == true @low = false elsif @user.low == false @low = true …

---

## [Setup up svn on my server](https://www.ruby-forum.com/t/setup-up-svn-on-my-server/159508)

<div class="topic-metadata">

**Author:** [@ankitparekh](https://www.ruby-forum.com/u/ankitparekh)\
**Replies:** 7\
**Last updated:** [February 5, 2009, 6:42pm UTC](https://www.ruby-forum.com/t/setup-up-svn-on-my-server/159508 "2009-02-05T18:42:09Z")

</div>

Hi all Here is the thing that I want to do. What I want is that As soon as I commit the changes to my svn which resides on beanstalk i want those changes to get reflected to my website too. Can any one tell me a step…

---

## [Bizarr problem with rake](https://www.ruby-forum.com/t/bizarr-problem-with-rake/159555)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 0\
**Last updated:** [February 5, 2009, 6:18pm UTC](https://www.ruby-forum.com/t/bizarr-problem-with-rake/159555 "2009-02-05T18:18:47Z")

</div>

I hope that someone here can identify what is going on as I am completely frustrated at the moment. I am writing a custom rake task for rcov. The intent is top produce three variants of a test, each using slightly di…

---

## [Link\_to\_remote 'this'](https://www.ruby-forum.com/t/link-to-remote-this/159254)

<div class="topic-metadata">

**Author:** [@ben](https://www.ruby-forum.com/u/ben)\
**Replies:** 3\
**Last updated:** [February 5, 2009, 6:08pm UTC](https://www.ruby-forum.com/t/link-to-remote-this/159254 "2009-02-05T18:08:01Z")

</div>

When using something like link\_to\_function “Label”, “some\_function(this);” the ‘this’ references the href generated by the rails link\_to\_function. When using something like link\_to\_remote(task.id\_description, {:upd…

---

## [Which Association?](https://www.ruby-forum.com/t/which-association/159486)

<div class="topic-metadata">

**Author:** [@George\_Bray](https://www.ruby-forum.com/u/George_Bray)\
**Replies:** 1\
**Last updated:** [February 5, 2009, 5:50pm UTC](https://www.ruby-forum.com/t/which-association/159486 "2009-02-05T17:50:56Z")

</div>

I have a number of models and each has a Status. I want to have a single Status table to contain all statuses for all models. I’d prefer not to have intermediary join tables for each model. Lecturn.status\_id -\> St…

---

## [How to load excel file in mysql table](https://www.ruby-forum.com/t/how-to-load-excel-file-in-mysql-table/159546)

<div class="topic-metadata">

**Author:** [@tanker](https://www.ruby-forum.com/u/tanker)\
**Replies:** 1\
**Last updated:** [February 5, 2009, 5:28pm UTC](https://www.ruby-forum.com/t/how-to-load-excel-file-in-mysql-table/159546 "2009-02-05T17:28:31Z")

</div>

Hello guys i would like to know how to load excel file in mysql table with ruby on rails scripts

---

## [No sequence is needed](https://www.ruby-forum.com/t/no-sequence-is-needed/159506)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 1\
**Last updated:** [February 5, 2009, 4:36pm UTC](https://www.ruby-forum.com/t/no-sequence-is-needed/159506 "2009-02-05T16:36:13Z")

</div>

Hi I would like to know how can i generate a model, without generating the sequence table in postgresql…Currently for example when I do def self.up create\_table :table1 do |t| A sequence is automatically generated l…

---

## [Large RoR systems design and implementation](https://www.ruby-forum.com/t/large-ror-systems-design-and-implementation/159388)

<div class="topic-metadata">

**Author:** [@sbrocher](https://www.ruby-forum.com/u/sbrocher)\
**Replies:** 7\
**Last updated:** [February 5, 2009, 4:28pm UTC](https://www.ruby-forum.com/t/large-ror-systems-design-and-implementation/159388 "2009-02-05T16:28:38Z")

</div>

Hi, I’ve implemented a few big RoR apps. I do have some good experience building large systems in many different languages and platforms but I don’t consider myself a RoR guru, so I’d like you experts comment on my t…

---

## [Concatenate (+) Named scopes leads to creation of an Array, is there a way to have stipp a Scope?](https://www.ruby-forum.com/t/concatenate-named-scopes-leads-to-creation-of-an-array-is-there-a-way-to-have-stipp-a-scope/159485)

<div class="topic-metadata">

**Author:** [@gabriele](https://www.ruby-forum.com/u/gabriele)\
**Replies:** 3\
**Last updated:** [February 5, 2009, 3:14pm UTC](https://www.ruby-forum.com/t/concatenate-named-scopes-leads-to-creation-of-an-array-is-there-a-way-to-have-stipp-a-scope/159485 "2009-02-05T15:14:21Z")

</div>

Hi, I try to explain better, I wrote a named scope like that: named\_scope :with\_cellphones\_or\_emails, {:include =\> \[:cellphones, :emails\], :conditions =\> \["(cellphones.active = ? AND cellphones.customer\_id = customer…

---

## [\* config.breakpoint\_server has been deprecated and has no effect. \*](https://www.ruby-forum.com/t/config-breakpoint-server-has-been-deprecated-and-has-no-effect/126434)

<div class="topic-metadata">

**Author:** [@MohsinHijazee](https://www.ruby-forum.com/u/MohsinHijazee)\
**Replies:** 5\
**Last updated:** [February 5, 2009, 3:08pm UTC](https://www.ruby-forum.com/t/config-breakpoint-server-has-been-deprecated-and-has-no-effect/126434 "2009-02-05T15:08:25Z")

</div>

\* config.breakpoint\_server has been deprecated and has no effect. \* Hello everyone! I recently ported my Rails application from 1.2 to 2.02 and I got it running. But when ever I run the server, or the benchmark e…

---

## [Need the activerecord-sqlserver-adapter but](https://www.ruby-forum.com/t/need-the-activerecord-sqlserver-adapter-but/159514)

<div class="topic-metadata">

**Author:** [@abruceperson](https://www.ruby-forum.com/u/abruceperson)\
**Replies:** 1\
**Last updated:** [February 5, 2009, 3:04pm UTC](https://www.ruby-forum.com/t/need-the-activerecord-sqlserver-adapter-but/159514 "2009-02-05T15:04:18Z")

</div>

Hi… I am new to RoR development, and Web development in general (but have about 25 years of IT/software experience - just not in the Web area)… I have a really good RoR 2.X book that I have read and reread a few times…

---

## [SOAP::RPC::Driver encoding problem](https://www.ruby-forum.com/t/soap-driver-encoding-problem/159536)

<div class="topic-metadata">

**Author:** [@seurdge](https://www.ruby-forum.com/u/seurdge)\
**Replies:** 0\
**Last updated:** [February 5, 2009, 2:37pm UTC](https://www.ruby-forum.com/t/soap-driver-encoding-problem/159536 "2009-02-05T14:37:32Z")

</div>

Hi, I have trouble setting a SOAP::RPC::Driver class encoding (for the response) to utf-8. My response contains accentuated character that are not ok without this. I dont understand why the mandatorychaset= method do…

---

## [Values should be filled for corresponding date, in a range](https://www.ruby-forum.com/t/values-should-be-filled-for-corresponding-date-in-a-range/159496)

<div class="topic-metadata">

**Author:** [@lookshankar](https://www.ruby-forum.com/u/lookshankar)\
**Replies:** 1\
**Last updated:** [February 5, 2009, 1:59pm UTC](https://www.ruby-forum.com/t/values-should-be-filled-for-corresponding-date-in-a-range/159496 "2009-02-05T13:59:27Z")

</div>

Hi , I'm newbie to Rails can someone help in this.I had struck here in my application and actually i solved it using PHP but don’t know how to do in Rails. I have table like this ------------------------------------…

---

## [Ajax upload + Opera issues](https://www.ruby-forum.com/t/ajax-upload-opera-issues/159524)

<div class="topic-metadata">

**Author:** [@petan](https://www.ruby-forum.com/u/petan)\
**Replies:** 0\
**Last updated:** [February 5, 2009, 11:53am UTC](https://www.ruby-forum.com/t/ajax-upload-opera-issues/159524 "2009-02-05T11:53:32Z")

</div>

Hi all, I am using this ajax uploader (Google Code Archive - Long-term storage for Google Code Project Hosting.). All the known browsers (except Opera and IE 5.5-) are working fine. I solved the issue by adding js al…

---

## [Sendmail with cron](https://www.ruby-forum.com/t/sendmail-with-cron/158437)

<div class="topic-metadata">

**Author:** [@mikael](https://www.ruby-forum.com/u/mikael)\
**Replies:** 2\
**Last updated:** [February 5, 2009, 11:22am UTC](https://www.ruby-forum.com/t/sendmail-with-cron/158437 "2009-02-05T11:22:20Z")

</div>

Hi! I’am using crontab for creating an email list every night on daily basis. It works perfectly. And use it for other things also. But my problem is that i can’t get crontab to work for armailer, i would like to ha…

---

## [Ar\_mailer and missing template in production environment](https://www.ruby-forum.com/t/ar-mailer-and-missing-template-in-production-environment/159375)

<div class="topic-metadata">

**Author:** [@Borja\_MartSSS\_n](https://www.ruby-forum.com/u/Borja_MartSSS_n)\
**Replies:** 4\
**Last updated:** [February 5, 2009, 10:33am UTC](https://www.ruby-forum.com/t/ar-mailer-and-missing-template-in-production-environment/159375 "2009-02-05T10:33:10Z")

</div>

Hi, I’m trying to use ar\_mailer to send newsletters in my application. The thing is that what I’ve done works fine while I’m under development mode but when I try to run it in my server in production mode I become the …

---

## [Update\_attributes! does not update nested model](https://www.ruby-forum.com/t/update-attributes-does-not-update-nested-model/159333)

<div class="topic-metadata">

**Author:** [@darkofabijan](https://www.ruby-forum.com/u/darkofabijan)\
**Replies:** 1\
**Last updated:** [February 5, 2009, 10:33am UTC](https://www.ruby-forum.com/t/update-attributes-does-not-update-nested-model/159333 "2009-02-05T10:33:10Z")

</div>

Hi! I have updated my app to rails 2.3. I have form that has few nested models and I am happy that I can just write accepts\_nested\_attributes\_for :tasks, :allow\_destroy =\> true, but update\_attributes! does not update…

---

## [SQL transaction rollback isn't logged!](https://www.ruby-forum.com/t/sql-transaction-rollback-isnt-logged/159518)

<div class="topic-metadata">

**Author:** [@dgm](https://www.ruby-forum.com/u/dgm)\
**Replies:** 0\
**Last updated:** [February 5, 2009, 10:33am UTC](https://www.ruby-forum.com/t/sql-transaction-rollback-isnt-logged/159518 "2009-02-05T10:33:10Z")

</div>

I’m finding that if I do something like this: X.transaction { X.create(...); raise('stop') } Then I see the INSERT statement in my logs, but I don’t see the BEGIN or END for the transaction, or the ROLLBACK. The tra…

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

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