# Rails

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

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

---

## [Can models be put in subfolders?](https://www.ruby-forum.com/t/can-models-be-put-in-subfolders/135443)

<div class="topic-metadata">

**Author:** [@Mister\_Blood\_R](https://www.ruby-forum.com/u/Mister_Blood_R)\
**Replies:** 11\
**Last updated:** [May 2, 2008, 9:29pm UTC](https://www.ruby-forum.com/t/can-models-be-put-in-subfolders/135443 "2008-05-02T21:29:02Z")

</div>

I’m looking for ways to make my project file hierarchy look a bit neater, by joining what can be joined and removing what can be removed. I know now how to put controllers into subfolders (see my admin), but what abou…

---

## [Gloc bug?](https://www.ruby-forum.com/t/gloc-bug/77671)

<div class="topic-metadata">

**Author:** [@temesta](https://www.ruby-forum.com/u/temesta)\
**Replies:** 9\
**Last updated:** [May 2, 2008, 9:21pm UTC](https://www.ruby-forum.com/t/gloc-bug/77671 "2008-05-02T21:21:50Z")

</div>

Hi, I use Gloc plugin to create some localisation and it works great on my local webbrick server. Unfortunately It doesn’t work anymore when I upload the gloc dir to vendor/plugins on my host. I always get this error…

---

## [Recommendations/Tips on my first ROR project](https://www.ruby-forum.com/t/recommendations-tips-on-my-first-ror-project/136443)

<div class="topic-metadata">

**Author:** [@bench33](https://www.ruby-forum.com/u/bench33)\
**Replies:** 2\
**Last updated:** [May 2, 2008, 9:08pm UTC](https://www.ruby-forum.com/t/recommendations-tips-on-my-first-ror-project/136443 "2008-05-02T21:08:10Z")

</div>

hi! after reading/viewing few tutorials on ruby/ror, i’m about to start on my first ror project (and oop for that matter as I come from a procedural based language) i’d like to do away from storing the data in a regu…

---

## [Help me clean up UGLY code](https://www.ruby-forum.com/t/help-me-clean-up-ugly-code/136329)

<div class="topic-metadata">

**Author:** [@apswartz](https://www.ruby-forum.com/u/apswartz)\
**Replies:** 17\
**Last updated:** [May 2, 2008, 8:50pm UTC](https://www.ruby-forum.com/t/help-me-clean-up-ugly-code/136329 "2008-05-02T20:50:15Z")

</div>

In my controller, I have the following: def method1 displayList(:method1) end def method2 displayList(:method2) end def method3 displayList(:method3) end def method4 displayList(:method4) end def method5 di…

---

## [Transparent rounded corners](https://www.ruby-forum.com/t/transparent-rounded-corners/136494)

<div class="topic-metadata">

**Author:** [@joel](https://www.ruby-forum.com/u/joel)\
**Replies:** 2\
**Last updated:** [May 2, 2008, 7:43pm UTC](https://www.ruby-forum.com/t/transparent-rounded-corners/136494 "2008-05-02T19:43:30Z")

</div>

Hello Everyone, I’m trying to apply rounded corners to a div using ProtoCorner ( http://nurey.com/corners.html ). However my div has a transparent background and using the above script makes the background to the cor…

---

## [Recent Posts Design Question (class interaction)](https://www.ruby-forum.com/t/recent-posts-design-question-class-interaction/136493)

<div class="topic-metadata">

**Author:** [@summea](https://www.ruby-forum.com/u/summea)\
**Replies:** 2\
**Last updated:** [May 2, 2008, 6:20pm UTC](https://www.ruby-forum.com/t/recent-posts-design-question-class-interaction/136493 "2008-05-02T18:20:29Z")

</div>

Hi all, Well, I’ve been slowly starting to use Ruby on Rails over the past year but obviously haven’t learned very much yet. I’ve been developing a simple CMS website tool in Ruby (I know, there are already a lot of …

---

## [AJAX form refreshing page](https://www.ruby-forum.com/t/ajax-form-refreshing-page/136480)

<div class="topic-metadata">

**Author:** [@cumom](https://www.ruby-forum.com/u/cumom)\
**Replies:** 8\
**Last updated:** [May 2, 2008, 4:27pm UTC](https://www.ruby-forum.com/t/ajax-form-refreshing-page/136480 "2008-05-02T16:27:07Z")

</div>

I am trying to have a page submit a form and have the result update a div instead of reloading the page, but everything I try refreshes the page. I thought the :update part would prevent a page refresh, but perhaps I …

---

## [Select\_tag and selected value again](https://www.ruby-forum.com/t/select-tag-and-selected-value-again/136041)

<div class="topic-metadata">

**Author:** [@remcoh](https://www.ruby-forum.com/u/remcoh)\
**Replies:** 8\
**Last updated:** [May 2, 2008, 3:43pm UTC](https://www.ruby-forum.com/t/select-tag-and-selected-value-again/136041 "2008-05-02T15:43:30Z")

</div>

Many posts I found about this, and many possible solutions, but i just can’t get this simple thing to work: i tried every single solution i found: \<%=select\_tag “location”,options\_from\_collection\_for\_select(Location.…

---

## [TzTime's tz\_time\_attributes throwing errors?](https://www.ruby-forum.com/t/tztimes-tz-time-attributes-throwing-errors/136475)

<div class="topic-metadata">

**Author:** [@joergbattermann](https://www.ruby-forum.com/u/joergbattermann)\
**Replies:** 1\
**Last updated:** [May 2, 2008, 2:46pm UTC](https://www.ruby-forum.com/t/tztimes-tz-time-attributes-throwing-errors/136475 "2008-05-02T14:46:15Z")

</div>

Hello there, I was wondering whether someone of you uses the tz\_time\_attributes helper of Jamis B. to fix date(time) attributes of your ActiveRecord models? When I use it in e.g. an event model (with starttime/endtim…

---

## [GetText on Struct](https://www.ruby-forum.com/t/gettext-on-struct/136477)

<div class="topic-metadata">

**Author:** [@boblgum](https://www.ruby-forum.com/u/boblgum)\
**Replies:** 0\
**Last updated:** [May 2, 2008, 2:31pm UTC](https://www.ruby-forum.com/t/gettext-on-struct/136477 "2008-05-02T14:31:40Z")

</div>

hi @ll is it possible to mark whole struct for translation? something like: MyStrct = Struct.new(:code, :msg) SOME\_CONSTANT = N\_(MyStrct.new(“1515”, “Message to translate”)) … puts \_(SOME\_CONSTANT) may be u have a …

---

## [Undefined method \`view\_paths'](https://www.ruby-forum.com/t/undefined-method-view-paths/136471)

<div class="topic-metadata">

**Author:** [@stedwick](https://www.ruby-forum.com/u/stedwick)\
**Replies:** 1\
**Last updated:** [May 2, 2008, 1:42pm UTC](https://www.ruby-forum.com/t/undefined-method-view-paths/136471 "2008-05-02T13:42:05Z")

</div>

NoMethodError (undefined method \`view\_paths’ for #\<Affiliate: 0x2542548\>): Hi guys, what would usually cause this error? :stuck\_out\_tongue: Thanks!

---

## [Type both english and kannada in a single rhtml](https://www.ruby-forum.com/t/type-both-english-and-kannada-in-a-single-rhtml/136468)

<div class="topic-metadata">

**Author:** [@madhan](https://www.ruby-forum.com/u/madhan)\
**Replies:** 0\
**Last updated:** [May 2, 2008, 12:36pm UTC](https://www.ruby-forum.com/t/type-both-english-and-kannada-in-a-single-rhtml/136468 "2008-05-02T12:36:38Z")

</div>

hi all, i have one new.rhtml in my application which should take both english and kannada(one of the south indian language ) charectors… . Since this page may be published in web, how can i make my client to type bot…

---

## [Migrated products](https://www.ruby-forum.com/t/migrated-products/136465)

<div class="topic-metadata">

**Author:** [@vidya1111](https://www.ruby-forum.com/u/vidya1111)\
**Replies:** 0\
**Last updated:** [May 2, 2008, 11:54am UTC](https://www.ruby-forum.com/t/migrated-products/136465 "2008-05-02T11:54:29Z")

</div>

Hi all I am very inquisitive to know how many applications or sites that have been migrated to Ruby on Rails Any of you have idea where we can get this information?

---

## [HTTP\_REFERER can't be obtained](https://www.ruby-forum.com/t/http-referer-cant-be-obtained/136464)

<div class="topic-metadata">

**Author:** [@malioboro](https://www.ruby-forum.com/u/malioboro)\
**Replies:** 0\
**Last updated:** [May 2, 2008, 11:27am UTC](https://www.ruby-forum.com/t/http-referer-cant-be-obtained/136464 "2008-05-02T11:27:08Z")

</div>

I run request.env in view and no HTTP\_REFERER there. How i can get HTTP\_REFERER ? I trace using “Live HTTP Header” in Firefox, the referer is obtained. I tested to IE, Mozzila, Opera, Gecko & Firefox, the result is t…

---

## [Any function to decode utf-8 encoded text in ruby?](https://www.ruby-forum.com/t/any-function-to-decode-utf-8-encoded-text-in-ruby/136462)

<div class="topic-metadata">

**Author:** [@prasad](https://www.ruby-forum.com/u/prasad)\
**Replies:** 0\
**Last updated:** [May 2, 2008, 11:12am UTC](https://www.ruby-forum.com/t/any-function-to-decode-utf-8-encoded-text-in-ruby/136462 "2008-05-02T11:12:00Z")

</div>

Hello All, Is there any function to decode utf-8 encoded text in ruby?? I googled and found that Unicode::deocde should do this, but it’s not working?? Can anybody suggest me how to decode? Thanks, Prasad

---

## [May I develop RoR-website with the license other than GPL?](https://www.ruby-forum.com/t/may-i-develop-ror-website-with-the-license-other-than-gpl/136457)

<div class="topic-metadata">

**Author:** [@nop](https://www.ruby-forum.com/u/nop)\
**Replies:** 0\
**Last updated:** [May 2, 2008, 9:49am UTC](https://www.ruby-forum.com/t/may-i-develop-ror-website-with-the-license-other-than-gpl/136457 "2008-05-02T09:49:14Z")

</div>

May I develop RoR-website with the license other than GPL? For instance, apply JRuby to create a closed-source RoR-application?

---

## [Where do I place uploaded files?](https://www.ruby-forum.com/t/where-do-i-place-uploaded-files/136293)

<div class="topic-metadata">

**Author:** [@MohsinHijazee](https://www.ruby-forum.com/u/MohsinHijazee)\
**Replies:** 2\
**Last updated:** [May 2, 2008, 8:57am UTC](https://www.ruby-forum.com/t/where-do-i-place-uploaded-files/136293 "2008-05-02T08:57:11Z")

</div>

Hi! Where do I place the uploaded files? under public directory? If so, then its available to everybody. What should I do then?

---

## [Habtm or two foreign keys?](https://www.ruby-forum.com/t/habtm-or-two-foreign-keys/136421)

<div class="topic-metadata">

**Author:** [@janfoeh](https://www.ruby-forum.com/u/janfoeh)\
**Replies:** 2\
**Last updated:** [May 2, 2008, 8:23am UTC](https://www.ruby-forum.com/t/habtm-or-two-foreign-keys/136421 "2008-05-02T08:23:10Z")

</div>

Somehow I keep running into this problem in different projects … Say I want to represent soccer matches. A Match is associated with exactly two Teams, and keeps the score each team achieved. I see two choices: a) add…

---

## [How to create table with rake migrate](https://www.ruby-forum.com/t/how-to-create-table-with-rake-migrate/136450)

<div class="topic-metadata">

**Author:** [@mani](https://www.ruby-forum.com/u/mani)\
**Replies:** 1\
**Last updated:** [May 2, 2008, 8:22am UTC](https://www.ruby-forum.com/t/how-to-create-table-with-rake-migrate/136450 "2008-05-02T08:22:32Z")

</div>

what is the command to run rake migrate to create table i created model classified I have run command i have made changes in db/migrate/cerate\_classified.rb and run C:/ruby/book\>rake migrate but table has not been …

---

## [Ask libmysql.dll](https://www.ruby-forum.com/t/ask-libmysql-dll/136385)

<div class="topic-metadata">

**Author:** [@manika](https://www.ruby-forum.com/u/manika)\
**Replies:** 3\
**Last updated:** [May 2, 2008, 7:50am UTC](https://www.ruby-forum.com/t/ask-libmysql-dll/136385 "2008-05-02T07:50:13Z")

</div>

When I run controller http://127.0.0.1:3000/test it asks for libmysql.dll Errno::ECONNREFUSED in TestController#index No connection could be made because the target machine actively refused it. - connect(2) RAILS\_RO…

---

## [Setting filed with initial focus](https://www.ruby-forum.com/t/setting-filed-with-initial-focus/136390)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 1\
**Last updated:** [May 2, 2008, 6:53am UTC](https://www.ruby-forum.com/t/setting-filed-with-initial-focus/136390 "2008-05-02T06:53:10Z")

</div>

When I display a view for a new action I would like that a particular input field already have the focus for the user input. Is there a simple option that one can use to accomplish this?

---

## [NoMethodError in AdminController#index](https://www.ruby-forum.com/t/nomethoderror-in-admincontroller-index/136313)

<div class="topic-metadata">

**Author:** [@cornelombaard](https://www.ruby-forum.com/u/cornelombaard)\
**Replies:** 1\
**Last updated:** [May 2, 2008, 6:37am UTC](https://www.ruby-forum.com/t/nomethoderror-in-admincontroller-index/136313 "2008-05-02T06:37:48Z")

</div>

I am reading Agile Web D. with Rails and after setting everything up with the first application I get the following error: NoMethodError in AdminController#index undefined method \`scaffold I then installed the plugin …

---

## [Twitter leaving rails](https://www.ruby-forum.com/t/twitter-leaving-rails/136433)

<div class="topic-metadata">

**Author:** [@ADADAD](https://www.ruby-forum.com/u/ADADAD)\
**Replies:** 5\
**Last updated:** [May 2, 2008, 6:29am UTC](https://www.ruby-forum.com/t/twitter-leaving-rails/136433 "2008-05-02T06:29:44Z")

</div>

this is sure to shake up the rails community hard, mainly b/c people love using Twitter as the RoR prototype to make people feel comfortable. I think its a lot of overhype against RoR but it is what is is, we will …

---

## [Http://user:pass@some.url.com =\> how to access user, pass](https://www.ruby-forum.com/t/http-user-pass-some-url-com-how-to-access-user-pass/136444)

<div class="topic-metadata">

**Author:** [@Kip](https://www.ruby-forum.com/u/Kip)\
**Replies:** 0\
**Last updated:** [May 2, 2008, 6:25am UTC](https://www.ruby-forum.com/t/http-user-pass-some-url-com-how-to-access-user-pass/136444 "2008-05-02T06:25:03Z")

</div>

If I send a URL to Rails (via Mongrel in development mode) that includes the user:password credentials in the URL then I notice the URL helpers all produce URLs that include the credentials. However I cannot find a w…

---

## [Which of this Book authors have converted codes to Rails 2](https://www.ruby-forum.com/t/which-of-this-book-authors-have-converted-codes-to-rails-2/136360)

<div class="topic-metadata">

**Author:** [@webreservoir](https://www.ruby-forum.com/u/webreservoir)\
**Replies:** 3\
**Last updated:** [May 2, 2008, 5:48am UTC](https://www.ruby-forum.com/t/which-of-this-book-authors-have-converted-codes-to-rails-2/136360 "2008-05-02T05:48:13Z")

</div>

Which of this Book authors have converted codes to Rails 2.0.2…? Here is the List of books that offered great support for building a Real Life Web Tutorials along with Code in the past. (1) Rails Solutions — Friends …

---

## [:foreign\_key isnt work](https://www.ruby-forum.com/t/foreign-key-isnt-work/136414)

<div class="topic-metadata">

**Author:** [@malioboro](https://www.ruby-forum.com/u/malioboro)\
**Replies:** 6\
**Last updated:** [May 2, 2008, 4:26am UTC](https://www.ruby-forum.com/t/foreign-key-isnt-work/136414 "2008-05-02T04:26:03Z")

</div>

I have hotels, cars and invoices hotels has attribute invoice\_no in table cars has attribute invoice\_no in table I create like this : class Hotel \< ActiveRecord belongs\_to :invoice, :foreign\_key =\> ‘invoice\_no’ and …

---

## [Good place to host a rails app?](https://www.ruby-forum.com/t/good-place-to-host-a-rails-app/136434)

<div class="topic-metadata">

**Author:** [@gdoteof](https://www.ruby-forum.com/u/gdoteof)\
**Replies:** 1\
**Last updated:** [May 2, 2008, 3:56am UTC](https://www.ruby-forum.com/t/good-place-to-host-a-rails-app/136434 "2008-05-02T03:56:29Z")

</div>

I am having a hard time sorting through the available RoR compatible hosts. I am looking to get substruct http://code.google.com/p/substruct/ running. What we need to be able to do is quickly set up new stores, tha…

---

## [Rdoc and ri](https://www.ruby-forum.com/t/rdoc-and-ri/136425)

<div class="topic-metadata">

**Author:** [@MercedesAMG](https://www.ruby-forum.com/u/MercedesAMG)\
**Replies:** 1\
**Last updated:** [May 2, 2008, 3:48am UTC](https://www.ruby-forum.com/t/rdoc-and-ri/136425 "2008-05-02T03:48:53Z")

</div>

I installed rails and it runs perfectly using the following command sudo gem install rails but i was supposed to run … sudo gem install rails --no-rdoc --no-ri this is to avoid memory problems I assume that that rdo…

---

## [Sorting group\_by](https://www.ruby-forum.com/t/sorting-group-by/136435)

<div class="topic-metadata">

**Author:** [@lelio98](https://www.ruby-forum.com/u/lelio98)\
**Replies:** 1\
**Last updated:** [May 2, 2008, 2:53am UTC](https://www.ruby-forum.com/t/sorting-group-by/136435 "2008-05-02T02:53:17Z")

</div>

I have ran into a stumbling block sorting a group\_by In my model, I have defined a method called “due\_by\_in\_words”, this method returns a hash with a :key and a :value based on a number of elsif statements. {:key =\> …

---

## [Changing text in view with variables](https://www.ruby-forum.com/t/changing-text-in-view-with-variables/136430)

<div class="topic-metadata">

**Author:** [@OhMyRuby](https://www.ruby-forum.com/u/OhMyRuby)\
**Replies:** 5\
**Last updated:** [May 2, 2008, 2:43am UTC](https://www.ruby-forum.com/t/changing-text-in-view-with-variables/136430 "2008-05-02T02:43:21Z")

</div>

in my view: \<% if @main\_singer\_1 == @your\_singer %\> \<% if @main\_drummer\_1 == @your\_drummer %\> i want to have this in a loop so i can change \_1 How would I do this. I have some idea but I am not sure. \[1…20\].each do…

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

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