# Rails

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

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

---

## [Eager loading associations fix belongs\_to doesn't work](https://www.ruby-forum.com/t/eager-loading-associations-fix-belongs-to-doesnt-work/92040)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 4\
**Last updated:** [April 17, 2007, 10:46pm UTC](https://www.ruby-forum.com/t/eager-loading-associations-fix-belongs-to-doesnt-work/92040 "2007-04-17T22:46:02Z")

</div>

Hi, I tried using the eager\_custom\_sql.rb fix to be able to eager load associations using find\_by\_sql. I was able to get this working for my has\_many associations, however, Im having trouble getting it to work for be…

---

## [Evaluating variables in Rails views -- help!](https://www.ruby-forum.com/t/evaluating-variables-in-rails-views-help/92281)

<div class="topic-metadata">

**Author:** [@mroutley](https://www.ruby-forum.com/u/mroutley)\
**Replies:** 6\
**Last updated:** [April 17, 2007, 10:11pm UTC](https://www.ruby-forum.com/t/evaluating-variables-in-rails-views-help/92281 "2007-04-17T22:11:52Z")

</div>

I’m building my first Rails application, and things are going OK for the most part except for stupid little stuff like this that I simply can’t figure out (it’s always the little things, isn’t it?). \<% for p in @pages …

---

## [Rake aborted - syntax error, unexpected $end, expecting kEND](https://www.ruby-forum.com/t/rake-aborted-syntax-error-unexpected-end-expecting-kend/92213)

<div class="topic-metadata">

**Author:** [@dacbo](https://www.ruby-forum.com/u/dacbo)\
**Replies:** 2\
**Last updated:** [April 17, 2007, 10:11pm UTC](https://www.ruby-forum.com/t/rake-aborted-syntax-error-unexpected-end-expecting-kend/92213 "2007-04-17T22:11:37Z")

</div>

I can’t create tables via rake db:migrate without encountering this error: rake aborted! ./db/migrate//001\_create\_users\_table.rb:11: syntax error, unexpected $end, expecting kEND The 001\_create\_users\_table.rb file c…

---

## [How to determine if you are in a partial?](https://www.ruby-forum.com/t/how-to-determine-if-you-are-in-a-partial/92284)

<div class="topic-metadata">

**Author:** [@benjohnson](https://www.ruby-forum.com/u/benjohnson)\
**Replies:** 1\
**Last updated:** [April 17, 2007, 10:04pm UTC](https://www.ruby-forum.com/t/how-to-determine-if-you-are-in-a-partial/92284 "2007-04-17T22:04:01Z")

</div>

How do I determine if a helper is being called in a partial? I need to do this to modify core helpers to act differently in partials. Thanks!

---

## [Grouping controllers in directories](https://www.ruby-forum.com/t/grouping-controllers-in-directories/92290)

<div class="topic-metadata">

**Author:** [@luca](https://www.ruby-forum.com/u/luca)\
**Replies:** 0\
**Last updated:** [April 17, 2007, 9:30pm UTC](https://www.ruby-forum.com/t/grouping-controllers-in-directories/92290 "2007-04-17T21:30:51Z")

</div>

Hi All I’m working on a RoR project and noticed that the number of controllers in app/controllers is rapidly increasing. Then I was wondering if it would be possible to create sub-directories in there and plit all th…

---

## [A plugin that responds to an action](https://www.ruby-forum.com/t/a-plugin-that-responds-to-an-action/92283)

<div class="topic-metadata">

**Author:** [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Replies:** 1\
**Last updated:** [April 17, 2007, 9:13pm UTC](https://www.ruby-forum.com/t/a-plugin-that-responds-to-an-action/92283 "2007-04-17T21:13:03Z")

</div>

yo. creating first plugin. Is it not possible to create a plugin that defines controller actions? module Foo def on\_callback render\_text 'foo', :layout =\> false end end ActionController::Base.send(:in…

---

## [Rflickr: invalid auth token when uploading](https://www.ruby-forum.com/t/rflickr-invalid-auth-token-when-uploading/92289)

<div class="topic-metadata">

**Author:** [@stuart\_updegrave](https://www.ruby-forum.com/u/stuart_updegrave)\
**Replies:** 0\
**Last updated:** [April 17, 2007, 8:44pm UTC](https://www.ruby-forum.com/t/rflickr-invalid-auth-token-when-uploading/92289 "2007-04-17T20:44:12Z")

</div>

\-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, I’m working on an application which uses rflickr to upload images to flickr. I’ve generated and cached an auth token as described in the GETTING STARTED document in t…

---

## [Development --\> Production](https://www.ruby-forum.com/t/development-production/92268)

<div class="topic-metadata">

**Author:** [@Andrew\_Mansfield](https://www.ruby-forum.com/u/Andrew_Mansfield)\
**Replies:** 2\
**Last updated:** [April 17, 2007, 7:42pm UTC](https://www.ruby-forum.com/t/development-production/92268 "2007-04-17T19:42:03Z")

</div>

I new to Rails and I want to understand the procedure to move from development to production: this has got to be a simple procedure, but I haven’t found it documented anywhere that I understand it. (I have both editio…

---

## [Pdf-file tot desktop with pdf/writer problem](https://www.ruby-forum.com/t/pdf-file-tot-desktop-with-pdf-writer-problem/92172)

<div class="topic-metadata">

**Author:** [@rudy](https://www.ruby-forum.com/u/rudy)\
**Replies:** 7\
**Last updated:** [April 17, 2007, 7:11pm UTC](https://www.ruby-forum.com/t/pdf-file-tot-desktop-with-pdf-writer-problem/92172 "2007-04-17T19:11:58Z")

</div>

Hi, I’m using pdf/Writer to generate a pdf-file, but whatever I do, it gets saved in folder of my app, and not on the users desktop. I’ve used pdf = PDF::Writer.new pdf.select\_font “Times-Roman” pdf.text “Hello.pdf…

---

## [Instantly Turn your Computer into a Super TV](https://www.ruby-forum.com/t/instantly-turn-your-computer-into-a-super-tv/92272)

<div class="topic-metadata">

**Author:** [@dev456](https://www.ruby-forum.com/u/dev456)\
**Replies:** 0\
**Last updated:** [April 17, 2007, 6:56pm UTC](https://www.ruby-forum.com/t/instantly-turn-your-computer-into-a-super-tv/92272 "2007-04-17T18:56:56Z")

</div>

Instantly Turn your Computer into a Super TV - http://cbnk.biz/HLSTV286251KJGHEDC

---

## [RMagick woes](https://www.ruby-forum.com/t/rmagick-woes/91835)

<div class="topic-metadata">

**Author:** [@mr\_robot](https://www.ruby-forum.com/u/mr_robot)\
**Replies:** 2\
**Last updated:** [April 17, 2007, 6:37pm UTC](https://www.ruby-forum.com/t/rmagick-woes/91835 "2007-04-17T18:37:53Z")

</div>

i’m having major problems with rmagic, when cropping. on my local machine it works fine. on dreamhost it kills my app. the specific error is: can’t convert Magick::GravityType into Integer a lot of googling reveals t…

---

## [Deployment to (mt) GridServer 99%...help me with the 1%](https://www.ruby-forum.com/t/deployment-to-mt-gridserver-99-help-me-with-the-1/92270)

<div class="topic-metadata">

**Author:** [@jcontonio](https://www.ruby-forum.com/u/jcontonio)\
**Replies:** 0\
**Last updated:** [April 17, 2007, 6:37pm UTC](https://www.ruby-forum.com/t/deployment-to-mt-gridserver-99-help-me-with-the-1/92270 "2007-04-17T18:37:52Z")

</div>

So my app is working great it seems. The deployment works great, all the data is migrated over from my old host, etc. One thing, when I hit the homepage, I get a 500 error and I believe it has to do with RedCloth. Any…

---

## [Rails adding dashes to text field in db](https://www.ruby-forum.com/t/rails-adding-dashes-to-text-field-in-db/92247)

<div class="topic-metadata">

**Author:** [@jason](https://www.ruby-forum.com/u/jason)\
**Replies:** 7\
**Last updated:** [April 17, 2007, 6:20pm UTC](https://www.ruby-forum.com/t/rails-adding-dashes-to-text-field-in-db/92247 "2007-04-17T18:20:01Z")

</div>

I have a model called notes. Here’s the definition in my schema.rb create\_table “notes”, :force =\> true do |t| t.column “sales\_order\_id”, :integer t.column “content”, :text t.column “timestamp”, :datetim…

---

## [Hi, when do you start worrying about scaling and caching?](https://www.ruby-forum.com/t/hi-when-do-you-start-worrying-about-scaling-and-caching/92130)

<div class="topic-metadata">

**Author:** [@mixplate](https://www.ruby-forum.com/u/mixplate)\
**Replies:** 2\
**Last updated:** [April 17, 2007, 5:51pm UTC](https://www.ruby-forum.com/t/hi-when-do-you-start-worrying-about-scaling-and-caching/92130 "2007-04-17T17:51:47Z")

</div>

i will be launching my first rails project soon after i complete testing, and now being the paronoid programmer i am, i started thinking about the scaling and caching. when should these defense tactics be implemented?…

---

## [Javascript back, lose data from search result? IE browser?](https://www.ruby-forum.com/t/javascript-back-lose-data-from-search-result-ie-browser/92263)

<div class="topic-metadata">

**Author:** [@mixplate](https://www.ruby-forum.com/u/mixplate)\
**Replies:** 0\
**Last updated:** [April 17, 2007, 5:44pm UTC](https://www.ruby-forum.com/t/javascript-back-lose-data-from-search-result-ie-browser/92263 "2007-04-17T17:44:04Z")

</div>

hi. i am using acts\_as\_ferret for my application. when i search for something, and then click on the result, i have a back button(javascript:history.back) that should take the user back the listing page. however, i ge…

---

## [Deploying RoR - Advice seeked!](https://www.ruby-forum.com/t/deploying-ror-advice-seeked/90616)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 8\
**Last updated:** [April 17, 2007, 5:29pm UTC](https://www.ruby-forum.com/t/deploying-ror-advice-seeked/90616 "2007-04-17T17:29:41Z")

</div>

Hi everyone! I am developping a Ruby on Rails website with a heavy calculation component at the backend. The calculation module can take up to 30sec to produce a result and therefore the queries can be extremely slow …

---

## [Handling currencies](https://www.ruby-forum.com/t/handling-currencies/92260)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 1\
**Last updated:** [April 17, 2007, 5:12pm UTC](https://www.ruby-forum.com/t/handling-currencies/92260 "2007-04-17T17:12:39Z")

</div>

Hi How should I handle storing money in different currencies in my database. I’m using the money gem (although I can change that if anyone thinks of a better way), but when items are based in different countries, I’…

---

## [Problem: insert data in two tables from an input form](https://www.ruby-forum.com/t/problem-insert-data-in-two-tables-from-an-input-form/92236)

<div class="topic-metadata">

**Author:** [@tuhin\_cse99](https://www.ruby-forum.com/u/tuhin_cse99)\
**Replies:** 1\
**Last updated:** [April 17, 2007, 4:41pm UTC](https://www.ruby-forum.com/t/problem-insert-data-in-two-tables-from-an-input-form/92236 "2007-04-17T16:41:03Z")

</div>

Hi guys, I have two tables. Table1: output\_columns (3 columns) Table2: file\_datas (2 columns) In any table I can search, show, edit data. But how can I insert data in two table? In my input form there are 5 i…

---

## [Model inheritence and relational databases](https://www.ruby-forum.com/t/model-inheritence-and-relational-databases/90858)

<div class="topic-metadata">

**Author:** [@kris](https://www.ruby-forum.com/u/kris)\
**Replies:** 3\
**Last updated:** [April 17, 2007, 4:37pm UTC](https://www.ruby-forum.com/t/model-inheritence-and-relational-databases/90858 "2007-04-17T16:37:34Z")

</div>

Okay the problem I am trying to get to grips with is how inheritence and data storage in a relational database can work… I can easily have a model inherit from other models and if the difference between the two models…

---

## [Script/runner: what the...!?](https://www.ruby-forum.com/t/script-runner-what-the/82027)

<div class="topic-metadata">

**Author:** [@Mark\_Larimer](https://www.ruby-forum.com/u/Mark_Larimer)\
**Replies:** 4\
**Last updated:** [April 17, 2007, 3:45pm UTC](https://www.ruby-forum.com/t/script-runner-what-the/82027 "2007-04-17T15:45:25Z")

</div>

What’s wrong here? script/runner looks okay, but doesn’t run as advertised. Check it out: ./script/runner --help Usage: ./script/runner \[options\] (‘Some.ruby(code)’ or a filename) -e, --environment=name Spe…

---

## [:dependent =\> :delete\_all not working](https://www.ruby-forum.com/t/dependent-delete-all-not-working/92166)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 10\
**Last updated:** [April 17, 2007, 3:41pm UTC](https://www.ruby-forum.com/t/dependent-delete-all-not-working/92166 "2007-04-17T15:41:25Z")

</div>

All, Rails 1.1.6 Win XP MS SQL Server (ODBC mode) I have the following class: class Document \< ActiveRecord::Base has\_many :images, :dependent =\> :delete\_all has\_many :stylesheets, :dependent =\> :delete\_all In on…

---

## [Multiple domain name, One Rails application, is this possibl](https://www.ruby-forum.com/t/multiple-domain-name-one-rails-application-is-this-possibl/57951)

<div class="topic-metadata">

**Author:** [@Human\_D](https://www.ruby-forum.com/u/Human_D)\
**Replies:** 11\
**Last updated:** [April 17, 2007, 3:32pm UTC](https://www.ruby-forum.com/t/multiple-domain-name-one-rails-application-is-this-possibl/57951 "2007-04-17T15:32:24Z")

</div>

Hello folks, I’m new to the Rails framework and don’t know where to look to find my answer. Here is the question, Is there a way to set multiple domain name for a rails application, and base on the URL do the work in…

---

## [Validating uniquesness through double association?](https://www.ruby-forum.com/t/validating-uniquesness-through-double-association/92252)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [April 17, 2007, 2:40pm UTC](https://www.ruby-forum.com/t/validating-uniquesness-through-double-association/92252 "2007-04-17T14:40:10Z")

</div>

Hello all! Could someone give me idea how to solve following problem. In the model: class A \< ActiveRecord::Base has\_many :B end class B \< ActiveRecord::Base belongs\_to :A has\_and\_belongs\_to\_many :C end class C…

---

## [Ruby-ODBC compiled for Windows... Anything newer than 0.997?](https://www.ruby-forum.com/t/ruby-odbc-compiled-for-windows-anything-newer-than-0-997/91778)

<div class="topic-metadata">

**Author:** [@danielb](https://www.ruby-forum.com/u/danielb)\
**Replies:** 5\
**Last updated:** [April 17, 2007, 2:20pm UTC](https://www.ruby-forum.com/t/ruby-odbc-compiled-for-windows-anything-newer-than-0-997/91778 "2007-04-17T14:20:08Z")

</div>

Hey :slight\_smile: We’re doing this large project, based on a legacy MSSQL database. We’ve had some issues, particularly with datetimes, when communicating with the server. These issues dissapeared after updating our …

---

## [Helper help - inserting delimiters](https://www.ruby-forum.com/t/helper-help-inserting-delimiters/92248)

<div class="topic-metadata">

**Author:** [@GuSSSSni\_Hilmarsson](https://www.ruby-forum.com/u/GuSSSSni_Hilmarsson)\
**Replies:** 0\
**Last updated:** [April 17, 2007, 2:19pm UTC](https://www.ruby-forum.com/t/helper-help-inserting-delimiters/92248 "2007-04-17T14:19:08Z")

</div>

My ruby skills are a bit underdeveloped, but I managed to whip up a Helper that inserts a delimiter at a fixed position in a number. Any wizards out there that can give tips on how to scale this to accepting calls for…

---

## [SQL queries in another DB](https://www.ruby-forum.com/t/sql-queries-in-another-db/92240)

<div class="topic-metadata">

**Author:** [@Radu\_S](https://www.ruby-forum.com/u/Radu_S)\
**Replies:** 1\
**Last updated:** [April 17, 2007, 2:13pm UTC](https://www.ruby-forum.com/t/sql-queries-in-another-db/92240 "2007-04-17T14:13:05Z")

</div>

Hi, I need to insert SQL data in another database used by a PHP program from rails. Any ideas how I can do this? Radu

---

## [Bringing Ruby on Rails to the Enterprise- How?](https://www.ruby-forum.com/t/bringing-ruby-on-rails-to-the-enterprise-how/91942)

<div class="topic-metadata">

**Author:** [@jayturley](https://www.ruby-forum.com/u/jayturley)\
**Replies:** 5\
**Last updated:** [April 17, 2007, 1:51pm UTC](https://www.ruby-forum.com/t/bringing-ruby-on-rails-to-the-enterprise-how/91942 "2007-04-17T13:51:01Z")

</div>

Hi! At my company in the Phoenix, USA area, we are preparing to work on a new version of our large proprietary in-house ASP classic web application. Since we are going to essentially be rebuilding it from the ground …

---

## [Ruby script/server -- Errno::EADDRINUSE](https://www.ruby-forum.com/t/ruby-script-server-errno-eaddrinuse/92242)

<div class="topic-metadata">

**Author:** [@thameem](https://www.ruby-forum.com/u/thameem)\
**Replies:** 0\
**Last updated:** [April 17, 2007, 12:34pm UTC](https://www.ruby-forum.com/t/ruby-script-server-errno-eaddrinuse/92242 "2007-04-17T12:34:41Z")

</div>

i am trying to start the server i am getting the following error… =\> Booting WEBrick… =\> Rails application started on http://0.0.0.0:3000 =\> Ctrl-C to shutdown server; call with --help for options \[2007-04-17 16:02:2…

---

## [Pass data to action without submitting form](https://www.ruby-forum.com/t/pass-data-to-action-without-submitting-form/92241)

<div class="topic-metadata">

**Author:** [@stanly](https://www.ruby-forum.com/u/stanly)\
**Replies:** 1\
**Last updated:** [April 17, 2007, 12:27pm UTC](https://www.ruby-forum.com/t/pass-data-to-action-without-submitting-form/92241 "2007-04-17T12:27:52Z")

</div>

Hello guys, I am new to ruby on rails. I have a small question, it would be nice if somebody answers. How do i pass some form elements data to a certain action in my controller without submitting a form. Regards sta…

---

## [Do liquid templates play well with RJS?](https://www.ruby-forum.com/t/do-liquid-templates-play-well-with-rjs/92237)

<div class="topic-metadata">

**Author:** [@guest](https://www.ruby-forum.com/u/guest)\
**Replies:** 0\
**Last updated:** [April 17, 2007, 11:31am UTC](https://www.ruby-forum.com/t/do-liquid-templates-play-well-with-rjs/92237 "2007-04-17T11:31:53Z")

</div>

Im looking to use liquid template for security reasons, our coding & designer teams work in semi-isolation. We are looking to use some RJS goodness but I’m not sure if you are faced with the same problem as with Rhtml…

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

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