# Rails

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

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

---

## [Undefined Method Errors](https://www.ruby-forum.com/t/undefined-method-errors/143517)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [July 19, 2008, 10:29pm UTC](https://www.ruby-forum.com/t/undefined-method-errors/143517 "2008-07-19T22:29:23Z")

</div>

Hi I’m relative new to RoR - but I’m having a problem with some model relationships that I thought should have worked. Hope someone can help. The code… MODELS: class Delivery \< ActiveRecord::Base belongs\_to :vehic…

---

## [Undefined method \`table\_name'](https://www.ruby-forum.com/t/undefined-method-table-name/143518)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [July 19, 2008, 10:29pm UTC](https://www.ruby-forum.com/t/undefined-method-table-name/143518 "2008-07-19T22:29:23Z")

</div>

Hi I’m relative new to RoR - but I’m having a problem with some model relationships that I thought should have worked. Hope someone can help. The code… MODELS: class Delivery \< ActiveRecord::Base belongs\_to :vehic…

---

## [How to write the code in model](https://www.ruby-forum.com/t/how-to-write-the-code-in-model/143505)

<div class="topic-metadata">

**Author:** [@lostwarrior](https://www.ruby-forum.com/u/lostwarrior)\
**Replies:** 1\
**Last updated:** [July 19, 2008, 9:39pm UTC](https://www.ruby-forum.com/t/how-to-write-the-code-in-model/143505 "2008-07-19T21:39:49Z")

</div>

hi i am a beginner for rails.how to write this in a model and how to call in a controller def upload @image=Image.new @image.filename=params\[:image\]\[:uploaded\_data\].original\_filename @image.content\_type=params\[:im…

---

## [Method "first" of a model](https://www.ruby-forum.com/t/method-first-of-a-model/143508)

<div class="topic-metadata">

**Author:** [@micktaiwan](https://www.ruby-forum.com/u/micktaiwan)\
**Replies:** 2\
**Last updated:** [July 19, 2008, 8:26pm UTC](https://www.ruby-forum.com/t/method-first-of-a-model/143508 "2008-07-19T20:26:38Z")

</div>

I can 't explain this: Loading development environment (Rails 2.1.0) t = Task.first(“id=?”,2032) =\> #\<Task id: 95, project\_id: 9, user\_id: 7, …\> Can you ? Mickael.

---

## [Ferret building on Windows](https://www.ruby-forum.com/t/ferret-building-on-windows/87156)

<div class="topic-metadata">

**Author:** [@laurin1](https://www.ruby-forum.com/u/laurin1)\
**Replies:** 10\
**Last updated:** [July 19, 2008, 7:18pm UTC](https://www.ruby-forum.com/t/ferret-building-on-windows/87156 "2008-07-19T19:18:39Z")

</div>

Hi, I am trying to install Ferret on Windows XP. I have Instant Rails installed but when I do gem install ferret I get errors related to nMake not being installed. Which compiler and make utilities do I need to get …

---

## [Helper functions permanently altering variables](https://www.ruby-forum.com/t/helper-functions-permanently-altering-variables/143507)

<div class="topic-metadata">

**Author:** [@jpfeifer](https://www.ruby-forum.com/u/jpfeifer)\
**Replies:** 5\
**Last updated:** [July 19, 2008, 7:10pm UTC](https://www.ruby-forum.com/t/helper-functions-permanently-altering-variables/143507 "2008-07-19T19:10:21Z")

</div>

Greetings, I’m not sure if I’m maybe not understanding the helper functions correctly, but I’m having a weird problem that seems like it shouldn’t be. I’m sanitizing some book names for url’s using my application he…

---

## [L() helper - what is it?](https://www.ruby-forum.com/t/l-helper-what-is-it/143491)

<div class="topic-metadata">

**Author:** [@unni123](https://www.ruby-forum.com/u/unni123)\
**Replies:** 6\
**Last updated:** [July 19, 2008, 5:23pm UTC](https://www.ruby-forum.com/t/l-helper-what-is-it/143491 "2008-07-19T17:23:51Z")

</div>

I was running an existing rails project. I got an error ActionView: undefined method l l() seems to be a form helper method. Code is something like this: prompt = l(:"#{@controller.controller\_name}\_#{name}\_message")

---

## [Why MethodNotAllowed all of a sudden?](https://www.ruby-forum.com/t/why-methodnotallowed-all-of-a-sudden/143503)

<div class="topic-metadata">

**Author:** [@cojones](https://www.ruby-forum.com/u/cojones)\
**Replies:** 0\
**Last updated:** [July 19, 2008, 4:05pm UTC](https://www.ruby-forum.com/t/why-methodnotallowed-all-of-a-sudden/143503 "2008-07-19T16:05:33Z")

</div>

I’m using shortcuts for login, logout etc. in routes.rb, for example: map.login ‘login’, :controller =\> ‘session’, :action =\> ‘new’ When I access http://localhost:3000/login I get following exception: Actio…

---

## [How to show the params value in page.alert](https://www.ruby-forum.com/t/how-to-show-the-params-value-in-page-alert/143502)

<div class="topic-metadata">

**Author:** [@lostwarrior](https://www.ruby-forum.com/u/lostwarrior)\
**Replies:** 1\
**Last updated:** [July 19, 2008, 4:01pm UTC](https://www.ruby-forum.com/t/how-to-show-the-params-value-in-page-alert/143502 "2008-07-19T16:01:10Z")

</div>

hi to everyone how to show the params value in page.alert page.alert(‘Your image has been uploaded sucessfully’ +‘params\[:image\]\[:uploaded\_data\].original\_filename’)

---

## [Use script for attachment\_fu](https://www.ruby-forum.com/t/use-script-for-attachment-fu/143472)

<div class="topic-metadata">

**Author:** [@MW\_Administrator](https://www.ruby-forum.com/u/MW_Administrator)\
**Replies:** 2\
**Last updated:** [July 19, 2008, 3:08pm UTC](https://www.ruby-forum.com/t/use-script-for-attachment-fu/143472 "2008-07-19T15:08:15Z")

</div>

Hi - I would like to iterate through a native folder and execute attachment\_fu per each file. Has anyone done this before? Or have any tips or code snippets? Attachment\_fu works well via form - but since I have a si…

---

## [Seeking RoR experts - remote job for lat american developers](https://www.ruby-forum.com/t/seeking-ror-experts-remote-job-for-lat-american-developers/143254)

<div class="topic-metadata">

**Author:** [@decidestaffing](https://www.ruby-forum.com/u/decidestaffing)\
**Replies:** 1\
**Last updated:** [July 19, 2008, 2:13pm UTC](https://www.ruby-forum.com/t/seeking-ror-experts-remote-job-for-lat-american-developers/143254 "2008-07-19T14:13:59Z")

</div>

We are a rapidly growing American company with staff in Latin America. We would like to retain three or more developers immediately to staff several projects. Ideally on these projects we would like to work with full-…

---

## [Acts\_as\_taggable and foreign keys](https://www.ruby-forum.com/t/acts-as-taggable-and-foreign-keys/143000)

<div class="topic-metadata">

**Author:** [@elle](https://www.ruby-forum.com/u/elle)\
**Replies:** 15\
**Last updated:** [July 19, 2008, 1:23pm UTC](https://www.ruby-forum.com/t/acts-as-taggable-and-foreign-keys/143000 "2008-07-19T13:23:06Z")

</div>

Hi, I’ve developed an application last year with rails 1.2.3 and it worked fine on the web server till recently. Not sure what started the problem but I am having trouble with acts\_as\_taggable gem (which I know has b…

---

## [Select ... :index =\> nil is not working](https://www.ruby-forum.com/t/select-index-nil-is-not-working/143488)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 1\
**Last updated:** [July 19, 2008, 1:20pm UTC](https://www.ruby-forum.com/t/select-index-nil-is-not-working/143488 "2008-07-19T13:20:44Z")

</div>

Dear all I have been trying to get this piece of code working http://pastie.org/236978 \<% fields\_for "daleel\[categories\_attributes\]\[\]", category do | category\_form| %\> category: …

---

## [Re-routing / Modules?](https://www.ruby-forum.com/t/re-routing-modules/143499)

<div class="topic-metadata">

**Author:** [@bricker](https://www.ruby-forum.com/u/bricker)\
**Replies:** 0\
**Last updated:** [July 19, 2008, 1:17pm UTC](https://www.ruby-forum.com/t/re-routing-modules/143499 "2008-07-19T13:17:13Z")

</div>

I have domain.com/users pointing to a scaffold to take care of the users. I want domain.com/users to just show a list of users, and domain.com/ cp/users to be the scaffold to manage the users. domain.com/cp/ should a…

---

## [How to set primary key in rails 2.0.2](https://www.ruby-forum.com/t/how-to-set-primary-key-in-rails-2-0-2/143487)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 6\
**Last updated:** [July 19, 2008, 12:51pm UTC](https://www.ruby-forum.com/t/how-to-set-primary-key-in-rails-2-0-2/143487 "2008-07-19T12:51:39Z")

</div>

Dear friends, I’m using rails 2.0.2. I have created a model sample and i have created columns using following codes class CreateSamples \< ActiveRecord::Migration def self.up create\_table :samples, :id =\> false …

---

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

<div class="topic-metadata">

**Author:** [@Erwin](https://www.ruby-forum.com/u/Erwin)\
**Replies:** 0\
**Last updated:** [July 19, 2008, 11:41am UTC](https://www.ruby-forum.com/t/association-trhough-checkboxes/143497 "2008-07-19T11:41:26Z")

</div>

I need some help to make the right solution in rails. I have this model in rails: Customer – has many – Reservations Customer – has many – Animals Reservatiion – has many – Residences – has one – Animal A customer c…

---

## [Accessing Wikipedia's API](https://www.ruby-forum.com/t/accessing-wikipedias-api/78106)

<div class="topic-metadata">

**Author:** [@thechak](https://www.ruby-forum.com/u/thechak)\
**Replies:** 2\
**Last updated:** [July 19, 2008, 10:04am UTC](https://www.ruby-forum.com/t/accessing-wikipedias-api/78106 "2008-07-19T10:04:40Z")

</div>

Hey folks, Has anyone used Wikipedia’s API with Rails? It looks like it is incomplete (http://meta.wikimedia.org/wiki/API) and doesn’t support REST. All I’m looking to do is pull a summary of an article (a paragrap…

---

## [Renaming routes.rb](https://www.ruby-forum.com/t/renaming-routes-rb/143485)

<div class="topic-metadata">

**Author:** [@central\_tex](https://www.ruby-forum.com/u/central_tex)\
**Replies:** 2\
**Last updated:** [July 19, 2008, 6:36am UTC](https://www.ruby-forum.com/t/renaming-routes-rb/143485 "2008-07-19T06:36:39Z")

</div>

When you create a new rails app the default home page says to rename routes.rb. I tried this, but when I run script/console or script/server I get an error saying the routes.rb file can’t be found. If you rename this …

---

## [Book Recommendation for Somewhat Experienced Rails Programmer](https://www.ruby-forum.com/t/book-recommendation-for-somewhat-experienced-rails-programmer/143464)

<div class="topic-metadata">

**Author:** [@bob](https://www.ruby-forum.com/u/bob)\
**Replies:** 7\
**Last updated:** [July 19, 2008, 4:59am UTC](https://www.ruby-forum.com/t/book-recommendation-for-somewhat-experienced-rails-programmer/143464 "2008-07-19T04:59:24Z")

</div>

Hi all, I am in the process of learning rails, and so far I’ve relied on “Agile Web D. with Rails” and “Rails Recipes”. I’ve noticed there are are couple of more advanced rails books on amazon, and many seem to cove…

---

## [\[ANN\] Classy Inheritance 0.6.0](https://www.ruby-forum.com/t/ann-classy-inheritance-0-6-0/143481)

<div class="topic-metadata">

**Author:** [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Replies:** 0\
**Last updated:** [July 19, 2008, 4:38am UTC](https://www.ruby-forum.com/t/ann-classy-inheritance-0-6-0/143481 "2008-07-19T04:38:21Z")

</div>

About: http://stonean.com/wiki/classy-inheritance Classy Inheritance simplifies the definition and implementation of one object depending on another object. For example, a User object depending on a Person object. …

---

## [\[ANN\] Lockdown 0.5.16](https://www.ruby-forum.com/t/ann-lockdown-0-5-16/143480)

<div class="topic-metadata">

**Author:** [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Replies:** 0\
**Last updated:** [July 19, 2008, 4:34am UTC](https://www.ruby-forum.com/t/ann-lockdown-0-5-16/143480 "2008-07-19T04:34:51Z")

</div>

About: http://stonean.com/wiki/lockdown Lockdown is a authentication/authorization system for RubyOnRails (ver 2.x). Lockdown operates on the principal of restrict all access unless access has been defined. Anothe…

---

## [How to use 2.1 gem dependencies](https://www.ruby-forum.com/t/how-to-use-2-1-gem-dependencies/143477)

<div class="topic-metadata">

**Author:** [@andy](https://www.ruby-forum.com/u/andy)\
**Replies:** 0\
**Last updated:** [July 19, 2008, 4:11am UTC](https://www.ruby-forum.com/t/how-to-use-2-1-gem-dependencies/143477 "2008-07-19T04:11:50Z")

</div>

Gem dependencies seems to be caught in a catch-22: if I put a config.gem statement in environment, and then write some code to use that gem in a rake task or in a controller (such as a ‘require’ statment), then rake w…

---

## [Disabled save button when pdf generated](https://www.ruby-forum.com/t/disabled-save-button-when-pdf-generated/143416)

<div class="topic-metadata">

**Author:** [@kundan](https://www.ruby-forum.com/u/kundan)\
**Replies:** 2\
**Last updated:** [July 19, 2008, 3:57am UTC](https://www.ruby-forum.com/t/disabled-save-button-when-pdf-generated/143416 "2008-07-19T03:57:26Z")

</div>

Hi I m new in Ireport, I want to dasabled the save button for generated PDF file and also not allowed to copy past. can any body help me. Thanks and Regards Kundan

---

## [Is there an elegant way to map column names](https://www.ruby-forum.com/t/is-there-an-elegant-way-to-map-column-names/143395)

<div class="topic-metadata">

**Author:** [@Tim\_U](https://www.ruby-forum.com/u/Tim_U)\
**Replies:** 4\
**Last updated:** [July 19, 2008, 3:05am UTC](https://www.ruby-forum.com/t/is-there-an-elegant-way-to-map-column-names/143395 "2008-07-19T03:05:54Z")

</div>

I have been searching high and low but I can’t find an elegant way to map database column names to model names. The idea is simple if I have a column named ‘CUSTOM\_5’ I want this to show up as "favorite\_pet’. So far…

---

## [Plugins](https://www.ruby-forum.com/t/plugins/143388)

<div class="topic-metadata">

**Author:** [@friar](https://www.ruby-forum.com/u/friar)\
**Replies:** 1\
**Last updated:** [July 19, 2008, 1:34am UTC](https://www.ruby-forum.com/t/plugins/143388 "2008-07-19T01:34:08Z")

</div>

Hi: Wondering if anyone can help me. I am having terrible problems installing plugins for my rails app. Tried to install simply\_searchable and all it did was create a folder in the plugins directory. I do not have…

---

## [Count number of downloads and link\_to](https://www.ruby-forum.com/t/count-number-of-downloads-and-link-to/143461)

<div class="topic-metadata">

**Author:** [@joel](https://www.ruby-forum.com/u/joel)\
**Replies:** 5\
**Last updated:** [July 19, 2008, 12:51am UTC](https://www.ruby-forum.com/t/count-number-of-downloads-and-link-to/143461 "2008-07-19T00:51:28Z")

</div>

Hello, I have a download link on my page, whick looks like that : \<%=link\_to “Download”, @photo.public\_filename, :class =\> “thickbox”%\> As you see, I m displyaing an image in a thickbox popup. However I would like to…

---

## [Calling controller without a web request](https://www.ruby-forum.com/t/calling-controller-without-a-web-request/143470)

<div class="topic-metadata">

**Author:** [@sp00nyg](https://www.ruby-forum.com/u/sp00nyg)\
**Replies:** 0\
**Last updated:** [July 18, 2008, 11:41pm UTC](https://www.ruby-forum.com/t/calling-controller-without-a-web-request/143470 "2008-07-18T23:41:34Z")

</div>

I’m building a RoR service using Facebook’s Thrift. Ideally, I would like one of my service methods to be able to call a controller method that does a render\_to\_string so I can return an HTML snippet from my service.…

---

## [Posting XML to remote Web Service](https://www.ruby-forum.com/t/posting-xml-to-remote-web-service/143463)

<div class="topic-metadata">

**Author:** [@CTOguy](https://www.ruby-forum.com/u/CTOguy)\
**Replies:** 1\
**Last updated:** [July 18, 2008, 11:38pm UTC](https://www.ruby-forum.com/t/posting-xml-to-remote-web-service/143463 "2008-07-18T23:38:04Z")

</div>

I have succeeded in building an XML document using Builder template which I would like to post to a remote service for credit card processing by doing an xml render with a controller. What’s the best way to grab this…

---

## [Testing for a controller that does not exist](https://www.ruby-forum.com/t/testing-for-a-controller-that-does-not-exist/143469)

<div class="topic-metadata">

**Author:** [@dorelal](https://www.ruby-forum.com/u/dorelal)\
**Replies:** 0\
**Last updated:** [July 18, 2008, 11:10pm UTC](https://www.ruby-forum.com/t/testing-for-a-controller-that-does-not-exist/143469 "2008-07-18T23:10:44Z")

</div>

class StateControllerTest \< ActionController::TestCase get :index end get :index works. However because of recent change in the controller name I want /mystate/index to go to the same place. I put in a FourOhFour ca…

---

## [Erro: \[Rails requires RubyGems \>= 0.9.\]](https://www.ruby-forum.com/t/erro-rails-requires-rubygems-0-9/142861)

<div class="topic-metadata">

**Author:** [@87796](https://www.ruby-forum.com/u/87796)\
**Replies:** 2\
**Last updated:** [July 18, 2008, 11:04pm UTC](https://www.ruby-forum.com/t/erro-rails-requires-rubygems-0-9/142861 "2008-07-18T23:04:43Z")

</div>

Hello everyone, System is Ubuntu 8.04 i386 I hava install ruby,rails,etc. $ ruby -v ruby 1.8.7 (2008-05-31 patchlevel 0) \[i686-linux\] $ rails -v Rails 2.1.0 $ gem -v 1.1.1 #below is in an app directory, after su…

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

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