# Rails

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

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

---

## [How to make routes that mimi Flickr's URLs](https://www.ruby-forum.com/t/how-to-make-routes-that-mimi-flickrs-urls/184670)

<div class="topic-metadata">

**Author:** [@interactivenyc](https://www.ruby-forum.com/u/interactivenyc)\
**Replies:** 0\
**Last updated:** [March 6, 2010, 7:56am UTC](https://www.ruby-forum.com/t/how-to-make-routes-that-mimi-flickrs-urls/184670 "2010-03-06T07:56:38Z")

</div>

I have two resources, :users and :photos. Users is based on AuthLogic. Photos has a type set to private or public. I would like configure my routes to mimic the Flickr URL structure. The routes I want are: foo.com/ph…

---

## [Two Version of Rails on one machine](https://www.ruby-forum.com/t/two-version-of-rails-on-one-machine/184667)

<div class="topic-metadata">

**Author:** [@princenamor](https://www.ruby-forum.com/u/princenamor)\
**Replies:** 0\
**Last updated:** [March 6, 2010, 5:23am UTC](https://www.ruby-forum.com/t/two-version-of-rails-on-one-machine/184667 "2010-03-06T05:23:10Z")

</div>

Hi, I installed rails3 on my mac and after installing 2.3.5 using gem install rails -v 2.3.5, if I run gem list rails, I got \*\*\* LOCAL GEMS \*\*\* rails (3.0.0.beta, 2.3.5) But if I run rails 3.0.0.beta test got the …

---

## [RegEx help to detect First and Last name](https://www.ruby-forum.com/t/regex-help-to-detect-first-and-last-name/184617)

<div class="topic-metadata">

**Author:** [@allanium](https://www.ruby-forum.com/u/allanium)\
**Replies:** 6\
**Last updated:** [March 6, 2010, 4:06am UTC](https://www.ruby-forum.com/t/regex-help-to-detect-first-and-last-name/184617 "2010-03-06T04:06:11Z")

</div>

Hello, I need some help on RegEx to detect First and Last names. This is what I currently have: /(\[A-Z\]+\[a-zA-Z\]\* \[A-Z\]+\[a-zA-Z\]\*)/ This is used to detect a First and Last name where two words are next to each other…

---

## [Searchlogic is\_any needs to be switched to equals\_any](https://www.ruby-forum.com/t/searchlogic-is-any-needs-to-be-switched-to-equals-any/184663)

<div class="topic-metadata">

**Author:** [@Learn\_by\_D](https://www.ruby-forum.com/u/Learn_by_D)\
**Replies:** 1\
**Last updated:** [March 6, 2010, 3:45am UTC](https://www.ruby-forum.com/t/searchlogic-is-any-needs-to-be-switched-to-equals-any/184663 "2010-03-06T03:45:48Z")

</div>

Does “is\_any” has a bug in searchlogic? “is\_any” used to work fine for me. All of a sudden now, for unknown reasons, when I write for example :attribute\_is\_any =\> \[1\] , the sql output is “where attribute != 1” w…

---

## [jQuery conversion - how to replace :onchange =\> remote\_function() call?](https://www.ruby-forum.com/t/jquery-conversion-how-to-replace-onchange-remote-function-call/184544)

<div class="topic-metadata">

**Author:** [@lunaclaire](https://www.ruby-forum.com/u/lunaclaire)\
**Replies:** 12\
**Last updated:** [March 6, 2010, 2:19am UTC](https://www.ruby-forum.com/t/jquery-conversion-how-to-replace-onchange-remote-function-call/184544 "2010-03-06T02:19:11Z")

</div>

II’m switching to jQuery and wondering how do I pull the onchange: stuff out of the following for a select and put it into a handler? here’s what I have in my view now: \<%= select\_tag :selected\_email, options\_from\_co…

---

## [Text\_field value as a local variable in in-line template function](https://www.ruby-forum.com/t/text-field-value-as-a-local-variable-in-in-line-template-function/184661)

<div class="topic-metadata">

**Author:** [@Grary](https://www.ruby-forum.com/u/Grary)\
**Replies:** 0\
**Last updated:** [March 6, 2010, 1:10am UTC](https://www.ruby-forum.com/t/text-field-value-as-a-local-variable-in-in-line-template-function/184661 "2010-03-06T01:10:07Z")

</div>

Hi, I’d like to conserve the sum total of several text fields on my form, even as I set them to blank upon a user link action. The following in-line snippet fails to store the value of my sum total field locally for …

---

## [Installation workaround for i18n gem 0.3.5 on rails 2.3.4 not working](https://www.ruby-forum.com/t/installation-workaround-for-i18n-gem-0-3-5-on-rails-2-3-4-not-working/184655)

<div class="topic-metadata">

**Author:** [@ginger72](https://www.ruby-forum.com/u/ginger72)\
**Replies:** 3\
**Last updated:** [March 6, 2010, 12:57am UTC](https://www.ruby-forum.com/t/installation-workaround-for-i18n-gem-0-3-5-on-rails-2-3-4-not-working/184655 "2010-03-06T00:57:14Z")

</div>

I am using the installation description on where I have downloaded the gem into vendor/plugins/i18 and added the following lines, as suggested, to an intitializer (i18n.rb): def reload\_i18n! raise “Move to i18n ver…

---

## [I18n in Rails 3](https://www.ruby-forum.com/t/i18n-in-rails-3/184583)

<div class="topic-metadata">

**Author:** [@albert](https://www.ruby-forum.com/u/albert)\
**Replies:** 4\
**Last updated:** [March 6, 2010, 12:46am UTC](https://www.ruby-forum.com/t/i18n-in-rails-3/184583 "2010-03-06T00:46:42Z")

</div>

Hi, been doing some tiny app in Rails 3 to get the hang of it. From the official guide currently I don’t know how to do the routes trick: map.resources :books, :path\_prefix =\> ‘/:locale’ It’s probably me but I can’t…

---

## [How to share variables in data migrations (up/down)](https://www.ruby-forum.com/t/how-to-share-variables-in-data-migrations-up-down/184553)

<div class="topic-metadata">

**Author:** [@ct9a](https://www.ruby-forum.com/u/ct9a)\
**Replies:** 26\
**Last updated:** [March 5, 2010, 10:39pm UTC](https://www.ruby-forum.com/t/how-to-share-variables-in-data-migrations-up-down/184553 "2010-03-05T22:39:31Z")

</div>

hi there, How do we share variables in a given data migration? For example, the code below fails to work because “statuses” don’t seem to be in scope for both up and down. class AddDefaultValuesToStatuses \< ActiveRe…

---

## [Automatic localized routes using routing filter and user session](https://www.ruby-forum.com/t/automatic-localized-routes-using-routing-filter-and-user-session/184643)

<div class="topic-metadata">

**Author:** [@kristianm](https://www.ruby-forum.com/u/kristianm)\
**Replies:** 2\
**Last updated:** [March 5, 2010, 10:06pm UTC](https://www.ruby-forum.com/t/automatic-localized-routes-using-routing-filter-and-user-session/184643 "2010-03-05T22:06:21Z")

</div>

I would like to add localization to my rails apps in the prefix form, fx /:locale/my/other/path/segments As I understand it, you currently have to do sth like the following map.resources :books, :path\_prefix =\> ‘/:loc…

---

## [WEBrick 500 error only with https](https://www.ruby-forum.com/t/webrick-500-error-only-with-https/184640)

<div class="topic-metadata">

**Author:** [@bob](https://www.ruby-forum.com/u/bob)\
**Replies:** 1\
**Last updated:** [March 5, 2010, 8:36pm UTC](https://www.ruby-forum.com/t/webrick-500-error-only-with-https/184640 "2010-03-05T20:36:48Z")

</div>

I have an application i’m installing on my application server. I’ve been using WEBrick and for now i’d like to just keep using it working in prototype development mode. This works fine on my development machine using…

---

## [Why all columns of joined table get instantiated as String?](https://www.ruby-forum.com/t/why-all-columns-of-joined-table-get-instantiated-as-string/184563)

<div class="topic-metadata">

**Author:** [@oshanter](https://www.ruby-forum.com/u/oshanter)\
**Replies:** 7\
**Last updated:** [March 5, 2010, 8:12pm UTC](https://www.ruby-forum.com/t/why-all-columns-of-joined-table-get-instantiated-as-string/184563 "2010-03-05T20:12:34Z")

</div>

Been developing in Rails for about a month and I’m still working on grasping its subtleties. Can someone please shed some light on this simple scenario? Schema create\_table :books do |t| t.string :title t.integer :y…

---

## [Has anybody made actionmailer work with rails 2.3.5?](https://www.ruby-forum.com/t/has-anybody-made-actionmailer-work-with-rails-2-3-5/184571)

<div class="topic-metadata">

**Author:** [@bigos](https://www.ruby-forum.com/u/bigos)\
**Replies:** 5\
**Last updated:** [March 5, 2010, 8:08pm UTC](https://www.ruby-forum.com/t/has-anybody-made-actionmailer-work-with-rails-2-3-5/184571 "2010-03-05T20:08:42Z")

</div>

Hi, I have wasted few days and I’m not getting anywhere. I was trying to follow tutorial on Rails Guides and this one: Ruby on Rails - Send Emails | Tutorialspoint . All I need is to be able to send some text, nothin…

---

## [Making async tcp connections from rails](https://www.ruby-forum.com/t/making-async-tcp-connections-from-rails/184648)

<div class="topic-metadata">

**Author:** [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Replies:** 0\
**Last updated:** [March 5, 2010, 8:00pm UTC](https://www.ruby-forum.com/t/making-async-tcp-connections-from-rails/184648 "2010-03-05T20:00:31Z")

</div>

So I’ve never really found a solution I like for making async tcp connections from inside a running rails app, and was curious if anyone else has had any luck. When running fairly large scale rails apps we always en…

---

## [How to create Rails models w/ multiple complex associations?](https://www.ruby-forum.com/t/how-to-create-rails-models-w-multiple-complex-associations/184647)

<div class="topic-metadata">

**Author:** [@dacbo](https://www.ruby-forum.com/u/dacbo)\
**Replies:** 0\
**Last updated:** [March 5, 2010, 7:58pm UTC](https://www.ruby-forum.com/t/how-to-create-rails-models-w-multiple-complex-associations/184647 "2010-03-05T19:58:57Z")

</div>

I am trying to figure out how to create ActiveRecord models with associations that can yield the same results as this SQL query: select login, first\_name, last\_name, email\_address from accounts inner join people on pe…

---

## [Undefined method \`build' for nil:NilClass](https://www.ruby-forum.com/t/undefined-method-build-for-nil-nilclass/184516)

<div class="topic-metadata">

**Author:** [@mac](https://www.ruby-forum.com/u/mac)\
**Replies:** 16\
**Last updated:** [March 5, 2010, 7:31pm UTC](https://www.ruby-forum.com/t/undefined-method-build-for-nil-nilclass/184516 "2010-03-05T19:31:50Z")

</div>

hello, m following railcast http://media.railscasts.com/videos/073\_complex\_forms\_part\_1.mov but i am getting error: undefined method \`build’ for nil:NilClass can you please help though m using belongs\_to and has\_on…

---

## [Errors in rake db:create](https://www.ruby-forum.com/t/errors-in-rake-db-create/184427)

<div class="topic-metadata">

**Author:** [@tys](https://www.ruby-forum.com/u/tys)\
**Replies:** 9\
**Last updated:** [March 5, 2010, 5:34pm UTC](https://www.ruby-forum.com/t/errors-in-rake-db-create/184427 "2010-03-05T17:34:08Z")

</div>

I have a basic working knowledge about ruby and am trying to now setup ruby on rails on my personal machine which is a Windows XP machine. The versions of ruby,gems and rails are below C:\\ruby\\Programs\>ruby -v ruby 1…

---

## [Output String while expecting hash](https://www.ruby-forum.com/t/output-string-while-expecting-hash/184637)

<div class="topic-metadata">

**Author:** [@prashanth](https://www.ruby-forum.com/u/prashanth)\
**Replies:** 1\
**Last updated:** [March 5, 2010, 5:04pm UTC](https://www.ruby-forum.com/t/output-string-while-expecting-hash/184637 "2010-03-05T17:04:14Z")

</div>

Hi I have been trying to fetch the output as an hash but it is returning string.I am storing the data in the following format. :input\_type: text\_field ride\_from :label: Ride From :input\_type: text\_field …

---

## [Strange error on the first request - trying to setup Rails 2.3.5 with Bundler](https://www.ruby-forum.com/t/strange-error-on-the-first-request-trying-to-setup-rails-2-3-5-with-bundler/184639)

<div class="topic-metadata">

**Author:** [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Replies:** 0\
**Last updated:** [March 5, 2010, 3:31pm UTC](https://www.ruby-forum.com/t/strange-error-on-the-first-request-trying-to-setup-rails-2-3-5-with-bundler/184639 "2010-03-05T15:31:39Z")

</div>

I’m trying to use Bundler for existing Rails 2.3.5 app and got a very strange problem. The problem is that on the very first request only the contents of the action view file are rendered - i.e. when loading the home …

---

## [Validations question](https://www.ruby-forum.com/t/validations-question/184613)

<div class="topic-metadata">

**Author:** [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Replies:** 3\
**Last updated:** [March 5, 2010, 11:51am UTC](https://www.ruby-forum.com/t/validations-question/184613 "2010-03-05T11:51:05Z")

</div>

I have wrote an validation function for checking that my starting date should be greater than the current date as like validate :start\_date\_should\_not\_be\_greater\_than\_current\_date def start\_date\_should\_not\_be\_greater\_…

---

## [Rails 3 and Friendship models](https://www.ruby-forum.com/t/rails-3-and-friendship-models/184486)

<div class="topic-metadata">

**Author:** [@pengzhang](https://www.ruby-forum.com/u/pengzhang)\
**Replies:** 5\
**Last updated:** [March 5, 2010, 11:16am UTC](https://www.ruby-forum.com/t/rails-3-and-friendship-models/184486 "2010-03-05T11:16:26Z")

</div>

I’m having issues creating Friendships in Rails 3 beta. I’m following Railscast 163 ( http://asciicasts.com/episodes/163-self-referential-association) and this is what I have in the relevant files: ## CONTROLLERS a…

---

## [Changing the plugin load path from a plugin-init.rb](https://www.ruby-forum.com/t/changing-the-plugin-load-path-from-a-plugin-init-rb/184623)

<div class="topic-metadata">

**Author:** [@neomizer](https://www.ruby-forum.com/u/neomizer)\
**Replies:** 0\
**Last updated:** [March 5, 2010, 11:01am UTC](https://www.ruby-forum.com/t/changing-the-plugin-load-path-from-a-plugin-init-rb/184623 "2010-03-05T11:01:13Z")

</div>

Hi, I’m in the middle of converting one of my Rails-Apps to a plugin/ engine. Because this new plugin requires a lot of plugins I moved them to RAILS\_ROOT/vender/plugins/my\_plugin/plugins and added config.plugin\_path…

---

## [Form Question](https://www.ruby-forum.com/t/form-question/184600)

<div class="topic-metadata">

**Author:** [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Replies:** 1\
**Last updated:** [March 5, 2010, 9:52am UTC](https://www.ruby-forum.com/t/form-question/184600 "2010-03-05T09:52:09Z")

</div>

I have a custom form builder that output form elements as tags. So \<%= form.input :first\_name%\> \<%= form.input :last\_name%\> generates like… first\_name\_label - first\_name\_text last\_name\_label - last\_name\_text I…

---

## [Single form multiple table](https://www.ruby-forum.com/t/single-form-multiple-table/184616)

<div class="topic-metadata">

**Author:** [@M\_I\_R](https://www.ruby-forum.com/u/M_I_R)\
**Replies:** 1\
**Last updated:** [March 5, 2010, 9:46am UTC](https://www.ruby-forum.com/t/single-form-multiple-table/184616 "2010-03-05T09:46:53Z")

</div>

Hi, I want to insert data into multiple database tables from a single form, look at the detail. tables: patients, patient\_history, patient\_address, first i will insert data into patient table and then the patient pr…

---

## [White Labeling (Easily Rebranding) Rails Applications](https://www.ruby-forum.com/t/white-labeling-easily-rebranding-rails-applications/184574)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [March 5, 2010, 9:44am UTC](https://www.ruby-forum.com/t/white-labeling-easily-rebranding-rails-applications/184574 "2010-03-05T09:44:32Z")

</div>

Has anyone figured out the best way to white label a Rails app / allow an app to be easily globally rebranded e. g. via configuration?

---

## [Simple backend and nested models](https://www.ruby-forum.com/t/simple-backend-and-nested-models/184592)

<div class="topic-metadata">

**Author:** [@cedric](https://www.ruby-forum.com/u/cedric)\
**Replies:** 1\
**Last updated:** [March 5, 2010, 9:38am UTC](https://www.ruby-forum.com/t/simple-backend-and-nested-models/184592 "2010-03-05T09:38:06Z")

</div>

Hi, I’ve been looking around a fair bit on Google, but haven’t been able to answer my own question. I have a form that includes an association that uses nested\_attributes. When using the label method that uses someth…

---

## [Passing params through destroy](https://www.ruby-forum.com/t/passing-params-through-destroy/184596)

<div class="topic-metadata">

**Author:** [@Dudebot](https://www.ruby-forum.com/u/Dudebot)\
**Replies:** 2\
**Last updated:** [March 5, 2010, 6:48am UTC](https://www.ruby-forum.com/t/passing-params-through-destroy/184596 "2010-03-05T06:48:57Z")

</div>

I’m having a strange sort of problem. I’d like to pass a param when I’m deleting a record, but can’t seem to do it. I’ve tried all sorts of variants of: def destroy @note = Note.find( params\[ :id \] ) @patient = Pat…

---

## [Cucumber tableish](https://www.ruby-forum.com/t/cucumber-tableish/184610)

<div class="topic-metadata">

**Author:** [@destiney](https://www.ruby-forum.com/u/destiney)\
**Replies:** 1\
**Last updated:** [March 5, 2010, 6:19am UTC](https://www.ruby-forum.com/t/cucumber-tableish/184610 "2010-03-05T06:19:06Z")

</div>

Anyone using tableish? First time trying it, and it is not working or I think it is not. Here is the failing ‘Then’ code. Then “$actor should see players table” do |\_, expected\_table| html\_table = tableish(‘table#pla…

---

## [Bulk messages system with full logs and status of mail](https://www.ruby-forum.com/t/bulk-messages-system-with-full-logs-and-status-of-mail/184605)

<div class="topic-metadata">

**Author:** [@shyam\_mohan](https://www.ruby-forum.com/u/shyam_mohan)\
**Replies:** 0\
**Last updated:** [March 5, 2010, 4:58am UTC](https://www.ruby-forum.com/t/bulk-messages-system-with-full-logs-and-status-of-mail/184605 "2010-03-05T04:58:21Z")

</div>

hi all please help me in making bulk messages system with full logs and status of mail i have long mailing list… due to response time is long i m getting errors … so i want to trace status in back end Regards, Shy…

---

## [Can I integrate Ruby on Rails with Microsoft COM (Quickbooks](https://www.ruby-forum.com/t/can-i-integrate-ruby-on-rails-with-microsoft-com-quickbooks/101907)

<div class="topic-metadata">

**Author:** [@PoserowS\_Benjamin](https://www.ruby-forum.com/u/PoserowS_Benjamin)\
**Replies:** 10\
**Last updated:** [March 5, 2010, 4:37am UTC](https://www.ruby-forum.com/t/can-i-integrate-ruby-on-rails-with-microsoft-com-quickbooks/101907 "2010-03-05T04:37:37Z")

</div>

Please help if anybody knows the answer! I’m just starting to learn Ruby on Rails. I’m working my way through the Agile Web D. with Rails book. I have been offered a project that I’d like to do with Rails for a not-…

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

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