# Rails

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

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

---

## [Plugin to copy data from related has\_one model](https://www.ruby-forum.com/t/plugin-to-copy-data-from-related-has-one-model/140832)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [June 19, 2008, 3:53pm UTC](https://www.ruby-forum.com/t/plugin-to-copy-data-from-related-has-one-model/140832 "2008-06-19T15:53:13Z")

</div>

Hi, this is my first post, so nice to meet you all and thanks in advance for your help. I have a “task” model that has it’s own CRUD interface, and can get “promoted” to another model, that is, it gets associated with…

---

## [Non editable file\_field](https://www.ruby-forum.com/t/non-editable-file-field/140884)

<div class="topic-metadata">

**Author:** [@sonu](https://www.ruby-forum.com/u/sonu)\
**Replies:** 2\
**Last updated:** [June 19, 2008, 3:50pm UTC](https://www.ruby-forum.com/t/non-editable-file-field/140884 "2008-06-19T15:50:34Z")

</div>

Hi, I need to upload files in my application I am using following code Upload Document: \<%= form.file\_field("filename") %\> But I want that the file field that gets displayed in my browser should not be editable. i…

---

## [New Plugin released - records\_sequence](https://www.ruby-forum.com/t/new-plugin-released-records-sequence/140890)

<div class="topic-metadata">

**Author:** [@aaron](https://www.ruby-forum.com/u/aaron)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 2:52pm UTC](https://www.ruby-forum.com/t/new-plugin-released-records-sequence/140890 "2008-06-19T14:52:57Z")

</div>

I just finished a plugin called “records\_sequence” which add “next/ previous” methods to each ActiveRecord object. After installed, it could be a pleasure to find a object’s neighbors. == INSTALL == This plugin requ…

---

## [How to change the primary key value of a table](https://www.ruby-forum.com/t/how-to-change-the-primary-key-value-of-a-table/140769)

<div class="topic-metadata">

**Author:** [@soa\_dias](https://www.ruby-forum.com/u/soa_dias)\
**Replies:** 5\
**Last updated:** [June 19, 2008, 2:42pm UTC](https://www.ruby-forum.com/t/how-to-change-the-primary-key-value-of-a-table/140769 "2008-06-19T14:42:58Z")

</div>

Hello, I am having problem changing the primary key value of a table using active record. I want to change the id of OriginalName from 2 to 6. orders table: ±—±------------------±--------------------------------- ±…

---

## [Form should insert on 2Tables in my DB](https://www.ruby-forum.com/t/form-should-insert-on-2tables-in-my-db/196718)

<div class="topic-metadata">

**Author:** [@viliwort](https://www.ruby-forum.com/u/viliwort)\
**Replies:** 1\
**Last updated:** [June 19, 2008, 2:33pm UTC](https://www.ruby-forum.com/t/form-should-insert-on-2tables-in-my-db/196718 "2008-06-19T14:33:28Z")

</div>

Hi to you! I’m writing my first webapp with ruby on rails. And I like it so far. My problem is: I have a form and if I create a db-record, that works fine. But I want to create 2 records on 2 different tables (with o…

---

## [Association](https://www.ruby-forum.com/t/association/140881)

<div class="topic-metadata">

**Author:** [@subhadip](https://www.ruby-forum.com/u/subhadip)\
**Replies:** 2\
**Last updated:** [June 19, 2008, 2:21pm UTC](https://www.ruby-forum.com/t/association/140881 "2008-06-19T14:21:05Z")

</div>

Suppose i have three tables user,projects,user\_projects. their attributes are: tablename attributes: 1)user id(pk),name,email,password 2)projects id(pk),projectname,start\_date,end\_date 3)user\_project…

---

## [My create form should insert on 2Tables in my DB](https://www.ruby-forum.com/t/my-create-form-should-insert-on-2tables-in-my-db/140877)

<div class="topic-metadata">

**Author:** [@viliwort](https://www.ruby-forum.com/u/viliwort)\
**Replies:** 3\
**Last updated:** [June 19, 2008, 2:11pm UTC](https://www.ruby-forum.com/t/my-create-form-should-insert-on-2tables-in-my-db/140877 "2008-06-19T14:11:37Z")

</div>

Hi to you! I’m writing my first webapp with ruby on rails. And I like it so far. My problem is: I have a form and if I create a db-record, that works fine. But I want to create 2 records on 2 different tables (with o…

---

## [Svn. and dev. down?](https://www.ruby-forum.com/t/svn-and-dev-down/140878)

<div class="topic-metadata">

**Author:** [@Russell\_Quinn](https://www.ruby-forum.com/u/Russell_Quinn)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 2:02pm UTC](https://www.ruby-forum.com/t/svn-and-dev-down/140878 "2008-06-19T14:02:49Z")

</div>

Have svn.rubyonrails.org and dev.rubyonrails.org been down for weeks? None of my frozen SVN externals work anymore I understood that the SVN repository would be made read-only and kept available. Russell.

---

## [Drop down navigation](https://www.ruby-forum.com/t/drop-down-navigation/140880)

<div class="topic-metadata">

**Author:** [@Monica\_Chaturvedi](https://www.ruby-forum.com/u/Monica_Chaturvedi)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 2:02pm UTC](https://www.ruby-forum.com/t/drop-down-navigation/140880 "2008-06-19T14:02:49Z")

</div>

Hi! How to add a select tag the lists categories from database and redirects to particular pages upon onchange event of the select tag

---

## [Response.headers without "x-runtime"?](https://www.ruby-forum.com/t/response-headers-without-x-runtime/140874)

<div class="topic-metadata">

**Author:** [@oldbear](https://www.ruby-forum.com/u/oldbear)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 1:23pm UTC](https://www.ruby-forum.com/t/response-headers-without-x-runtime/140874 "2008-06-19T13:23:18Z")

</div>

rails:1.2.6 curl -I http://localhost:4000/ HTTP/1.1 200 OK Connection: close Date: Thu, 19 Jun 2008 11:06:38 GMT Set-Cookie: \_co56\_web\_session\_id=cd290031eadc2ac55593098aee726985; path=/ Status: 200 OK X-Runtime…

---

## [Generating 'alt' text for images](https://www.ruby-forum.com/t/generating-alt-text-for-images/140677)

<div class="topic-metadata">

**Author:** [@sjmadsen](https://www.ruby-forum.com/u/sjmadsen)\
**Replies:** 3\
**Last updated:** [June 19, 2008, 11:41am UTC](https://www.ruby-forum.com/t/generating-alt-text-for-images/140677 "2008-06-19T11:41:02Z")

</div>

I have a link on my page that lets me delete items from my database - I currently use CSS to insert a background image of a cross (an X). I want to display ‘alt’ text explaining that the button deletes items from the …

---

## [PDF::Writer simple table problem](https://www.ruby-forum.com/t/pdf-writer-simple-table-problem/140869)

<div class="topic-metadata">

**Author:** [@mooktakim](https://www.ruby-forum.com/u/mooktakim)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 11:25am UTC](https://www.ruby-forum.com/t/pdf-writer-simple-table-problem/140869 "2008-06-19T11:25:32Z")

</div>

Hello All, I’m trying to create a table using PDF::Writer simple table. I’m having problem with creating rows that span multiple columns. In html you would use span=“2” to span a single column to multiple columns. Th…

---

## [How to run unit tests for Rails](https://www.ruby-forum.com/t/how-to-run-unit-tests-for-rails/140868)

<div class="topic-metadata">

**Author:** [@liuxlsh](https://www.ruby-forum.com/u/liuxlsh)\
**Replies:** 1\
**Last updated:** [June 19, 2008, 11:18am UTC](https://www.ruby-forum.com/t/how-to-run-unit-tests-for-rails/140868 "2008-06-19T11:18:07Z")

</div>

hi, I downloaded rails as well as unit tests from: http://svn.rubyonrails.org/rails/branches/1-2-stable/ bash-2.03$ cd rails-1.2.6/railties/ bash-2.03$ rake regular\_test (in /u/liangl/ruby/JRUBY103/unit\_test/rails-1…

---

## [How to sort using active record?](https://www.ruby-forum.com/t/how-to-sort-using-active-record/140854)

<div class="topic-metadata">

**Author:** [@shaselai](https://www.ruby-forum.com/u/shaselai)\
**Replies:** 1\
**Last updated:** [June 19, 2008, 10:50am UTC](https://www.ruby-forum.com/t/how-to-sort-using-active-record/140854 "2008-06-19T10:50:26Z")

</div>

If I have a database table called Books and I want to sort it by date or title, what is the correct command to do so? It probably starts with Book.find(…)? thanks!

---

## [Prototype + jQuery or jQuery alone!](https://www.ruby-forum.com/t/prototype-jquery-or-jquery-alone/140856)

<div class="topic-metadata">

**Author:** [@artchrst](https://www.ruby-forum.com/u/artchrst)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 9:40am UTC](https://www.ruby-forum.com/t/prototype-jquery-or-jquery-alone/140856 "2008-06-19T09:40:16Z")

</div>

Hi all, I’ve tried to remove prototype in rails using jrails. I found that many plugin using prototype are difficult to remove, e.g. ym4r, CalendarHelper and LiveValidation. Has anyone successfully remove prototype i…

---

## [Can we use plsql logic in ruby on rail](https://www.ruby-forum.com/t/can-we-use-plsql-logic-in-ruby-on-rail/140853)

<div class="topic-metadata">

**Author:** [@lostwarrior](https://www.ruby-forum.com/u/lostwarrior)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 8:35am UTC](https://www.ruby-forum.com/t/can-we-use-plsql-logic-in-ruby-on-rail/140853 "2008-06-19T08:35:17Z")

</div>

hi i am using oracle database,i am writing the plsql logic in my oracle db.is possible to integrate with rails,as what we are doing with java &

---

## [Time Problem](https://www.ruby-forum.com/t/time-problem/140821)

<div class="topic-metadata">

**Author:** [@sigma](https://www.ruby-forum.com/u/sigma)\
**Replies:** 4\
**Last updated:** [June 19, 2008, 8:22am UTC](https://www.ruby-forum.com/t/time-problem/140821 "2008-06-19T08:22:08Z")

</div>

Hi all I’ve got following stupid problem: If I want to add a new record (with a DateTime-value) to database, there is allways the wrong time (2 h delay) saved. Here my code: user.userlogs.create({:date\_session\_start…

---

## [Strange performance issue](https://www.ruby-forum.com/t/strange-performance-issue/140851)

<div class="topic-metadata">

**Author:** [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Replies:** 2\
**Last updated:** [June 19, 2008, 7:44am UTC](https://www.ruby-forum.com/t/strange-performance-issue/140851 "2008-06-19T07:44:29Z")

</div>

I have a strange performance issue and have no idea how to find the bottle neck. A page on my site (Premium Domain Broker - DNX.com) is taking way too long to load. So I decided to test it out via curl to see how fast…

---

## [Selecting default value in a collection select](https://www.ruby-forum.com/t/selecting-default-value-in-a-collection-select/140835)

<div class="topic-metadata">

**Author:** [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Replies:** 4\
**Last updated:** [June 19, 2008, 7:33am UTC](https://www.ruby-forum.com/t/selecting-default-value-in-a-collection-select/140835 "2008-06-19T07:33:11Z")

</div>

I’m having trouble selecting a default value in my collection select. here is my code: f.collection\_select(:item\_type\_id, @item\_types, :id, :name) i want to select item\_type.name = “N/A” for the default. any ideas?

---

## [Spell checking in rhtml page](https://www.ruby-forum.com/t/spell-checking-in-rhtml-page/140852)

<div class="topic-metadata">

**Author:** [@ganana\_srishti](https://www.ruby-forum.com/u/ganana_srishti)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 7:25am UTC](https://www.ruby-forum.com/t/spell-checking-in-rhtml-page/140852 "2008-06-19T07:25:32Z")

</div>

Hi All, Is there any plug-in for spell checking in rails … (for .rhtml pages and .rb files, .css files also)

---

## [Can Rails be run against SQL Server 2008 from Linux/Mac?](https://www.ruby-forum.com/t/can-rails-be-run-against-sql-server-2008-from-linux-mac/140848)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 1\
**Last updated:** [June 19, 2008, 7:04am UTC](https://www.ruby-forum.com/t/can-rails-be-run-against-sql-server-2008-from-linux-mac/140848 "2008-06-19T07:04:26Z")

</div>

Is anyone successfully running Rails against SQL Server 2008 from either a Linux or a Mac? I have been able to run my Rails apps. against SQL Server 2000 using the standard freetds/unixodbc/ruby-dbi/ruby-odbc combinat…

---

## [ActionView::TemplateError (protected method](https://www.ruby-forum.com/t/actionview-templateerror-protected-method/140850)

<div class="topic-metadata">

**Author:** [@RoR\_Nb](https://www.ruby-forum.com/u/RoR_Nb)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 6:22am UTC](https://www.ruby-forum.com/t/actionview-templateerror-protected-method/140850 "2008-06-19T06:22:30Z")

</div>

Hi there im getting this error when im trying to use a virtual attribute in the user model how can i solve this problem? NoMethodError in Users#index Showing users/index.html.erb where line #6 raised: protected meth…

---

## [Some questions about rake](https://www.ruby-forum.com/t/some-questions-about-rake/140849)

<div class="topic-metadata">

**Author:** [@stone](https://www.ruby-forum.com/u/stone)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 6:07am UTC](https://www.ruby-forum.com/t/some-questions-about-rake/140849 "2008-06-19T06:07:17Z")

</div>

well , rake , I use rake 0.8.1 , rails 2.1 , db2 9.5, trying to migrate,but get this error ,why? rake db:migrate --trace (in D:/ruby/work/depots) rake db:migrate \*\* Invoke db:migrate (first\_time) \*\* Invoke environment …

---

## [Named Scope Woes](https://www.ruby-forum.com/t/named-scope-woes/140754)

<div class="topic-metadata">

**Author:** [@alexmic](https://www.ruby-forum.com/u/alexmic)\
**Replies:** 1\
**Last updated:** [June 19, 2008, 3:09am UTC](https://www.ruby-forum.com/t/named-scope-woes/140754 "2008-06-19T03:09:46Z")

</div>

I’m trying to dynamically build up a complex search screen using named scopes very much like in ryans recent railscast at #112 Anonymous Scopes - RailsCasts. I’m finding issue though that the second named scope is wip…

---

## [Strange REST routing problem using sortable\_element. Help!](https://www.ruby-forum.com/t/strange-rest-routing-problem-using-sortable-element-help/140831)

<div class="topic-metadata">

**Author:** [@slafochmed](https://www.ruby-forum.com/u/slafochmed)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 1:12am UTC](https://www.ruby-forum.com/t/strange-rest-routing-problem-using-sortable-element-help/140831 "2008-06-19T01:12:36Z")

</div>

Hi, I’m having a very strange problem using a AJAX sortable list containing images for articles. I tried a lot of things and searched for hours but I don’t find the reason. I would really appreciate your help. Please…

---

## [Has\_many :through](https://www.ruby-forum.com/t/has-many-through/140748)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 3\
**Last updated:** [June 19, 2008, 12:35am UTC](https://www.ruby-forum.com/t/has-many-through/140748 "2008-06-19T00:35:27Z")

</div>

Hi I have the models 1.Group has\_many :user\_groups has\_many :contacts, :through =\> :user\_groups 2.Contacts has\_many :user\_groups has\_many :groups, :through =\> :user\_groups 3.UserGroup belongs\_to :group belongs\_…

---

## [Ruby on Rails 2.1 Unit Testing](https://www.ruby-forum.com/t/ruby-on-rails-2-1-unit-testing/140808)

<div class="topic-metadata">

**Author:** [@mcmohd](https://www.ruby-forum.com/u/mcmohd)\
**Replies:** 1\
**Last updated:** [June 19, 2008, 12:21am UTC](https://www.ruby-forum.com/t/ruby-on-rails-2-1-unit-testing/140808 "2008-06-19T00:21:35Z")

</div>

Hi, Just introduced few more chapters in my Ruby on Rails 2.1 tutorial. Most interesting one is Unit Testing of RoR Applications. Just go through it and send me your comments. Thanks.

---

## [Prevent attachment processing in Attachment\_Fu](https://www.ruby-forum.com/t/prevent-attachment-processing-in-attachment-fu/140826)

<div class="topic-metadata">

**Author:** [@misleb](https://www.ruby-forum.com/u/misleb)\
**Replies:** 0\
**Last updated:** [June 19, 2008, 12:12am UTC](https://www.ruby-forum.com/t/prevent-attachment-processing-in-attachment-fu/140826 "2008-06-19T00:12:02Z")

</div>

I was wondering if there is some way to make attachments optional with attachment\_fu. Currently if I try to run model.update\_attributes with no uploaded\_data I’ll get an error. There must be some way to tell attachmen…

---

## [Working with a Legacy DB Question](https://www.ruby-forum.com/t/working-with-a-legacy-db-question/140809)

<div class="topic-metadata">

**Author:** [@scottc12](https://www.ruby-forum.com/u/scottc12)\
**Replies:** 3\
**Last updated:** [June 18, 2008, 11:41pm UTC](https://www.ruby-forum.com/t/working-with-a-legacy-db-question/140809 "2008-06-18T23:41:37Z")

</div>

Hello All, My question is this. I’m trying to connect to a MySQL DB for read only in ROR Class Report \< ActiveRecord::Base set\_table\_name “stories” set\_primary\_key “record\_id” end script/console story = Report.fi…

---

## [Deploying with godaddy.... I know](https://www.ruby-forum.com/t/deploying-with-godaddy-i-know/140812)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 4\
**Last updated:** [June 18, 2008, 11:38pm UTC](https://www.ruby-forum.com/t/deploying-with-godaddy-i-know/140812 "2008-06-18T23:38:39Z")

</div>

I know godaddy is one of the worst hosting companies for rails apps and everywhere I look for help that is all I read about. My client already has a site with godaddy and they refuse to use anyone else so I have to m…

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

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