# Rails

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

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

---

## [Change the View Directory](https://www.ruby-forum.com/t/change-the-view-directory/186825)

<div class="topic-metadata">

**Author:** [@brent](https://www.ruby-forum.com/u/brent)\
**Replies:** 0\
**Last updated:** [April 13, 2010, 2:07am UTC](https://www.ruby-forum.com/t/change-the-view-directory/186825 "2010-04-13T02:07:06Z")

</div>

How do I change the view directory? My situation is: I am creating a CMS for personal use, that I will also have a public view for people to play with the CMS without harming the DB. I’m thinking of creating a new app…

---

## [Rails routes and regex](https://www.ruby-forum.com/t/rails-routes-and-regex/186821)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 0\
**Last updated:** [April 13, 2010, 1:40am UTC](https://www.ruby-forum.com/t/rails-routes-and-regex/186821 "2010-04-13T01:40:44Z")

</div>

We have an api set up where the version will change is there a way to map the :controller part to take that part into account and not have to map v1 v2… map.connect ‘api/:v/:controller/:action’, :controller =\> ‘api/:…

---

## [Rails NEW and ADVANCED](https://www.ruby-forum.com/t/rails-new-and-advanced/186791)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 1\
**Last updated:** [April 13, 2010, 12:25am UTC](https://www.ruby-forum.com/t/rails-new-and-advanced/186791 "2010-04-13T00:25:14Z")

</div>

Hello All, i would like to know what are rails new and advanced concepts that i can learn and try with… Pls provide me any link or suggestions Thanks for your info…

---

## [Accepts\_nested\_attributes + polymorphic association](https://www.ruby-forum.com/t/accepts-nested-attributes-polymorphic-association/186656)

<div class="topic-metadata">

**Author:** [@dkam](https://www.ruby-forum.com/u/dkam)\
**Replies:** 1\
**Last updated:** [April 13, 2010, 12:06am UTC](https://www.ruby-forum.com/t/accepts-nested-attributes-polymorphic-association/186656 "2010-04-13T00:06:25Z")

</div>

im having an issue where my my polymorphic associations arent being deleted when using accepts nested attributes there are other accepts\_nested\_attributes being used and they are deleting fine, just the polymorphic as…

---

## [Complete validation failures](https://www.ruby-forum.com/t/complete-validation-failures/186707)

<div class="topic-metadata">

**Author:** [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Replies:** 1\
**Last updated:** [April 12, 2010, 11:58pm UTC](https://www.ruby-forum.com/t/complete-validation-failures/186707 "2010-04-12T23:58:18Z")

</div>

All the validations fail, even though the values in the params\[\] are valid. Here is the error in the logs, this is very weird frustrating, this should be pretty straightforward rails version 2.3.5 Model =\> class Loy…

---

## [Administration](https://www.ruby-forum.com/t/administration/186684)

<div class="topic-metadata">

**Author:** [@ChaosKnight](https://www.ruby-forum.com/u/ChaosKnight)\
**Replies:** 1\
**Last updated:** [April 12, 2010, 11:46pm UTC](https://www.ruby-forum.com/t/administration/186684 "2010-04-12T23:46:00Z")

</div>

Hi everyone, I was wondering about an admin section for websites, would I be better off to separate the admin controllers from the public exposed controllers? At the moment I do this via a namespace, but to me it seem…

---

## [Simple role system through associative table](https://www.ruby-forum.com/t/simple-role-system-through-associative-table/186682)

<div class="topic-metadata">

**Author:** [@gattone](https://www.ruby-forum.com/u/gattone)\
**Replies:** 1\
**Last updated:** [April 12, 2010, 10:01pm UTC](https://www.ruby-forum.com/t/simple-role-system-through-associative-table/186682 "2010-04-12T22:01:12Z")

</div>

So I have the Ninja model which has many Hovercrafts through ninja\_hovercrafts (which stores the ninja\_id and the hovercraft\_id). It is of my understanding that this kind of arrangement should be set in a way that the…

---

## [Minify html views layouts](https://www.ruby-forum.com/t/minify-html-views-layouts/186710)

<div class="topic-metadata">

**Author:** [@xia](https://www.ruby-forum.com/u/xia)\
**Replies:** 1\
**Last updated:** [April 12, 2010, 9:32pm UTC](https://www.ruby-forum.com/t/minify-html-views-layouts/186710 "2010-04-12T21:32:30Z")

</div>

Hello, Does anyone have any tips for minifying views and layouts? IE removing whitespace Thanks ahead

---

## [Clicking to add content is adding it outside of the page's table](https://www.ruby-forum.com/t/clicking-to-add-content-is-adding-it-outside-of-the-pages-table/186808)

<div class="topic-metadata">

**Author:** [@ESESES](https://www.ruby-forum.com/u/ESESES)\
**Replies:** 4\
**Last updated:** [April 12, 2010, 8:45pm UTC](https://www.ruby-forum.com/t/clicking-to-add-content-is-adding-it-outside-of-the-pages-table/186808 "2010-04-12T20:45:06Z")

</div>

Each time the “add” button in my nested form is clicked, it adds the partial to the end of the page, not inside in the table. My view file: \<% echantillon\_form.fields\_for :treatments do |builder| %\> …

---

## [Problem for CSV import](https://www.ruby-forum.com/t/problem-for-csv-import/186797)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 2\
**Last updated:** [April 12, 2010, 6:50pm UTC](https://www.ruby-forum.com/t/problem-for-csv-import/186797 "2010-04-12T18:50:09Z")

</div>

Hi, I am doing a finctionality to import csv file. My CSV file is like this Header-- Name,Address,Details Data-- Tushar, sangavi,pune, I am a ror developer My controller code is:- @parsed\_file=CSV::Reader.parse(p…

---

## [Declaring arrays shared across different controller methods](https://www.ruby-forum.com/t/declaring-arrays-shared-across-different-controller-methods/186591)

<div class="topic-metadata">

**Author:** [@ESESES](https://www.ruby-forum.com/u/ESESES)\
**Replies:** 3\
**Last updated:** [April 12, 2010, 6:33pm UTC](https://www.ruby-forum.com/t/declaring-arrays-shared-across-different-controller-methods/186591 "2010-04-12T18:33:57Z")

</div>

I would like to have an array saving fields to display for an object that is used for its form on multiple pages. I have declared the array in each of the controller methods that would use it. Where can I put the arr…

---

## [Clicking to add content is adding it outside of the page's table](https://www.ruby-forum.com/t/clicking-to-add-content-is-adding-it-outside-of-the-pages-table/186809)

<div class="topic-metadata">

**Author:** [@ESESES](https://www.ruby-forum.com/u/ESESES)\
**Replies:** 0\
**Last updated:** [April 12, 2010, 6:29pm UTC](https://www.ruby-forum.com/t/clicking-to-add-content-is-adding-it-outside-of-the-pages-table/186809 "2010-04-12T18:29:16Z")

</div>

Clicking the “add” button in my nested form is adding the content outside of the page’s main table, how can I get it to add the html into the table that the link is contained in? I followed the Railscast My view fil…

---

## [Accessing method in another controller](https://www.ruby-forum.com/t/accessing-method-in-another-controller/186790)

<div class="topic-metadata">

**Author:** [@RVince](https://www.ruby-forum.com/u/RVince)\
**Replies:** 3\
**Last updated:** [April 12, 2010, 6:20pm UTC](https://www.ruby-forum.com/t/accessing-method-in-another-controller/186790 "2010-04-12T18:20:53Z")

</div>

If I have : class X \< ApplicationController def some\_method … end end and I have class Y \< ApplicationController end How, from a method within class Y, can I call class X’s some\_method ? TIA, RVince

---

## [Partial being rendered outside of table format](https://www.ruby-forum.com/t/partial-being-rendered-outside-of-table-format/186804)

<div class="topic-metadata">

**Author:** [@ESESES](https://www.ruby-forum.com/u/ESESES)\
**Replies:** 3\
**Last updated:** [April 12, 2010, 6:01pm UTC](https://www.ruby-forum.com/t/partial-being-rendered-outside-of-table-format/186804 "2010-04-12T18:01:10Z")

</div>

I’m following this nested forms railscast but each time that new fields are added to my form the fields are added above my table. Therefore, when the remove links are clicked, it can’t find the section to delete. W…

---

## [Find all by a different association id](https://www.ruby-forum.com/t/find-all-by-a-different-association-id/186616)

<div class="topic-metadata">

**Author:** [@brent](https://www.ruby-forum.com/u/brent)\
**Replies:** 3\
**Last updated:** [April 12, 2010, 6:01pm UTC](https://www.ruby-forum.com/t/find-all-by-a-different-association-id/186616 "2010-04-12T18:01:10Z")

</div>

I have 3 models here setup like thus: AttachmentType has\_many :attachments Attachment belongs\_to :page belongs\_to :attachment\_type Page has\_many :attachments Attachment belongs to both an AttachmentType & Page. H…

---

## [Controller to controller call](https://www.ruby-forum.com/t/controller-to-controller-call/186803)

<div class="topic-metadata">

**Author:** [@bigdaddy71](https://www.ruby-forum.com/u/bigdaddy71)\
**Replies:** 2\
**Last updated:** [April 12, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/controller-to-controller-call/186803 "2010-04-12T16:39:11Z")

</div>

How would you call an action from one controller to another?

---

## [Need a dropdown having "more.." option](https://www.ruby-forum.com/t/need-a-dropdown-having-more-option/186640)

<div class="topic-metadata">

**Author:** [@samiron](https://www.ruby-forum.com/u/samiron)\
**Replies:** 2\
**Last updated:** [April 12, 2010, 4:28pm UTC](https://www.ruby-forum.com/t/need-a-dropdown-having-more-option/186640 "2010-04-12T16:28:03Z")

</div>

I have a collection of products that I am showing in a dropdown. Now at the first view it will show only first 10 products in the dropdown with an option “more…” at last. if user clicks the “more…” he can see all the …

---

## [\[JOBS\] Innovative Agile ruby on rails developer / technologist - India](https://www.ruby-forum.com/t/jobs-innovative-agile-ruby-on-rails-developer-technologist-india/186800)

<div class="topic-metadata">

**Author:** [@hughhoffy](https://www.ruby-forum.com/u/hughhoffy)\
**Replies:** 0\
**Last updated:** [April 12, 2010, 4:20pm UTC](https://www.ruby-forum.com/t/jobs-innovative-agile-ruby-on-rails-developer-technologist-india/186800 "2010-04-12T16:20:26Z")

</div>

We are looking for an innovative ruby on rails developer to work remotely from India on projects in Australia full-time 40 hours per week. Please respond to info\[at\]ennova.com.au We are looking for developers with th…

---

## [$(link).previous("input\[type=hidden\]") is undefined](https://www.ruby-forum.com/t/link-previous-input-type-hidden-is-undefined/186788)

<div class="topic-metadata">

**Author:** [@ESESES](https://www.ruby-forum.com/u/ESESES)\
**Replies:** 3\
**Last updated:** [April 12, 2010, 3:44pm UTC](https://www.ruby-forum.com/t/link-previous-input-type-hidden-is-undefined/186788 "2010-04-12T15:44:08Z")

</div>

I am getting this error when trying to use the remove link explained in the Railscast: error: $(link).previous(“input\[type=hidden\]”) is undefined remove\_fields()applic…1065175 (line 6) function onclick(event) { rem…

---

## [Locale parameter on URL](https://www.ruby-forum.com/t/locale-parameter-on-url/186564)

<div class="topic-metadata">

**Author:** [@Paulo\_HSVSNeves](https://www.ruby-forum.com/u/Paulo_HSVSNeves)\
**Replies:** 26\
**Last updated:** [April 12, 2010, 3:18pm UTC](https://www.ruby-forum.com/t/locale-parameter-on-url/186564 "2010-04-12T15:18:57Z")

</div>

Hello guys. I just started learning Rails and one of the first things I was interested was the localization of my website. I started looking the rails-i18n and it worked beautifully, except for some things. e.g.: i wa…

---

## [Anyone knows of a opensource dating app?](https://www.ruby-forum.com/t/anyone-knows-of-a-opensource-dating-app/186796)

<div class="topic-metadata">

**Author:** [@rubybox](https://www.ruby-forum.com/u/rubybox)\
**Replies:** 2\
**Last updated:** [April 12, 2010, 3:13pm UTC](https://www.ruby-forum.com/t/anyone-knows-of-a-opensource-dating-app/186796 "2010-04-12T15:13:05Z")

</div>

Anyone knows of a opensource dating app for ruby on rails or anything that can be formed into it? Anyone knows of one?

---

## [\[ANN\] Mail 2.2.0](https://www.ruby-forum.com/t/ann-mail-2-2-0/186681)

<div class="topic-metadata">

**Author:** [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Replies:** 1\
**Last updated:** [April 12, 2010, 2:57pm UTC](https://www.ruby-forum.com/t/ann-mail-2-2-0/186681 "2010-04-12T14:57:16Z")

</div>

Mail version 2.2.0 has been pushed to RubyGems.org. I have also updated ActionMailer to use Mail 2.2.0 which removes (finally) all quoting and encoding of mail parts from ActionMailer, the methods in ActionMailer wor…

---

## [Problem with basic routing](https://www.ruby-forum.com/t/problem-with-basic-routing/186789)

<div class="topic-metadata">

**Author:** [@Benchips](https://www.ruby-forum.com/u/Benchips)\
**Replies:** 4\
**Last updated:** [April 12, 2010, 1:52pm UTC](https://www.ruby-forum.com/t/problem-with-basic-routing/186789 "2010-04-12T13:52:53Z")

</div>

Hi everybody! I am new in the RoR world and I’m currently following the step by step tutorial for creating the basic “hello, Rails” stuff. Everything goes well till I try to display the page through the server. Appar…

---

## [Daemon() function is unimplemented](https://www.ruby-forum.com/t/daemon-function-is-unimplemented/186787)

<div class="topic-metadata">

**Author:** [@punkaruby](https://www.ruby-forum.com/u/punkaruby)\
**Replies:** 2\
**Last updated:** [April 12, 2010, 1:22pm UTC](https://www.ruby-forum.com/t/daemon-function-is-unimplemented/186787 "2010-04-12T13:22:22Z")

</div>

Hi all, I’m a newbie… so be patient pliz :wink: I’m starting to use Rails on my machine (OS: Win 7) but when I’m trying to connect to http://0.0.0.0:3000 I get nothing. So I launch rails in this way: ruby script/s…

---

## [I18n retuns empty string?](https://www.ruby-forum.com/t/i18n-retuns-empty-string/185958)

<div class="topic-metadata">

**Author:** [@cojones](https://www.ruby-forum.com/u/cojones)\
**Replies:** 12\
**Last updated:** [April 12, 2010, 10:49am UTC](https://www.ruby-forum.com/t/i18n-retuns-empty-string/185958 "2010-04-12T10:49:16Z")

</div>

Hello, does any one know why: \<%= I18n.l Time.now %\> returns an empty string? But it works when I run it on the console: I18n.l Time.now =\> “Mon, 29 Mar 2010 18:38:32 +0100” I can’t think of anything that could ca…

---

## [Reloading controller plugins on each request](https://www.ruby-forum.com/t/reloading-controller-plugins-on-each-request/186638)

<div class="topic-metadata">

**Author:** [@nickh](https://www.ruby-forum.com/u/nickh)\
**Replies:** 9\
**Last updated:** [April 12, 2010, 10:09am UTC](https://www.ruby-forum.com/t/reloading-controller-plugins-on-each-request/186638 "2010-04-12T10:09:47Z")

</div>

Hey guys. I’m writing an “acts\_as\_X” plugin that’s used by controllers. Unfortunately, the plugin isn’t being reloaded for each request \[in the dev env\]. I thought that adding config.reload\_plugins = true if RAILS\_EN…

---

## [Image preloading](https://www.ruby-forum.com/t/image-preloading/186658)

<div class="topic-metadata">

**Author:** [@ChaosKnight](https://www.ruby-forum.com/u/ChaosKnight)\
**Replies:** 5\
**Last updated:** [April 12, 2010, 8:37am UTC](https://www.ruby-forum.com/t/image-preloading/186658 "2010-04-12T08:37:17Z")

</div>

Hi, I am still very new to Ruby on Rails, but I’m busy with my first RoR website, everything went well, until I realized that my images didn’t preload… On previous websites I used a simple JavaScript preloader that se…

---

## [Custom Routes](https://www.ruby-forum.com/t/custom-routes/186683)

<div class="topic-metadata">

**Author:** [@ChaosKnight](https://www.ruby-forum.com/u/ChaosKnight)\
**Replies:** 2\
**Last updated:** [April 12, 2010, 8:25am UTC](https://www.ruby-forum.com/t/custom-routes/186683 "2010-04-12T08:25:44Z")

</div>

Hi, I am busy with a tourism website and I am almost done, but the URL’s is starting to bug me… I am still a Rails noob, but I am eager to learn as much as possible. I already make use of resource routes, but I want …

---

## [Ajax in layout?](https://www.ruby-forum.com/t/ajax-in-layout/186604)

<div class="topic-metadata">

**Author:** [@veena](https://www.ruby-forum.com/u/veena)\
**Replies:** 4\
**Last updated:** [April 12, 2010, 8:16am UTC](https://www.ruby-forum.com/t/ajax-in-layout/186604 "2010-04-12T08:16:04Z")

</div>

Hai frnds, Can we add ajax functionality in a layout? I was wondering if someone has an answer for that. In my layout current time is displayed.But if the time needs to be updated we have to refresh the page.I want i…

---

## [Image retrieve](https://www.ruby-forum.com/t/image-retrieve/186582)

<div class="topic-metadata">

**Author:** [@priyadharsini](https://www.ruby-forum.com/u/priyadharsini)\
**Replies:** 2\
**Last updated:** [April 12, 2010, 7:09am UTC](https://www.ruby-forum.com/t/image-retrieve/186582 "2010-04-12T07:09:25Z")

</div>

Hi All, Good Morning to everyone. I have one doubt. Can anyone clear me? I have saved some images in some other public folder apart from the application’s public folder. How can i retrieve it and display in browser? …

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

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