# Rails

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

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

---

## [RSpec for dummies screencast?](https://www.ruby-forum.com/t/rspec-for-dummies-screencast/113846)

<div class="topic-metadata">

**Author:** [@Christian\_WattengSS](https://www.ruby-forum.com/u/Christian_WattengSS)\
**Replies:** 5\
**Last updated:** [September 7, 2007, 10:04am UTC](https://www.ruby-forum.com/t/rspec-for-dummies-screencast/113846 "2007-09-07T10:04:12Z")

</div>

Does anyone know of any RSpec screencasts for dummies, like me :slight\_smile: I have a Java background, but I have never written a java test in my life. I’ve never learned about TDD or BDD so I’m totally blank on ever…

---

## [How do i check if an object has a particular field?](https://www.ruby-forum.com/t/how-do-i-check-if-an-object-has-a-particular-field/113960)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 12\
**Last updated:** [September 7, 2007, 9:55am UTC](https://www.ruby-forum.com/t/how-do-i-check-if-an-object-has-a-particular-field/113960 "2007-09-07T09:55:20Z")

</div>

an easy but hard-to-google question - how can i check whether an object has a field called “complete”?

---

## [Acts\_as\_translatable](https://www.ruby-forum.com/t/acts-as-translatable/114045)

<div class="topic-metadata">

**Author:** [@matlin](https://www.ruby-forum.com/u/matlin)\
**Replies:** 0\
**Last updated:** [September 7, 2007, 9:45am UTC](https://www.ruby-forum.com/t/acts-as-translatable/114045 "2007-09-07T09:45:10Z")

</div>

I’m hoping someone can help me with this. The default behavior for acts\_as\_translatable is to return the original field if it can’t find a translation, but in this case I want it to return a NULL value for untranslate…

---

## [How to make string column with null default?](https://www.ruby-forum.com/t/how-to-make-string-column-with-null-default/114043)

<div class="topic-metadata">

**Author:** [@Steven](https://www.ruby-forum.com/u/Steven)\
**Replies:** 0\
**Last updated:** [September 7, 2007, 9:39am UTC](https://www.ruby-forum.com/t/how-to-make-string-column-with-null-default/114043 "2007-09-07T09:39:09Z")

</div>

Hi, I’m trying to use migrations to create a table with a string column that has a default value of null. Instead of a default of null, though, it’s using the four-character string “NULL”. I found some similar bug re…

---

## [Don't know how to build task 'db:migrate:engines'](https://www.ruby-forum.com/t/dont-know-how-to-build-task-dbengines/114038)

<div class="topic-metadata">

**Author:** [@Randy\_Francisco](https://www.ruby-forum.com/u/Randy_Francisco)\
**Replies:** 1\
**Last updated:** [September 7, 2007, 9:24am UTC](https://www.ruby-forum.com/t/dont-know-how-to-build-task-dbengines/114038 "2007-09-07T09:24:08Z")

</div>

Hi Peeps I tried running this command "rake engine\_migrateÂ” and it gives me this error (rake aborted! Don’t know how to build task ‘db:migrate:engines’ ). Base on what I have read in this mailing list it has somethin…

---

## [Act\_as\_authenticated: remove login and use email](https://www.ruby-forum.com/t/act-as-authenticated-remove-login-and-use-email/113996)

<div class="topic-metadata">

**Author:** [@leonb](https://www.ruby-forum.com/u/leonb)\
**Replies:** 2\
**Last updated:** [September 7, 2007, 9:09am UTC](https://www.ruby-forum.com/t/act-as-authenticated-remove-login-and-use-email/113996 "2007-09-07T09:09:13Z")

</div>

Hi all, Does anyone if it’s simple to remove the login/username from act\_as\_authenticated and use someone’s email address for it? I usually find that easier to remember than an username. I installed act\_as\_authentica…

---

## [RJS visual effect](https://www.ruby-forum.com/t/rjs-visual-effect/114032)

<div class="topic-metadata">

**Author:** [@advait](https://www.ruby-forum.com/u/advait)\
**Replies:** 2\
**Last updated:** [September 7, 2007, 7:58am UTC](https://www.ruby-forum.com/t/rjs-visual-effect/114032 "2007-09-07T07:58:59Z")

</div>

Hello, How do i create a highlighting visual effect using rjs. Actually I have to highlight the list which I am displaying by clicking an image. show.rhtml … \<%= link\_to\_remote(image\_tag("/images/pictures/" “.jpeg”…

---

## [Rails + require returns \[\]?](https://www.ruby-forum.com/t/rails-require-returns/114020)

<div class="topic-metadata">

**Author:** [@derailed](https://www.ruby-forum.com/u/derailed)\
**Replies:** 1\
**Last updated:** [September 7, 2007, 7:42am UTC](https://www.ruby-forum.com/t/rails-require-returns/114020 "2007-09-07T07:42:44Z")

</div>

All, I have a rails controller that is requiring a ruby file ie res = require ‘blee’ p res.inspect # \<= \[\] ?? class FredController \< ApplicationController … end Printing the return value of the require, I was ex…

---

## [Splitting @xyz from email id: username@xyz.com](https://www.ruby-forum.com/t/splitting-xyz-from-email-id-username-xyz-com/113886)

<div class="topic-metadata">

**Author:** [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Replies:** 4\
**Last updated:** [September 7, 2007, 7:39am UTC](https://www.ruby-forum.com/t/splitting-xyz-from-email-id-username-xyz-com/113886 "2007-09-07T07:39:46Z")

</div>

Hi, Can someone please explain how to strip username from removed\_email\_address@domain.invalid? Regards, Sandeep G

---

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

<div class="topic-metadata">

**Author:** [@jon](https://www.ruby-forum.com/u/jon)\
**Replies:** 1\
**Last updated:** [September 7, 2007, 7:38am UTC](https://www.ruby-forum.com/t/has-many-through-distant-associations/114012 "2007-09-07T07:38:42Z")

</div>

I have the following associations: disks-\>disks\_user\_files\<-user\_files my models look like: class Disk \< ActiveRecord::Base has\_many :disk\_user\_files has\_many :user\_files, through=\>:disk\_user\_files end class DiskU…

---

## [Problem in installing RMagick](https://www.ruby-forum.com/t/problem-in-installing-rmagick/113467)

<div class="topic-metadata">

**Author:** [@vijayendra](https://www.ruby-forum.com/u/vijayendra)\
**Replies:** 3\
**Last updated:** [September 7, 2007, 7:28am UTC](https://www.ruby-forum.com/t/problem-in-installing-rmagick/113467 "2007-09-07T07:28:57Z")

</div>

Hi friends I am trying to install RMagick its giving error like this : C:\\download\\RMagick-1.14.1\_IM-6.3.0-7-Q8\>gem install rmagick-1.14.1-win32.gem --local ERROR: Error installing gem rmagick-1.14.1-win32.gem\[.g…

---

## [Install Rails](https://www.ruby-forum.com/t/install-rails/71979)

<div class="topic-metadata">

**Author:** [@monkeyvu](https://www.ruby-forum.com/u/monkeyvu)\
**Replies:** 9\
**Last updated:** [September 7, 2007, 5:28am UTC](https://www.ruby-forum.com/t/install-rails/71979 "2007-09-07T05:28:49Z")

</div>

My computer doesn’t have network . So when I installed Rails , I had the following error : C:\\ruby\\bin\>“c:\\ruby\\bin\\ruby.exe” “c:\\ruby\\bin\\gem” install rails –include-dep endencies Attempting local installation of ‘ra…

---

## [De-serializing attribute gives YAML::Objects?](https://www.ruby-forum.com/t/de-serializing-attribute-gives-yaml-objects/114017)

<div class="topic-metadata">

**Author:** [@Henry\_Li](https://www.ruby-forum.com/u/Henry_Li)\
**Replies:** 0\
**Last updated:** [September 7, 2007, 5:12am UTC](https://www.ruby-forum.com/t/de-serializing-attribute-gives-yaml-objects/114017 "2007-09-07T05:12:47Z")

</div>

I wonder rails 1.2.3 cannot deserialize attribute (objects) correctly but give YAML::Object. Are there any workarounds or tricks to solve the problem?

---

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

<div class="topic-metadata">

**Author:** [@jon](https://www.ruby-forum.com/u/jon)\
**Replies:** 0\
**Last updated:** [September 7, 2007, 4:29am UTC](https://www.ruby-forum.com/t/has-many-through-distant-relationships/114016 "2007-09-07T04:29:46Z")

</div>

I have the following associations: disks-\>disks\_user\_files\<-user\_files my models look like: class Disk \< ActiveRecord::Base has\_many :disk\_user\_files has\_many :user\_files, through =\> :disk\_user\_files end class Dis…

---

## [Date Range in URL](https://www.ruby-forum.com/t/date-range-in-url/114015)

<div class="topic-metadata">

**Author:** [@bitsmith](https://www.ruby-forum.com/u/bitsmith)\
**Replies:** 0\
**Last updated:** [September 7, 2007, 4:24am UTC](https://www.ruby-forum.com/t/date-range-in-url/114015 "2007-09-07T04:24:45Z")

</div>

Hi, I want to have a date range in my URL, such as /charges/ from/:from\_year/:from\_month/:from\_day/to/:to\_year/:to\_month/:to\_day I want to have two date selection controls on a form, and when the form is submitted, I…

---

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

<div class="topic-metadata">

**Author:** [@jon](https://www.ruby-forum.com/u/jon)\
**Replies:** 0\
**Last updated:** [September 7, 2007, 4:16am UTC](https://www.ruby-forum.com/t/has-many-through-distant-associations/196460 "2007-09-07T04:16:45Z")

</div>

I have the following associations: disks-\>disks\_user\_files\<-user\_files my models look like: class Disk \< ActiveRecord::Base has\_many :disk\_user\_files has\_many :user\_files, through=\>:disk\_user\_files end class DiskU…

---

## [HABTM Loops](https://www.ruby-forum.com/t/habtm-loops/113976)

<div class="topic-metadata">

**Author:** [@ebrad](https://www.ruby-forum.com/u/ebrad)\
**Replies:** 2\
**Last updated:** [September 7, 2007, 4:03am UTC](https://www.ruby-forum.com/t/habtm-loops/113976 "2007-09-07T04:03:44Z")

</div>

So, I have a “schedules” table and a “hours” table, joined by a “hours\_schedules” table. Think of the hours table as a category for when people will schedule themselves to work, which happens in weekly increments. At…

---

## [Matrix expected, got Fixnum && acts\_as\_tree?](https://www.ruby-forum.com/t/matrix-expected-got-fixnum-acts-as-tree/114013)

<div class="topic-metadata">

**Author:** [@eagoweb](https://www.ruby-forum.com/u/eagoweb)\
**Replies:** 0\
**Last updated:** [September 7, 2007, 3:30am UTC](https://www.ruby-forum.com/t/matrix-expected-got-fixnum-acts-as-tree/114013 "2007-09-07T03:30:02Z")

</div>

Hello i got this: class Matrix \< ActiveRecord::Base set\_table\_name :matrix belongs\_to :member, :foreign\_key=\>:userid acts\_as\_tree :foreign\_key=\>:parent end class Member \< ActiveRecord::Base set\_primary\_key :userid …

---

## [Can someone help me with 'render partial' from a link?](https://www.ruby-forum.com/t/can-someone-help-me-with-render-partial-from-a-link/114010)

<div class="topic-metadata">

**Author:** [@combas](https://www.ruby-forum.com/u/combas)\
**Replies:** 0\
**Last updated:** [September 7, 2007, 3:00am UTC](https://www.ruby-forum.com/t/can-someone-help-me-with-render-partial-from-a-link/114010 "2007-09-07T03:00:20Z")

</div>

What I am trying to achieve is to create a sidebar exactly like the one on the left of this forum, but instead of showing all the links, there would be a ‘+’ sign next to each heading where you can click to see the li…

---

## [Attachment\_fu and bmp files not working](https://www.ruby-forum.com/t/attachment-fu-and-bmp-files-not-working/113792)

<div class="topic-metadata">

**Author:** [@scott](https://www.ruby-forum.com/u/scott)\
**Replies:** 3\
**Last updated:** [September 7, 2007, 2:53am UTC](https://www.ruby-forum.com/t/attachment-fu-and-bmp-files-not-working/113792 "2007-09-07T02:53:40Z")

</div>

I have been using attachment\_fu for a while now with jpg, gif, png without any trouble. I recently tried to upload a bmp and got: “Content type is not included in the list” So, I added the following to the @@content\_t…

---

## [My controller became fat trying to handle multiple models-?](https://www.ruby-forum.com/t/my-controller-became-fat-trying-to-handle-multiple-models/114007)

<div class="topic-metadata">

**Author:** [@cpher](https://www.ruby-forum.com/u/cpher)\
**Replies:** 0\
**Last updated:** [September 7, 2007, 1:45am UTC](https://www.ruby-forum.com/t/my-controller-became-fat-trying-to-handle-multiple-models/114007 "2007-09-07T01:45:21Z")

</div>

Hello all. I am experiencing something that has to be fairly common in the rails world, but I haven’t found a clean solution yet. I have a SignupController that handles multiple models in a single form. Those models …

---

## [Loading pre-existing data with form\_remote\_tag](https://www.ruby-forum.com/t/loading-pre-existing-data-with-form-remote-tag/114005)

<div class="topic-metadata">

**Author:** [@dracos](https://www.ruby-forum.com/u/dracos)\
**Replies:** 0\
**Last updated:** [September 7, 2007, 1:36am UTC](https://www.ruby-forum.com/t/loading-pre-existing-data-with-form-remote-tag/114005 "2007-09-07T01:36:52Z")

</div>

Is it possible to load pre-existing data into a form with form\_remote\_tag? I am trying to load the data for a Person object into the partial ‘name\_form’ through a link in another partial ‘name\_list’. However, the ‘nam…

---

## [Memcached and fragment storage, session storage with a mongr](https://www.ruby-forum.com/t/memcached-and-fragment-storage-session-storage-with-a-mongr/113999)

<div class="topic-metadata">

**Author:** [@cleaner416](https://www.ruby-forum.com/u/cleaner416)\
**Replies:** 1\
**Last updated:** [September 7, 2007, 12:56am UTC](https://www.ruby-forum.com/t/memcached-and-fragment-storage-session-storage-with-a-mongr/113999 "2007-09-07T00:56:32Z")

</div>

Greetings, I’ve been using file-based fragment caching and DB-based session caching quite extensively. I decided to try out memcached for both to see if I could achieve a performance gain. I searched around a bit an…

---

## [HABTM association with own class?](https://www.ruby-forum.com/t/habtm-association-with-own-class/113965)

<div class="topic-metadata">

**Author:** [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Replies:** 4\
**Last updated:** [September 7, 2007, 12:43am UTC](https://www.ruby-forum.com/t/habtm-association-with-own-class/113965 "2007-09-07T00:43:39Z")

</div>

If I have a class, Asset, which has and belongs to many associated Asset objects, how do I do this? has\_and\_belongs\_to\_many :associated\_assets, :class =\> “Asset”, :foreign\_key =\> ???, :association\_foreign\_key =\> ??? R…

---

## [(OT) Javascript onclick handler and browser context menus](https://www.ruby-forum.com/t/ot-javascript-onclick-handler-and-browser-context-menus/113994)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 1\
**Last updated:** [September 7, 2007, 12:32am UTC](https://www.ruby-forum.com/t/ot-javascript-onclick-handler-and-browser-context-menus/113994 "2007-09-07T00:32:57Z")

</div>

All, I am noticing that any of my tags which have “onclick” event handlers attached to them (via the inline HTML attributes usually) will not show the browser’s default context menu when they are right-clicked on, i…

---

## [How to select rows between two dates?](https://www.ruby-forum.com/t/how-to-select-rows-between-two-dates/113950)

<div class="topic-metadata">

**Author:** [@Kim\_G](https://www.ruby-forum.com/u/Kim_G)\
**Replies:** 3\
**Last updated:** [September 7, 2007, 12:15am UTC](https://www.ruby-forum.com/t/how-to-select-rows-between-two-dates/113950 "2007-09-07T00:15:30Z")

</div>

Hi. I have a table with two fields, from\_date and to\_date. Now I want to do something like this: SELECT \* FROM table WHERE from\_date \< TODAY AND to\_date \> today; I’m new to Ruby on Rails, so any help is much apprecia…

---

## [\[ANN\] form\_test\_helper 1.0.0 released, and updates for trunk](https://www.ruby-forum.com/t/ann-form-test-helper-1-0-0-released-and-updates-for-trunk/196459)

<div class="topic-metadata">

**Author:** [@zdennis](https://www.ruby-forum.com/u/zdennis)\
**Replies:** 0\
**Last updated:** [September 7, 2007, 12:08am UTC](https://www.ruby-forum.com/t/ann-form-test-helper-1-0-0-released-and-updates-for-trunk/196459 "2007-09-07T00:08:29Z")

</div>

form\_test\_helper 1.0.0 has been released for people developing on Rails 1.2.x or on Edge up to and including revision 6763. form\_test\_helper’s trunk has been updated to work with Rails Edge, revisions 6764 all the way…

---

## [\[ANN\] form\_test\_helper 1.0.0 released, and updates for trunk](https://www.ruby-forum.com/t/ann-form-test-helper-1-0-0-released-and-updates-for-trunk/114001)

<div class="topic-metadata">

**Author:** [@zdennis](https://www.ruby-forum.com/u/zdennis)\
**Replies:** 0\
**Last updated:** [September 7, 2007, 12:08am UTC](https://www.ruby-forum.com/t/ann-form-test-helper-1-0-0-released-and-updates-for-trunk/114001 "2007-09-07T00:08:29Z")

</div>

form\_test\_helper 1.0.0 has been released for people developing on Rails 1.2.x or on Edge up to and including revision 6763. form\_test\_helper’s trunk has been updated to work with Rails Edge, revisions 6764 all the way…

---

## [Change Ruby on Rails' reserved words?](https://www.ruby-forum.com/t/change-ruby-on-rails-reserved-words/113911)

<div class="topic-metadata">

**Author:** [@nfessel](https://www.ruby-forum.com/u/nfessel)\
**Replies:** 2\
**Last updated:** [September 6, 2007, 11:58pm UTC](https://www.ruby-forum.com/t/change-ruby-on-rails-reserved-words/113911 "2007-09-06T23:58:28Z")

</div>

Hi, One of my database tables has to have the same name as a reserved word in Ruby on Rails. Is there a way to change the name of a Ruby on Rails reserved word by overloading it or by some other means? I really do no…

---

## [Model/Migration Generation from UML (XMI or similar format)](https://www.ruby-forum.com/t/model-migration-generation-from-uml-xmi-or-similar-format/113998)

<div class="topic-metadata">

**Author:** [@sol](https://www.ruby-forum.com/u/sol)\
**Replies:** 0\
**Last updated:** [September 6, 2007, 11:38pm UTC](https://www.ruby-forum.com/t/model-migration-generation-from-uml-xmi-or-similar-format/113998 "2007-09-06T23:38:26Z")

</div>

Hey, I’m modelling some apps with 40+ models at the moment, using bouml for the uml. What I hate about modelling is that I have to write the generator commands for the migrations or models by hand. So I have to write…

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

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