# Rails

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

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

---

## [Why Getting 'NoMethodError' Error](https://www.ruby-forum.com/t/why-getting-nomethoderror-error/126589)

<div class="topic-metadata">

**Author:** [@skiz](https://www.ruby-forum.com/u/skiz)\
**Replies:** 0\
**Last updated:** [January 19, 2008, 11:17pm UTC](https://www.ruby-forum.com/t/why-getting-nomethoderror-error/126589 "2008-01-19T23:17:39Z")

</div>

Hi. I am new to rails and am hoping someone can help me understand why I am getting a certain error. I have gone through the Agile Web Development Book and am now trying to build a basic app (job board) to try someth…

---

## [Noob AR many\_to\_many problem](https://www.ruby-forum.com/t/noob-ar-many-to-many-problem/126560)

<div class="topic-metadata">

**Author:** [@acgreen](https://www.ruby-forum.com/u/acgreen)\
**Replies:** 3\
**Last updated:** [January 19, 2008, 10:46pm UTC](https://www.ruby-forum.com/t/noob-ar-many-to-many-problem/126560 "2008-01-19T22:46:41Z")

</div>

I’m receiving the following error … ActiveRecord::StatementInvalid: SQLite3::SQLException: no such column: id: UPDATE user\_jobs SET user\_id = NULL WHERE (user\_id = 1 AND id IN (NULL)) while trying to delete from a jo…

---

## [Recommendations for a Sphinx plugin](https://www.ruby-forum.com/t/recommendations-for-a-sphinx-plugin/126587)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 0\
**Last updated:** [January 19, 2008, 10:37pm UTC](https://www.ruby-forum.com/t/recommendations-for-a-sphinx-plugin/126587 "2008-01-19T22:37:12Z")

</div>

I’m familiar with a couple of sphinx plugins floating out there right now. I have a few simple needs. It needs to work on Rails 1.2.5 (ultrasphinx on works on Rails \> 2) I need to be able to easily search multiple ind…

---

## [Decimals are being converted to Bigdecimals!](https://www.ruby-forum.com/t/decimals-are-being-converted-to-bigdecimals/126567)

<div class="topic-metadata">

**Author:** [@Neal\_L](https://www.ruby-forum.com/u/Neal_L)\
**Replies:** 1\
**Last updated:** [January 19, 2008, 9:09pm UTC](https://www.ruby-forum.com/t/decimals-are-being-converted-to-bigdecimals/126567 "2008-01-19T21:09:43Z")

</div>

Hi all, I’m working on a financial app, and have set up some columns in my tables as decimals with precision =\> 8 and scale =\> 2. My migration looks like: change\_column :lineitems, :price, :decimal, :precision =\> 8…

---

## [One or two indexes? add\_index :votes, \[:item\_id, :ip\_address\]](https://www.ruby-forum.com/t/one-or-two-indexes-add-index-votes-item-id-ip-address/126433)

<div class="topic-metadata">

**Author:** [@stedwick](https://www.ruby-forum.com/u/stedwick)\
**Replies:** 6\
**Last updated:** [January 19, 2008, 8:37pm UTC](https://www.ruby-forum.com/t/one-or-two-indexes-add-index-votes-item-id-ip-address/126433 "2008-01-19T20:37:56Z")

</div>

What’s the difference between add\_index :votes, \[:item\_id, :ip\_address\] and add\_index :votes, :item\_id add\_index :votes, :ip\_address Not just in rails, but in the db as well? Thx!

---

## [Help with email attachments, please!](https://www.ruby-forum.com/t/help-with-email-attachments-please/126578)

<div class="topic-metadata">

**Author:** [@Brandon\_Taylor](https://www.ruby-forum.com/u/Brandon_Taylor)\
**Replies:** 0\
**Last updated:** [January 19, 2008, 8:35pm UTC](https://www.ruby-forum.com/t/help-with-email-attachments-please/126578 "2008-01-19T20:35:00Z")

</div>

Hi everyone, I would like to attach a posted file to an email, but am having an awfully hard time finding examples… The file is coming from a ‘file\_field’ in my form and the form is set to :mutlipart =\> true, :method…

---

## [Installation C-based MySQL library](https://www.ruby-forum.com/t/installation-c-based-mysql-library/126575)

<div class="topic-metadata">

**Author:** [@jbauer888](https://www.ruby-forum.com/u/jbauer888)\
**Replies:** 0\
**Last updated:** [January 19, 2008, 7:49pm UTC](https://www.ruby-forum.com/t/installation-c-based-mysql-library/126575 "2008-01-19T19:49:44Z")

</div>

Hi all, have a newbee-to-rails-question. I followed the instructions to install the C-based MySQL library in database.yml for Windows. I installed a win32 build of th driver with “gem install mysql” The /bin directo…

---

## [Globalize Plugin: SImple question about searching untraslated records](https://www.ruby-forum.com/t/globalize-plugin-simple-question-about-searching-untraslated-records/126570)

<div class="topic-metadata">

**Author:** [@gianluca\_t](https://www.ruby-forum.com/u/gianluca_t)\
**Replies:** 1\
**Last updated:** [January 19, 2008, 7:46pm UTC](https://www.ruby-forum.com/t/globalize-plugin-simple-question-about-searching-untraslated-records/126570 "2008-01-19T19:46:12Z")

</div>

Hi, how can i find all record of untranslated field on a field under Globalize plugin ? Example: define a model: class Translation \< ActiveRecord::Base translates :description end working with 2 locales (en-US ba…

---

## [ActiveResource and XML-issues](https://www.ruby-forum.com/t/activeresource-and-xml-issues/126565)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [January 19, 2008, 7:42pm UTC](https://www.ruby-forum.com/t/activeresource-and-xml-issues/126565 "2008-01-19T19:42:41Z")

</div>

Hi! I have a strange problem with ActiveResources: When ActiveResource parses the following XML, it throws a RuntimeError and displays the following Error-message: “can’t typecast “http://example.net/faktura units.xs…

---

## [Modifying JAVASCRIPT\_DEFAULT\_SOURCES](https://www.ruby-forum.com/t/modifying-javascript-default-sources/126532)

<div class="topic-metadata">

**Author:** [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Replies:** 5\
**Last updated:** [January 19, 2008, 6:51pm UTC](https://www.ruby-forum.com/t/modifying-javascript-default-sources/126532 "2008-01-19T18:51:49Z")

</div>

Anyone know an elegant way to customize the default javascript includes for rails? I don’t use prototype at all – I use Ext. I wanna’ make my Ext libs + custom application libs the default.

---

## [Yet another scaling question](https://www.ruby-forum.com/t/yet-another-scaling-question/126547)

<div class="topic-metadata">

**Author:** [@gianluca\_t](https://www.ruby-forum.com/u/gianluca_t)\
**Replies:** 3\
**Last updated:** [January 19, 2008, 6:36pm UTC](https://www.ruby-forum.com/t/yet-another-scaling-question/126547 "2008-01-19T18:36:50Z")

</div>

Hi, I have written a rails application that runs very well (that’s so good !!!). This application serves up file downloads for about 150 users. These downloads are protected by some authorization rules, precedence r…

---

## [Problem with mysql & Rails for stats](https://www.ruby-forum.com/t/problem-with-mysql-rails-for-stats/126566)

<div class="topic-metadata">

**Author:** [@marsenio](https://www.ruby-forum.com/u/marsenio)\
**Replies:** 0\
**Last updated:** [January 19, 2008, 6:08pm UTC](https://www.ruby-forum.com/t/problem-with-mysql-rails-for-stats/126566 "2008-01-19T18:08:52Z")

</div>

Hi everybody I have a ROR application which generates some stats taking data from a db table. To get the results I before create an array with all the values involved in the stats - each data stack label - … then cal…

---

## [Creating a View](https://www.ruby-forum.com/t/creating-a-view/126500)

<div class="topic-metadata">

**Author:** [@longint](https://www.ruby-forum.com/u/longint)\
**Replies:** 11\
**Last updated:** [January 19, 2008, 5:02pm UTC](https://www.ruby-forum.com/t/creating-a-view/126500 "2008-01-19T17:02:50Z")

</div>

(Mac OS X 10.51, Rails 2.0.2) I’m trying to get my feet wet with a simple user registration form. Username, password, and email. I went through the motions of creating a static scaffold (well there are no dynamic sca…

---

## [Migrate in between versions](https://www.ruby-forum.com/t/migrate-in-between-versions/126467)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 3\
**Last updated:** [January 19, 2008, 5:01pm UTC](https://www.ruby-forum.com/t/migrate-in-between-versions/126467 "2008-01-19T17:01:27Z")

</div>

how to migrate in between versions ? suppose if i have version 1-50 . if i want to revert from 30-40 then what should i do ?

---

## [HAML makes me love and hate Python](https://www.ruby-forum.com/t/haml-makes-me-love-and-hate-python/126537)

<div class="topic-metadata">

**Author:** [@stedwick](https://www.ruby-forum.com/u/stedwick)\
**Replies:** 5\
**Last updated:** [January 19, 2008, 4:54pm UTC](https://www.ruby-forum.com/t/haml-makes-me-love-and-hate-python/126537 "2008-01-19T16:54:36Z")

</div>

I’m just a rails newbie, but I thought I would point out a small observation. About a year ago, I was having real trouble making the decision about whether I should learn Ruby or Python. I finally settled on Ruby, one …

---

## [Wiki spam](https://www.ruby-forum.com/t/wiki-spam/126563)

<div class="topic-metadata">

**Author:** [@haldane](https://www.ruby-forum.com/u/haldane)\
**Replies:** 1\
**Last updated:** [January 19, 2008, 4:39pm UTC](https://www.ruby-forum.com/t/wiki-spam/126563 "2008-01-19T16:39:02Z")

</div>

I noticed some vandalism on http://wiki.rubyonrails.org - hard to spot vandalism where just the link destinations have been changed without altering the visible page contents. For instance this page http://wiki.rubyo…

---

## [AJAX automatic print to specific printer?](https://www.ruby-forum.com/t/ajax-automatic-print-to-specific-printer/57638)

<div class="topic-metadata">

**Author:** [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Replies:** 7\
**Last updated:** [January 19, 2008, 4:30pm UTC](https://www.ruby-forum.com/t/ajax-automatic-print-to-specific-printer/57638 "2008-01-19T16:30:18Z")

</div>

Is it possible to print directly to an XP Pro default printer without having to go through an intermediate dialog? The clients are XP Pro with IE. The printer is accessed directly through the network, but could easil…

---

## [Generate SQL-Statement from Model.save()](https://www.ruby-forum.com/t/generate-sql-statement-from-model-save/126559)

<div class="topic-metadata">

**Author:** [@LpLpLp](https://www.ruby-forum.com/u/LpLpLp)\
**Replies:** 1\
**Last updated:** [January 19, 2008, 4:20pm UTC](https://www.ruby-forum.com/t/generate-sql-statement-from-model-save/126559 "2008-01-19T16:20:19Z")

</div>

Hello! Im a rails newbie, i like rails very much, but now I have a problem: I want to generate in one action about 3000 sql statements (mailtemplate that becomes generateted to a mail (with personal salutation,…)). I…

---

## [URL with "." which is part of a parameter, not an extension!](https://www.ruby-forum.com/t/url-with-which-is-part-of-a-parameter-not-an-extension/126465)

<div class="topic-metadata">

**Author:** [@nauhaie](https://www.ruby-forum.com/u/nauhaie)\
**Replies:** 4\
**Last updated:** [January 19, 2008, 3:35pm UTC](https://www.ruby-forum.com/t/url-with-which-is-part-of-a-parameter-not-an-extension/126465 "2008-01-19T15:35:03Z")

</div>

Hi, all! Here’s the problem! I have a page which is supposed to display the profile of a member given it’s username. For example: http://www.\*\*\*.com/users/ahmed.hk Everything worked fine until some guy got the wonder…

---

## [Ajax Question](https://www.ruby-forum.com/t/ajax-question/126309)

<div class="topic-metadata">

**Author:** [@remco](https://www.ruby-forum.com/u/remco)\
**Replies:** 2\
**Last updated:** [January 19, 2008, 3:05pm UTC](https://www.ruby-forum.com/t/ajax-question/126309 "2008-01-19T15:05:28Z")

</div>

hi, take a look at http://www.bandsintown.com/ On the left side they got a data-range bar which you can specify from the left to the right. I am looking for this func. for my new site. Has anyone an idea which ajax-f…

---

## [Private method \`split' called for](https://www.ruby-forum.com/t/private-method-split-called-for/126554)

<div class="topic-metadata">

**Author:** [@philthompson](https://www.ruby-forum.com/u/philthompson)\
**Replies:** 1\
**Last updated:** [January 19, 2008, 2:30pm UTC](https://www.ruby-forum.com/t/private-method-split-called-for/126554 "2008-01-19T14:30:50Z")

</div>

hi, I’m trying to split a string up as follows: @ruby = “I like carrots” =\> “I like carrots” @type = @ruby.split\[2\]\[0,@ruby.split\[2\].length-1\] =\> “carrot” which works fine in the console…but when I try to run…

---

## [Validation - writeback in forms](https://www.ruby-forum.com/t/validation-writeback-in-forms/126503)

<div class="topic-metadata">

**Author:** [@lpp-rob](https://www.ruby-forum.com/u/lpp-rob)\
**Replies:** 1\
**Last updated:** [January 19, 2008, 1:44pm UTC](https://www.ruby-forum.com/t/validation-writeback-in-forms/126503 "2008-01-19T13:44:31Z")

</div>

hallo, i have a form like this: \<% form\_tag :action =\> “foo1” \<%=select\_tag (“user”, “name”, options\_for\_select(someArray))%\> \<%=select\_tag (“formdata”, “language1”, options\_for\_select(someArray))%\> \<%=radio\_butto…

---

## [Reg: validation for has\_many relation table](https://www.ruby-forum.com/t/reg-validation-for-has-many-relation-table/126550)

<div class="topic-metadata">

**Author:** [@shiva](https://www.ruby-forum.com/u/shiva)\
**Replies:** 0\
**Last updated:** [January 19, 2008, 12:34pm UTC](https://www.ruby-forum.com/t/reg-validation-for-has-many-relation-table/126550 "2008-01-19T12:34:33Z")

</div>

Hi, I am facing one problem in validation…I have two tables articles and user both are has\_many relation …so joint table has article\_id ,user\_id , read\_at and rating In front end there is two check box for read\_at an…

---

## [How can I put a sidebar in a f.selec?](https://www.ruby-forum.com/t/how-can-i-put-a-sidebar-in-a-f-selec/126548)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 0\
**Last updated:** [January 19, 2008, 11:48am UTC](https://www.ruby-forum.com/t/how-can-i-put-a-sidebar-in-a-f-selec/126548 "2008-01-19T11:48:22Z")

</div>

I have this code: Client \<% @clients.each do |client| %\> \<option value="\<%= client.id %\>" \<%= ’ selected’ if client.id == @repair\_ticket.client\_id %\>\> \<%= client.name%\> \<% end %\> I want to put a sidebar in …

---

## [After\_filter, but not quite](https://www.ruby-forum.com/t/after-filter-but-not-quite/126517)

<div class="topic-metadata">

**Author:** [@harm](https://www.ruby-forum.com/u/harm)\
**Replies:** 2\
**Last updated:** [January 19, 2008, 11:00am UTC](https://www.ruby-forum.com/t/after-filter-but-not-quite/126517 "2008-01-19T11:00:44Z")

</div>

Dear list, A client of ours requested a site which has a different background for each page(don’t flame me, I just build it). The background depends on stuff I pull from the DB. I planned on using an after\_filter to s…

---

## [ActiveScaffold dropdown column value from other table](https://www.ruby-forum.com/t/activescaffold-dropdown-column-value-from-other-table/126545)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 0\
**Last updated:** [January 19, 2008, 9:42am UTC](https://www.ruby-forum.com/t/activescaffold-dropdown-column-value-from-other-table/126545 "2008-01-19T09:42:23Z")

</div>

Aplogies for posting a question which I think must be trivial but I can not find the answer anywhere! I have posted this to the ActiveScaffold forum but there seems to be very little activity there, hopefully there is…

---

## [How to control self.method access](https://www.ruby-forum.com/t/how-to-control-self-method-access/126295)

<div class="topic-metadata">

**Author:** [@vincent](https://www.ruby-forum.com/u/vincent)\
**Replies:** 6\
**Last updated:** [January 19, 2008, 9:35am UTC](https://www.ruby-forum.com/t/how-to-control-self-method-access/126295 "2008-01-19T09:35:47Z")

</div>

i think self.method just like class method,so if i want to define it as a private method,i should use private\_class\_method :my\_method but i found follow code in \< \> private def self.hash\_password(password) Digest::…

---

## [ActiveRecord::Serialization bug](https://www.ruby-forum.com/t/activerecord-serialization-bug/126544)

<div class="topic-metadata">

**Author:** [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Replies:** 0\
**Last updated:** [January 19, 2008, 9:31am UTC](https://www.ruby-forum.com/t/activerecord-serialization-bug/126544 "2008-01-19T09:31:07Z")

</div>

I think there exists a bug in the ActiveRecord::Serialization. The example below takes an Active Record Campaign object and serializes it into JSON including its related sub\_category object and its related subscriptio…

---

## [Encrypt id in url controller/action/id](https://www.ruby-forum.com/t/encrypt-id-in-url-controller-action-id/125195)

<div class="topic-metadata">

**Author:** [@gabru](https://www.ruby-forum.com/u/gabru)\
**Replies:** 48\
**Last updated:** [January 19, 2008, 6:25am UTC](https://www.ruby-forum.com/t/encrypt-id-in-url-controller-action-id/125195 "2008-01-19T06:25:51Z")

</div>

i am developing a community which has user profiles … those are now accessible through an url like e.g. /user/profile/10 the 10 is the id of the user within the database. now i dont really like the plain ID within th…

---

## [Model stored in the session lost the the early join model](https://www.ruby-forum.com/t/model-stored-in-the-session-lost-the-the-early-join-model/126535)

<div class="topic-metadata">

**Author:** [@gaoxt1983](https://www.ruby-forum.com/u/gaoxt1983)\
**Replies:** 0\
**Last updated:** [January 19, 2008, 4:35am UTC](https://www.ruby-forum.com/t/model-stored-in-the-session-lost-the-the-early-join-model/126535 "2008-01-19T04:35:21Z")

</div>

I have a user model and it has one user\_state, I use User.find(id,:include=\>\[:user\_state\]) to retrieve it, but when I store this user object in session, and fetch it after another http request, it seems when I use use…

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

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