# Rails

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

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

---

## [Unit "truth" test fails on InstantRails with legacy database](https://www.ruby-forum.com/t/unit-truth-test-fails-on-instantrails-with-legacy-database/111509)

<div class="topic-metadata">

**Author:** [@glenn](https://www.ruby-forum.com/u/glenn)\
**Replies:** 0\
**Last updated:** [August 8, 2007, 4:01am UTC](https://www.ruby-forum.com/t/unit-truth-test-fails-on-instantrails-with-legacy-database/111509 "2007-08-08T04:01:36Z")

</div>

\---------------------- app/models/accountancy.rb ----------- class Accountancy \< ActiveRecord::Base self.table\_name = “egmaccylog” self.primary\_key = “ID” end --------------------- test/unit/accountancy\_test.rb ----…

---

## [Using a Number as an Action Name](https://www.ruby-forum.com/t/using-a-number-as-an-action-name/111507)

<div class="topic-metadata">

**Author:** [@partydrone](https://www.ruby-forum.com/u/partydrone)\
**Replies:** 3\
**Last updated:** [August 8, 2007, 3:18am UTC](https://www.ruby-forum.com/t/using-a-number-as-an-action-name/111507 "2007-08-08T03:18:33Z")

</div>

I need/want to create actions using a number. For example: class ClickController \< ApplicationController caches\_page(:index, :100, :200) def index end def 100 end def 200 end end I keep running into problems wi…

---

## [\[noob\] referencing array of fields in form?](https://www.ruby-forum.com/t/noob-referencing-array-of-fields-in-form/111495)

<div class="topic-metadata">

**Author:** [@rogboone](https://www.ruby-forum.com/u/rogboone)\
**Replies:** 2\
**Last updated:** [August 8, 2007, 3:07am UTC](https://www.ruby-forum.com/t/noob-referencing-array-of-fields-in-form/111495 "2007-08-08T03:07:33Z")

</div>

Hi All, Noob question – but perhaps a combo of Ruby and Rails noobness. I have a table of “scores” and there are 150 “most recent” scores per user. I can retrieve those scores and display them in a form for the user…

---

## [Eager loading w/ :through question](https://www.ruby-forum.com/t/eager-loading-w-through-question/111502)

<div class="topic-metadata">

**Author:** [@licinius](https://www.ruby-forum.com/u/licinius)\
**Replies:** 3\
**Last updated:** [August 8, 2007, 2:28am UTC](https://www.ruby-forum.com/t/eager-loading-w-through-question/111502 "2007-08-08T02:28:31Z")

</div>

I’m doing an absolutely insane amount of queries, so I starting looking into how to fix it, because there isn’t really a reason to, as I can get the relevant data with just one. Essentially it looks like this. I have…

---

## [Image\_tag weirdness - dodgy return value - HELP PLEASE!](https://www.ruby-forum.com/t/image-tag-weirdness-dodgy-return-value-help-please/111454)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 5\
**Last updated:** [August 8, 2007, 2:09am UTC](https://www.ruby-forum.com/t/image-tag-weirdness-dodgy-return-value-help-please/111454 "2007-08-08T02:09:29Z")

</div>

Can anyone help? I’ve been going round in circles for two days, tearing my hair out trying to show a thumbnail and a full sized version of pictures i have stored in my appname/data/pictures folder. I’ve tried imagema…

---

## [Newbie: Want to use time\_select to partial fill a datetime f](https://www.ruby-forum.com/t/newbie-want-to-use-time-select-to-partial-fill-a-datetime-f/111503)

<div class="topic-metadata">

**Author:** [@jules](https://www.ruby-forum.com/u/jules)\
**Replies:** 0\
**Last updated:** [August 8, 2007, 1:02am UTC](https://www.ruby-forum.com/t/newbie-want-to-use-time-select-to-partial-fill-a-datetime-f/111503 "2007-08-08T01:02:20Z")

</div>

Hello Our Database schema, and hence Our Model has a few datetime columns/ fields. But when entering new instances, We only want to present time (i.e. HH:MM) in in our HTML views to the user. The time\_select looks …

---

## [MySQL server has gone away when record.save](https://www.ruby-forum.com/t/mysql-server-has-gone-away-when-record-save/111496)

<div class="topic-metadata">

**Author:** [@acampos](https://www.ruby-forum.com/u/acampos)\
**Replies:** 1\
**Last updated:** [August 8, 2007, 12:49am UTC](https://www.ruby-forum.com/t/mysql-server-has-gone-away-when-record-save/111496 "2007-08-08T00:49:19Z")

</div>

Hi, I’m encountering some strangeness on my production server, and I’m hoping someone has light to shed. I have a table ‘new\_titles’ with one record and a custom ActiveRecord connection to the database w/ this table m…

---

## [Url\_for\_file\_column and Flash swf](https://www.ruby-forum.com/t/url-for-file-column-and-flash-swf/111500)

<div class="topic-metadata">

**Author:** [@newb\_atrails](https://www.ruby-forum.com/u/newb_atrails)\
**Replies:** 0\
**Last updated:** [August 8, 2007, 12:15am UTC](https://www.ruby-forum.com/t/url-for-file-column-and-flash-swf/111500 "2007-08-08T00:15:58Z")

</div>

Hello all, I am in a bind here… I have an image uploader on my site which stores one image for a specific page (within an admin). So, within the admin, I would go to “Pages”, then find the page I want to edit, browse…

---

## [Redirect link is not working](https://www.ruby-forum.com/t/redirect-link-is-not-working/111494)

<div class="topic-metadata">

**Author:** [@Ajit](https://www.ruby-forum.com/u/Ajit)\
**Replies:** 0\
**Last updated:** [August 7, 2007, 10:54pm UTC](https://www.ruby-forum.com/t/redirect-link-is-not-working/111494 "2007-08-07T22:54:04Z")

</div>

index.rhtml \<%= form\_tag %\> select category : \<%= select ‘treatmentphase’, ‘cats’ , Treatmentcategories.find(:all).collect {|l|\[l.name, l.id \]}%\> phase : \<%= text\_field ‘treatmentphase’, ‘phase’%\> Comments : \<%= t…

---

## [Clean URL's and User Authentication](https://www.ruby-forum.com/t/clean-urls-and-user-authentication/111373)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 7\
**Last updated:** [August 7, 2007, 10:32pm UTC](https://www.ruby-forum.com/t/clean-urls-and-user-authentication/111373 "2007-08-07T22:32:31Z")

</div>

Users who are logged into a form that I am working on are only allowed to visited pages if they are logged in. If they are not logged in, they get kicked back to the login page. This was achieved by placing the follow…

---

## [Xsendfile not working](https://www.ruby-forum.com/t/xsendfile-not-working/111485)

<div class="topic-metadata">

**Author:** [@ddavis\_onset](https://www.ruby-forum.com/u/ddavis_onset)\
**Replies:** 0\
**Last updated:** [August 7, 2007, 9:25pm UTC](https://www.ruby-forum.com/t/xsendfile-not-working/111485 "2007-08-07T21:25:24Z")

</div>

Hi, I am running apache web server 2.2.4 in front of mongrel on linux. I can’t get x\_send\_file to work. A couple errors are happening. In apache, I have the configured where mydir is the directory containing the f…

---

## [Engines and edge rails](https://www.ruby-forum.com/t/engines-and-edge-rails/102762)

<div class="topic-metadata">

**Author:** [@davidstokar](https://www.ruby-forum.com/u/davidstokar)\
**Replies:** 8\
**Last updated:** [August 7, 2007, 9:06pm UTC](https://www.ruby-forum.com/t/engines-and-edge-rails/102762 "2007-08-07T21:06:50Z")

</div>

Hi there, We’re using engines heavily in our current app - problem is that we’ve seen the lovely patch DHH just committed to edge rails to allow easy namespacing of routes ( http://railstips.org/2007/4/28/namespaces-…

---

## [Acts\_as\_ferret cross model index not updating](https://www.ruby-forum.com/t/acts-as-ferret-cross-model-index-not-updating/111352)

<div class="topic-metadata">

**Author:** [@piers](https://www.ruby-forum.com/u/piers)\
**Replies:** 4\
**Last updated:** [August 7, 2007, 9:03pm UTC](https://www.ruby-forum.com/t/acts-as-ferret-cross-model-index-not-updating/111352 "2007-08-07T21:03:17Z")

</div>

Does anyone know how do you get acts\_as\_ferret to automagically update non-standard fields? I’ve followed Rails Envy’s tutorial (http://www.railsenvy.com/2007/2/19/acts-as-ferret-tutorial#nonmodel) to get aaf working…

---

## [Core team email address?](https://www.ruby-forum.com/t/core-team-email-address/111477)

<div class="topic-metadata">

**Author:** [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Replies:** 1\
**Last updated:** [August 7, 2007, 9:00pm UTC](https://www.ruby-forum.com/t/core-team-email-address/111477 "2007-08-07T21:00:48Z")

</div>

Anybody know if the old rubyonrails.org email address is still valid for questions to the core team? Thanks, Bill

---

## [Anyone want to wager on when Rails 2.0 is going to be releas](https://www.ruby-forum.com/t/anyone-want-to-wager-on-when-rails-2-0-is-going-to-be-releas/111481)

<div class="topic-metadata">

**Author:** [@inkling](https://www.ruby-forum.com/u/inkling)\
**Replies:** 0\
**Last updated:** [August 7, 2007, 8:40pm UTC](https://www.ruby-forum.com/t/anyone-want-to-wager-on-when-rails-2-0-is-going-to-be-releas/111481 "2007-08-07T20:40:45Z")

</div>

Thought this would be an interesting cross post, and a couple people on the core team list thought it belonged here anyways. So: Just thought it might be fun to see what a prediction market says when Rails 2.0 is com…

---

## [Logins for customers and admins](https://www.ruby-forum.com/t/logins-for-customers-and-admins/111372)

<div class="topic-metadata">

**Author:** [@jordelver](https://www.ruby-forum.com/u/jordelver)\
**Replies:** 2\
**Last updated:** [August 7, 2007, 8:34pm UTC](https://www.ruby-forum.com/t/logins-for-customers-and-admins/111372 "2007-08-07T20:34:45Z")

</div>

Hi, I’m trying to figure out how to model my application. I want to have two different types of login to the application: Customers and Administrators. The users are quite different. Customers are just that and will …

---

## [Field Level Security](https://www.ruby-forum.com/t/field-level-security/111408)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [August 7, 2007, 8:17pm UTC](https://www.ruby-forum.com/t/field-level-security/111408 "2007-08-07T20:17:43Z")

</div>

Could someone point me in a direction on how to apply field level security to my Rails app? Basically I have an update action on my controller, but based on the permissions of the person logged in, I want to control …

---

## [Question about form with one-to-one models](https://www.ruby-forum.com/t/question-about-form-with-one-to-one-models/111470)

<div class="topic-metadata">

**Author:** [@huang\_zhimin](https://www.ruby-forum.com/u/huang_zhimin)\
**Replies:** 0\
**Last updated:** [August 7, 2007, 6:21pm UTC](https://www.ruby-forum.com/t/question-about-form-with-one-to-one-models/111470 "2007-08-07T18:21:28Z")

</div>

For example, I have two models Person and Address, that one person has one address. class Person \< ActiveRecord::Base has\_one :address end class Address \< ActiveRecord::Base belongs\_to :person end Now, I want to…

---

## [Serializing a Proc doesn't seem to work](https://www.ruby-forum.com/t/serializing-a-proc-doesnt-seem-to-work/111426)

<div class="topic-metadata">

**Author:** [@Astorian](https://www.ruby-forum.com/u/Astorian)\
**Replies:** 1\
**Last updated:** [August 7, 2007, 6:16pm UTC](https://www.ruby-forum.com/t/serializing-a-proc-doesnt-seem-to-work/111426 "2007-08-07T18:16:01Z")

</div>

In Agile Web D. with Rails, there is a section on serializing Ruby objects. “We can assign any Ruby object to the last\_five column” … p312 When I attempt to do this with a proc object, something like this is saved in…

---

## [Proper database setup/import](https://www.ruby-forum.com/t/proper-database-setup-import/111467)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [August 7, 2007, 5:57pm UTC](https://www.ruby-forum.com/t/proper-database-setup-import/111467 "2007-08-07T17:57:25Z")

</div>

Excuse my newbiness I am just learning Ruby/Rails. What way would be correct or is there another way? Lets say I have a single excel file of cities, counties, states that I want to import into mysql for a Rails proje…

---

## [Visibility controller instance variables](https://www.ruby-forum.com/t/visibility-controller-instance-variables/111457)

<div class="topic-metadata">

**Author:** [@vince](https://www.ruby-forum.com/u/vince)\
**Replies:** 1\
**Last updated:** [August 7, 2007, 5:30pm UTC](https://www.ruby-forum.com/t/visibility-controller-instance-variables/111457 "2007-08-07T17:30:19Z")

</div>

Hi all, class SomethingController \< ApplicationController def action1 @instance\_var = SomeClass.find(1) end def action2 #… end end It seems I have to assign @instance\_var as well in action2, even I run through …

---

## [\[ANN\] XPath Checker and assert\_xpath](https://www.ruby-forum.com/t/ann-xpath-checker-and-assert-xpath/111463)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 0\
**Last updated:** [August 7, 2007, 5:08pm UTC](https://www.ruby-forum.com/t/ann-xpath-checker-and-assert-xpath/111463 "2007-08-07T17:08:15Z")

</div>

Railsters: I finally found a good XPath exploring tool, so I wrote it up here: The post shows the easiest way to learn complex XPath, and how to retrofit a site to submit to assert\_xpath tests. – Phlip http://www…

---

## [Ruby 1.8.6 + Rails 1.2.3 + ErrorNotification == NameError !?](https://www.ruby-forum.com/t/ruby-1-8-6-rails-1-2-3-errornotification-nameerror/110462)

<div class="topic-metadata">

**Author:** [@none](https://www.ruby-forum.com/u/none)\
**Replies:** 2\
**Last updated:** [August 7, 2007, 4:46pm UTC](https://www.ruby-forum.com/t/ruby-1-8-6-rails-1-2-3-errornotification-nameerror/110462 "2007-08-07T16:46:13Z")

</div>

Hallo Everybody, I updated recently to the latest versions of Ruby and Rails. Now it seems to me that the plugin ErrorNotification doesn’t run anymore. I even tried to create a new project, installed the plugin and ad…

---

## [Many assets design question](https://www.ruby-forum.com/t/many-assets-design-question/111462)

<div class="topic-metadata">

**Author:** [@pabloz](https://www.ruby-forum.com/u/pabloz)\
**Replies:** 0\
**Last updated:** [August 7, 2007, 4:45pm UTC](https://www.ruby-forum.com/t/many-assets-design-question/111462 "2007-08-07T16:45:14Z")

</div>

Hi! In my recent app I will have stuff like projects, references. Project will have many assets like images and pdf’s. Reference will only have 1 asset - one image. Is it good idea to build polymorphic resource like …

---

## [How to make the field names to downcase?](https://www.ruby-forum.com/t/how-to-make-the-field-names-to-downcase/111461)

<div class="topic-metadata">

**Author:** [@netskie](https://www.ruby-forum.com/u/netskie)\
**Replies:** 0\
**Last updated:** [August 7, 2007, 4:41pm UTC](https://www.ruby-forum.com/t/how-to-make-the-field-names-to-downcase/111461 "2007-08-07T16:41:39Z")

</div>

hello… Im using multiple databases. The second database field names are in capital letters. how can i make this fields to small letters?.. Anyone?? thanks…

---

## [Which "progress upload plugin" is good?](https://www.ruby-forum.com/t/which-progress-upload-plugin-is-good/109075)

<div class="topic-metadata">

**Author:** [@chamnap](https://www.ruby-forum.com/u/chamnap)\
**Replies:** 10\
**Last updated:** [August 7, 2007, 4:12pm UTC](https://www.ruby-forum.com/t/which-progress-upload-plugin-is-good/109075 "2007-08-07T16:12:10Z")

</div>

Hello, I want to implement one upload application and want to show the progress upload bar to the user. I am appreciate if you all could give me some idea about which plugin you think it is good for you. Thanks Cham…

---

## [London - Looking for partner (engineer) to build startup](https://www.ruby-forum.com/t/london-looking-for-partner-engineer-to-build-startup/111448)

<div class="topic-metadata">

**Author:** [@bogea](https://www.ruby-forum.com/u/bogea)\
**Replies:** 2\
**Last updated:** [August 7, 2007, 3:31pm UTC](https://www.ruby-forum.com/t/london-looking-for-partner-engineer-to-build-startup/111448 "2007-08-07T15:31:14Z")

</div>

Hello, I’m looking for a partner to develop a web / mobile 2.0 project. I have a good idea and the goal is to build a team, develop a prototype and get investment to create our own startup. I have a deep experience i…

---

## [Making Validations Optional](https://www.ruby-forum.com/t/making-validations-optional/111447)

<div class="topic-metadata">

**Author:** [@mindtonic](https://www.ruby-forum.com/u/mindtonic)\
**Replies:** 2\
**Last updated:** [August 7, 2007, 3:07pm UTC](https://www.ruby-forum.com/t/making-validations-optional/111447 "2007-08-07T15:07:59Z")

</div>

Hello, I am working with URL validations. I want this validation to be optional if the data exists in the form submission. I have tried several things. validates\_format\_of :website, :if =\> params\[:organization\]\[…

---

## [Plugin install problem](https://www.ruby-forum.com/t/plugin-install-problem/111451)

<div class="topic-metadata">

**Author:** [@demoversion](https://www.ruby-forum.com/u/demoversion)\
**Replies:** 0\
**Last updated:** [August 7, 2007, 2:58pm UTC](https://www.ruby-forum.com/t/plugin-install-problem/111451 "2007-08-07T14:58:53Z")

</div>

hello, i get a problem when i want to install a plugins from svn, for example: H:\\REAL\_TEMP\\eee\\proj\>ruby script\\plugin install http://svn.trebex.net/auto-admi n/trunk/auto-admin --force Plugin not found: \[“http://s…

---

## [Lib dir vs. plugin](https://www.ruby-forum.com/t/lib-dir-vs-plugin/111446)

<div class="topic-metadata">

**Author:** [@schof](https://www.ruby-forum.com/u/schof)\
**Replies:** 1\
**Last updated:** [August 7, 2007, 2:37pm UTC](https://www.ruby-forum.com/t/lib-dir-vs-plugin/111446 "2007-08-07T14:37:55Z")

</div>

I’m still learning about the Rails opinion on where stuff belongs. Can someone explain to me the difference between code in the lib vs. code in a plugin. What scenarios are appropriate for each approach? Sean

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

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