# Rails

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

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

---

## [A few web services questions](https://www.ruby-forum.com/t/a-few-web-services-questions/110040)

<div class="topic-metadata">

**Author:** [@xmg-eric](https://www.ruby-forum.com/u/xmg-eric)\
**Replies:** 0\
**Last updated:** [July 21, 2007, 10:39pm UTC](https://www.ruby-forum.com/t/a-few-web-services-questions/110040 "2007-07-21T22:39:47Z")

</div>

Hey All, I’m currently in the process of building an API for a very large Rails project, which will mostly to be used by users to create software, widgets, etc… i’m just a bit lost and confused about what where to go …

---

## [Processing PersonController#create (for 192.168.1.50 at 2007](https://www.ruby-forum.com/t/processing-personcontroller-create-for-192-168-1-50-at-2007/109968)

<div class="topic-metadata">

**Author:** [@Hassan\_S](https://www.ruby-forum.com/u/Hassan_S)\
**Replies:** 9\
**Last updated:** [July 21, 2007, 10:31pm UTC](https://www.ruby-forum.com/t/processing-personcontroller-create-for-192-168-1-50-at-2007/109968 "2007-07-21T22:31:34Z")

</div>

New to rails, trying to do a pretty vanilla test-run app. Here’s the beginning of a log dump from the subject error (with a little formatting for readability): Processing PersonController#create (for 192.168.1.50 at 2…

---

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

<div class="topic-metadata">

**Author:** [@pardoengreg](https://www.ruby-forum.com/u/pardoengreg)\
**Replies:** 2\
**Last updated:** [July 21, 2007, 9:40pm UTC](https://www.ruby-forum.com/t/has-many/109990 "2007-07-21T21:40:27Z")

</div>

Hi, I have a table collection and a table collectionorganisation. The collectionorganisation table is used to define a hierarchy between collections. So, in the table collectionorganisation there is two foreign key : …

---

## [Using :joins gives me the wrong id](https://www.ruby-forum.com/t/using-joins-gives-me-the-wrong-id/109993)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [July 21, 2007, 6:49pm UTC](https://www.ruby-forum.com/t/using-joins-gives-me-the-wrong-id/109993 "2007-07-21T18:49:54Z")

</div>

Hi, I have a bit of code like so: @city = City.find(params\[:id\]) @event\_pages, @events = paginate :events, :per\_page =\> 10, :joins =\> \[“inner join locations on events.location\_id = locations.id”\], :conditions =\> \[“…

---

## [Attachment\_fu](https://www.ruby-forum.com/t/attachment-fu/110029)

<div class="topic-metadata">

**Author:** [@fernando](https://www.ruby-forum.com/u/fernando)\
**Replies:** 1\
**Last updated:** [July 21, 2007, 6:05pm UTC](https://www.ruby-forum.com/t/attachment-fu/110029 "2007-07-21T18:05:19Z")

</div>

I am getting a bizarre problem using attachment\_fu and I was wondering if anyone knows how to fix it/ why its happening. Ive been following: http://clarkware.com/cgi/blosxom/2007/02/24 and I am up and running as far …

---

## [Efficient, "Rails Way" method of doing a somewhat complex fi](https://www.ruby-forum.com/t/efficient-rails-way-method-of-doing-a-somewhat-complex-fi/109996)

<div class="topic-metadata">

**Author:** [@lunaclaire](https://www.ruby-forum.com/u/lunaclaire)\
**Replies:** 1\
**Last updated:** [July 21, 2007, 6:01pm UTC](https://www.ruby-forum.com/t/efficient-rails-way-method-of-doing-a-somewhat-complex-fi/109996 "2007-07-21T18:01:18Z")

</div>

I’m still a newb w/r/t rails and ruby, so this may be obvious, but I havent found an answer in my searching yet… I have a visibility attribute on a Story model that says some of the objects can only be seen by “friend…

---

## [Attachment\_fu problem](https://www.ruby-forum.com/t/attachment-fu-problem/196406)

<div class="topic-metadata">

**Author:** [@fernando](https://www.ruby-forum.com/u/fernando)\
**Replies:** 0\
**Last updated:** [July 21, 2007, 5:18pm UTC](https://www.ruby-forum.com/t/attachment-fu-problem/196406 "2007-07-21T17:18:14Z")

</div>

I am getting a bizarre problem using attachment\_fu and I was wondering if anyone knows how to fix it/ why its happening. Ive been following: http://clarkware.com/cgi/blosxom/2007/02/24 and I am up and running as far …

---

## [ActiveScaffold. Wow](https://www.ruby-forum.com/t/activescaffold-wow/110019)

<div class="topic-metadata">

**Author:** [@beaon](https://www.ruby-forum.com/u/beaon)\
**Replies:** 1\
**Last updated:** [July 21, 2007, 4:26pm UTC](https://www.ruby-forum.com/t/activescaffold-wow/110019 "2007-07-21T16:26:35Z")

</div>

Ignore the noise. Just wanted to say I just started using ActiveScaffold, and holy bikini Batman… This thing is /cool/. Didn’t look up the author’s name (time/energy/nearly 4am), but well done… That’s all… end tra…

---

## [Observe\_field using :on =\> select not working](https://www.ruby-forum.com/t/observe-field-using-on-select-not-working/109953)

<div class="topic-metadata">

**Author:** [@stephen\_OSD](https://www.ruby-forum.com/u/stephen_OSD)\
**Replies:** 3\
**Last updated:** [July 21, 2007, 3:11pm UTC](https://www.ruby-forum.com/t/observe-field-using-on-select-not-working/109953 "2007-07-21T15:11:27Z")

</div>

Is there a known bug with observe\_field using the :on parameter? I want to observe a select list, and only update a child select list after someone has made a selection, so I want to use the onSelect event. However n…

---

## [Edge Rails Apps Consuming 1.2 Rails Resources](https://www.ruby-forum.com/t/edge-rails-apps-consuming-1-2-rails-resources/109995)

<div class="topic-metadata">

**Author:** [@misleb](https://www.ruby-forum.com/u/misleb)\
**Replies:** 1\
**Last updated:** [July 21, 2007, 2:51pm UTC](https://www.ruby-forum.com/t/edge-rails-apps-consuming-1-2-rails-resources/109995 "2007-07-21T14:51:26Z")

</div>

Hi, I’m currently starting a new Rails app using Edge so I can utilize the Active Resources client. The app I am consuming resources from is a production 1.2.3 app (I can’t easily go Edge with it). The problem I’m hav…

---

## [Support my bachelor thesis: Efficient Web Dev with RoR](https://www.ruby-forum.com/t/support-my-bachelor-thesis-efficient-web-dev-with-ror/110025)

<div class="topic-metadata">

**Author:** [@guraz](https://www.ruby-forum.com/u/guraz)\
**Replies:** 0\
**Last updated:** [July 21, 2007, 2:46pm UTC](https://www.ruby-forum.com/t/support-my-bachelor-thesis-efficient-web-dev-with-ror/110025 "2007-07-21T14:46:40Z")

</div>

Hi all, currently I’m writing my bachelor thesis which is about efficient web development by using Ruby On Rails. In order to be able to present any result I would need to ask you for your help: The easy one: take…

---

## [Unable to get "has\_many :after\_add" to work - need help](https://www.ruby-forum.com/t/unable-to-get-has-many-after-add-to-work-need-help/110008)

<div class="topic-metadata">

**Author:** [@vince](https://www.ruby-forum.com/u/vince)\
**Replies:** 3\
**Last updated:** [July 21, 2007, 2:26pm UTC](https://www.ruby-forum.com/t/unable-to-get-has-many-after-add-to-work-need-help/110008 "2007-07-21T14:26:24Z")

</div>

Can someone tell me what I’m doing wrong? I’ve spent way too much time on this class Picture \< ActiveRecord::Base has\_many :ratings, :after\_add =\> :increment\_rating, :after\_remove =\> :decrement\_rating def incre…

---

## [\[ANN\] ActiveRecord::Extensions 0.7.0 Released!](https://www.ruby-forum.com/t/ann-activerecord-extensions-0-7-0-released/110015)

<div class="topic-metadata">

**Author:** [@zdennis](https://www.ruby-forum.com/u/zdennis)\
**Replies:** 0\
**Last updated:** [July 21, 2007, 8:47am UTC](https://www.ruby-forum.com/t/ann-activerecord-extensions-0-7-0-released/110015 "2007-07-21T08:47:55Z")

</div>

ActiveRecord::Extensions 0.7.0 is released! What’s New ? The big update is Oracle support for better finders (regexps only supported on Oracle 10 or higher) and import functionality, as well as having created\_at/upda…

---

## [Attachment\_fu validations](https://www.ruby-forum.com/t/attachment-fu-validations/110011)

<div class="topic-metadata">

**Author:** [@dcgrigsby](https://www.ruby-forum.com/u/dcgrigsby)\
**Replies:** 0\
**Last updated:** [July 21, 2007, 4:17am UTC](https://www.ruby-forum.com/t/attachment-fu-validations/110011 "2007-07-21T04:17:14Z")

</div>

I tried following an attachment\_fu ajax tutorial online but am having trouble displaying the validations. Here is the tutorial: http://khamsouk.souvanlasy.com/2007/5/1/ajax-file-uploads-in-rails-using-attachment\_fu-and…

---

## [Routing problems (works with mongrel / webrick, but fails in](https://www.ruby-forum.com/t/routing-problems-works-with-mongrel-webrick-but-fails-in/110007)

<div class="topic-metadata">

**Author:** [@jjkiesch](https://www.ruby-forum.com/u/jjkiesch)\
**Replies:** 1\
**Last updated:** [July 21, 2007, 3:26am UTC](https://www.ruby-forum.com/t/routing-problems-works-with-mongrel-webrick-but-fails-in/110007 "2007-07-21T03:26:35Z")

</div>

for some reason all of the apps in my server are not working when i upgraded my version of rails. booting up a ruby server on the same machine works fine, but when using fcgi/apache, only my root level routes are work…

---

## [ERB help. not seeing variables?](https://www.ruby-forum.com/t/erb-help-not-seeing-variables/110006)

<div class="topic-metadata">

**Author:** [@ktheory](https://www.ruby-forum.com/u/ktheory)\
**Replies:** 0\
**Last updated:** [July 21, 2007, 2:53am UTC](https://www.ruby-forum.com/t/erb-help-not-seeing-variables/110006 "2007-07-21T02:53:51Z")

</div>

This isn’t for rails specifically… I’m trying to do some ERB operations… I’m trying to do some template parsing in a class… here is my class: require ‘erb’ class TemplateParser def TemplateParser.parse(template, par…

---

## [Rspec and stubbing arrays](https://www.ruby-forum.com/t/rspec-and-stubbing-arrays/110004)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [July 21, 2007, 2:27am UTC](https://www.ruby-forum.com/t/rspec-and-stubbing-arrays/110004 "2007-07-21T02:27:32Z")

</div>

I’m having a little problem figuring out how to stub this scenario: my controller has this code in it: if current\_user.foos \<\< @foo and my spec is giving me errors about a missing stub: Mock ‘foos’ received unexpecte…

---

## [STI -Defining Required Parameters](https://www.ruby-forum.com/t/sti-defining-required-parameters/109998)

<div class="topic-metadata">

**Author:** [@sjmadsen](https://www.ruby-forum.com/u/sjmadsen)\
**Replies:** 0\
**Last updated:** [July 21, 2007, 1:17am UTC](https://www.ruby-forum.com/t/sti-defining-required-parameters/109998 "2007-07-21T01:17:01Z")

</div>

Hi everyone, I have been struggling with this issue for some time, and I really need some help. I have a user system with several “accounts” each account has different set of validation rules for a different number …

---

## [Reset and Retain data in Text Fields on RoR Forms](https://www.ruby-forum.com/t/reset-and-retain-data-in-text-fields-on-ror-forms/109991)

<div class="topic-metadata">

**Author:** [@arif](https://www.ruby-forum.com/u/arif)\
**Replies:** 1\
**Last updated:** [July 21, 2007, 12:39am UTC](https://www.ruby-forum.com/t/reset-and-retain-data-in-text-fields-on-ror-forms/109991 "2007-07-21T00:39:25Z")

</div>

Hi, I apologize if this appears to be too elementary and answered before. I need to reset a text\_field (named as ‘server\_name’) in my controller. The relevant controller code is: \<%= start\_form\_tag :action =\> ‘search…

---

## [Override RAILS\_ENV from rake task](https://www.ruby-forum.com/t/override-rails-env-from-rake-task/109972)

<div class="topic-metadata">

**Author:** [@railsroad](https://www.ruby-forum.com/u/railsroad)\
**Replies:** 3\
**Last updated:** [July 20, 2007, 11:54pm UTC](https://www.ruby-forum.com/t/override-rails-env-from-rake-task/109972 "2007-07-20T23:54:14Z")

</div>

I have a bunch of rake tasks that work against whichever database is associated with the current RAILS\_ENV. But there is another rake task that I want to invoke those db neutral tasks from that should only ever wor…

---

## [Validating password: when empty, don't save it!](https://www.ruby-forum.com/t/validating-password-when-empty-dont-save-it/109562)

<div class="topic-metadata">

**Author:** [@leonb](https://www.ruby-forum.com/u/leonb)\
**Replies:** 9\
**Last updated:** [July 20, 2007, 11:52pm UTC](https://www.ruby-forum.com/t/validating-password-when-empty-dont-save-it/109562 "2007-07-20T23:52:11Z")

</div>

Hi, Users can edit their own passwords in my app. But when they leave both password-fields (\_confirmation) empty, they get “” as their password. Is their a way to get around this problem? This is my userobject when I…

---

## [Attachment\_fu path](https://www.ruby-forum.com/t/attachment-fu-path/109988)

<div class="topic-metadata">

**Author:** [@dcgrigsby](https://www.ruby-forum.com/u/dcgrigsby)\
**Replies:** 0\
**Last updated:** [July 20, 2007, 10:59pm UTC](https://www.ruby-forum.com/t/attachment-fu-path/109988 "2007-07-20T22:59:59Z")

</div>

Hi, I was wondering if there was anyway to add a user’s id to the file path of all images uploaded. Currently I’m using the following function in my image model to set the file path: def full\_filename(thumbnail = nil…

---

## [Where do I put code for my own types?](https://www.ruby-forum.com/t/where-do-i-put-code-for-my-own-types/109896)

<div class="topic-metadata">

**Author:** [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Replies:** 8\
**Last updated:** [July 20, 2007, 10:52pm UTC](https://www.ruby-forum.com/t/where-do-i-put-code-for-my-own-types/109896 "2007-07-20T22:52:16Z")

</div>

Sorry for all the questions today… Beyond the obvious things–models, controllers, helpers, and other framework-related types–where should I put the code for my own types? For example, I was thinking of writing my own …

---

## [Theme Plugin CSS Path Problem](https://www.ruby-forum.com/t/theme-plugin-css-path-problem/109989)

<div class="topic-metadata">

**Author:** [@summea](https://www.ruby-forum.com/u/summea)\
**Replies:** 0\
**Last updated:** [July 20, 2007, 10:52pm UTC](https://www.ruby-forum.com/t/theme-plugin-css-path-problem/109989 "2007-07-20T22:52:16Z")

</div>

Hey everyone, I’ve noticed over the past week that there is very (VERY) little information about getting the Theme Plugin (by Matt McCray,) truly working with Rails 1.2.x. Here is a short list of things I have been a…

---

## [Scaffold question](https://www.ruby-forum.com/t/scaffold-question/109987)

<div class="topic-metadata">

**Author:** [@DBC\_User](https://www.ruby-forum.com/u/DBC_User)\
**Replies:** 0\
**Last updated:** [July 20, 2007, 10:46pm UTC](https://www.ruby-forum.com/t/scaffold-question/109987 "2007-07-20T22:46:15Z")

</div>

I have a 2 tables, 1 table is called master and another one is called reference. The reference table has id and description. In the master table, there is one column which refers to the reference table. I have created…

---

## [What linux distro do you recommend for rails dev?](https://www.ruby-forum.com/t/what-linux-distro-do-you-recommend-for-rails-dev/109661)

<div class="topic-metadata">

**Author:** [@emmanueloga](https://www.ruby-forum.com/u/emmanueloga)\
**Replies:** 14\
**Last updated:** [July 20, 2007, 10:43pm UTC](https://www.ruby-forum.com/t/what-linux-distro-do-you-recommend-for-rails-dev/109661 "2007-07-20T22:43:15Z")

</div>

What linux distro do you recommend for rails dev? Thanks!

---

## [Migration foreign key](https://www.ruby-forum.com/t/migration-foreign-key/109978)

<div class="topic-metadata">

**Author:** [@DBC\_User](https://www.ruby-forum.com/u/DBC_User)\
**Replies:** 1\
**Last updated:** [July 20, 2007, 10:21pm UTC](https://www.ruby-forum.com/t/migration-foreign-key/109978 "2007-07-20T22:21:12Z")

</div>

Hi All, I am trying add a foreign key using db:migrate and getting error. I didn’t any documentation on the syntax, if some one has a link, please send it to me if not, please have a look at the following and tell me …

---

## [Overriding Array](https://www.ruby-forum.com/t/overriding-array/109963)

<div class="topic-metadata">

**Author:** [@michau](https://www.ruby-forum.com/u/michau)\
**Replies:** 6\
**Last updated:** [July 20, 2007, 10:11pm UTC](https://www.ruby-forum.com/t/overriding-array/109963 "2007-07-20T22:11:12Z")

</div>

Does anyone know how can I override ruby’s Array delete method, and use my own instead? Cheers, Michal

---

## [Has\_many\_and\_belongs\_to\_"one"? beginner question, go easy o](https://www.ruby-forum.com/t/has-many-and-belongs-to-one-beginner-question-go-easy-o/109969)

<div class="topic-metadata">

**Author:** [@Astorian](https://www.ruby-forum.com/u/Astorian)\
**Replies:** 1\
**Last updated:** [July 20, 2007, 10:09pm UTC](https://www.ruby-forum.com/t/has-many-and-belongs-to-one-beginner-question-go-easy-o/109969 "2007-07-20T22:09:43Z")

</div>

Greetings. I am new to RoR, and to programming in general, so I apologize if the solution is trivial. My goal is to keep track of the 5 most common “Tag\_Relationships” in a tagging scheme. This would let me ask such t…

---

## [Testing Issue](https://www.ruby-forum.com/t/testing-issue/109955)

<div class="topic-metadata">

**Author:** [@visaolive](https://www.ruby-forum.com/u/visaolive)\
**Replies:** 5\
**Last updated:** [July 20, 2007, 9:26pm UTC](https://www.ruby-forum.com/t/testing-issue/109955 "2007-07-20T21:26:01Z")

</div>

I have a weird (at least for me) problem. $rake test Units: 50 tests, 155 assertions, 0 failures, 0 errors Functionals: 51 tests, 122 assertions, 0 failures, 0 errors Integration: 1 tests, 19 assertions, 0 failures, …

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

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