# Rails

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

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

---

## [Value of a list](https://www.ruby-forum.com/t/value-of-a-list/104198)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [May 15, 2007, 12:34pm UTC](https://www.ruby-forum.com/t/value-of-a-list/104198 "2007-05-15T12:34:09Z")

</div>

Hi all, I am a newbie. Those are little technical questions that will look simple to me after a little while. But for the moment I am stuck. I have a select list which I use to list the a marees table \<%= select ‘cli…

---

## [Uploading entire directories](https://www.ruby-forum.com/t/uploading-entire-directories/104119)

<div class="topic-metadata">

**Author:** [@Rigger\_Bone\_S](https://www.ruby-forum.com/u/Rigger_Bone_S)\
**Replies:** 2\
**Last updated:** [May 15, 2007, 12:18pm UTC](https://www.ruby-forum.com/t/uploading-entire-directories/104119 "2007-05-15T12:18:59Z")

</div>

Did google a while, but didn’t find a simple, clean solution for uploading whole, entire directoriy/ies with Rails. Is there any ? Rigger – : : i’m a climber : :

---

## [Observing HABTM-associations with observers](https://www.ruby-forum.com/t/observing-habtm-associations-with-observers/104194)

<div class="topic-metadata">

**Author:** [@pixellover](https://www.ruby-forum.com/u/pixellover)\
**Replies:** 0\
**Last updated:** [May 15, 2007, 9:52am UTC](https://www.ruby-forum.com/t/observing-habtm-associations-with-observers/104194 "2007-05-15T09:52:27Z")

</div>

I’m trying to write an observer which tracks changes to my data. This seems to be an impossible for habtm-associations as all hooks in an observer just works for models. As habtm-associatons gets saved when they’re ad…

---

## [Got "Unicode Numeric Entity Codes" after to\_xml](https://www.ruby-forum.com/t/got-unicode-numeric-entity-codes-after-to-xml/104182)

<div class="topic-metadata">

**Author:** [@Datou](https://www.ruby-forum.com/u/Datou)\
**Replies:** 1\
**Last updated:** [May 15, 2007, 9:46am UTC](https://www.ruby-forum.com/t/got-unicode-numeric-entity-codes-after-to-xml/104182 "2007-05-15T09:46:27Z")

</div>

Can I get REAL unicode characters after to\_xml? Thanks!

---

## [Simple rails url question](https://www.ruby-forum.com/t/simple-rails-url-question/104161)

<div class="topic-metadata">

**Author:** [@pingu](https://www.ruby-forum.com/u/pingu)\
**Replies:** 2\
**Last updated:** [May 15, 2007, 9:11am UTC](https://www.ruby-forum.com/t/simple-rails-url-question/104161 "2007-05-15T09:11:27Z")

</div>

Hi, how do i have my rails index page at www.thing.com, and not www.thing.com/controller. Is this done in the routes.rb? if so, how? Thanks

---

## [ActiveResource and RESful edit](https://www.ruby-forum.com/t/activeresource-and-resful-edit/104142)

<div class="topic-metadata">

**Author:** [@jason](https://www.ruby-forum.com/u/jason)\
**Replies:** 6\
**Last updated:** [May 15, 2007, 9:01am UTC](https://www.ruby-forum.com/t/activeresource-and-resful-edit/104142 "2007-05-15T09:01:09Z")

</div>

Hi I’d like to know how to have ActiveResource generate a URL for the /teams/1/edit type of resource. I’ve got custom\_methods.rb and have used Team.find(1).get(:edit) This generates http://localhost:xxxx/teams/1/e…

---

## [Functional vs integration tests with restful\_auth](https://www.ruby-forum.com/t/functional-vs-integration-tests-with-restful-auth/104162)

<div class="topic-metadata">

**Author:** [@johanatan](https://www.ruby-forum.com/u/johanatan)\
**Replies:** 1\
**Last updated:** [May 15, 2007, 8:33am UTC](https://www.ruby-forum.com/t/functional-vs-integration-tests-with-restful-auth/104162 "2007-05-15T08:33:08Z")

</div>

Hi, in functional/projects\_controller\_test.rb def test\_should\_show\_project\_home\_page\_as\_public\_exists get :show, :id =\> 2 assert\_redirected\_to :controller =\> ‘pages’, :action =\> ‘show’, ‘id’ =\> ‘home’, :project\_id =\> …

---

## [Best Practice: render :partial](https://www.ruby-forum.com/t/best-practice-render-partial/104192)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [May 15, 2007, 8:25am UTC](https://www.ruby-forum.com/t/best-practice-render-partial/104192 "2007-05-15T08:25:06Z")

</div>

I have been using “render :partial” throughout my application but have just realised that I am perhaps not using it in the way intended. I am for example referencing instance variables directly within my partial and n…

---

## [How to include another rhtml from an rhtml (no controller)](https://www.ruby-forum.com/t/how-to-include-another-rhtml-from-an-rhtml-no-controller/104190)

<div class="topic-metadata">

**Author:** [@vinsonizer](https://www.ruby-forum.com/u/vinsonizer)\
**Replies:** 2\
**Last updated:** [May 15, 2007, 8:06am UTC](https://www.ruby-forum.com/t/how-to-include-another-rhtml-from-an-rhtml-no-controller/104190 "2007-05-15T08:06:05Z")

</div>

I’m trying to do something simple like… In \_email\_header.rhtml \<% include “header.rhtml” %\> Where \_header.rhtml looks like … \<%= image\_tag "logo.gif", :class =\> "logostyle" %\> Request Servic…

---

## [Setting P3P header before Set-Cookie](https://www.ruby-forum.com/t/setting-p3p-header-before-set-cookie/103859)

<div class="topic-metadata">

**Author:** [@mlopke](https://www.ruby-forum.com/u/mlopke)\
**Replies:** 5\
**Last updated:** [May 15, 2007, 6:34am UTC](https://www.ruby-forum.com/t/setting-p3p-header-before-set-cookie/103859 "2007-05-15T06:34:59Z")

</div>

Hi folks, For a project I’m working on, I need to set an HTTP header BEFORE the Set-Cookie header is sent. Basically, I need to send along our compact privacy policy before the cookie is set. I’ve tried using: @hea…

---

## [Custom Site Rule](https://www.ruby-forum.com/t/custom-site-rule/104171)

<div class="topic-metadata">

**Author:** [@laurin1](https://www.ruby-forum.com/u/laurin1)\
**Replies:** 1\
**Last updated:** [May 15, 2007, 5:53am UTC](https://www.ruby-forum.com/t/custom-site-rule/104171 "2007-05-15T05:53:53Z")

</div>

Hi, I am looking for an approach to do the following. I have an app which will serve multiple accounts. In many cases they will use the same views. The public part of each account is served by a public controller, so…

---

## [Chinese characters become to &#3342 after "to\_xml"](https://www.ruby-forum.com/t/chinese-characters-become-to-3342-after-to-xml/104083)

<div class="topic-metadata">

**Author:** [@Datou](https://www.ruby-forum.com/u/Datou)\
**Replies:** 2\
**Last updated:** [May 15, 2007, 5:26am UTC](https://www.ruby-forum.com/t/chinese-characters-become-to-3342-after-to-xml/104083 "2007-05-15T05:26:51Z")

</div>

Why? Browser can translate &#xxxx; into Chinese, but I want to get the real UTF-8 Chinese characters. Please kindly help, thanks!

---

## [Need help on writing a \[simple?\] query](https://www.ruby-forum.com/t/need-help-on-writing-a-simple-query/104159)

<div class="topic-metadata">

**Author:** [@vince](https://www.ruby-forum.com/u/vince)\
**Replies:** 5\
**Last updated:** [May 15, 2007, 5:05am UTC](https://www.ruby-forum.com/t/need-help-on-writing-a-simple-query/104159 "2007-05-15T05:05:36Z")

</div>

Hi. Can someone help me get started on writing a query? I’m getting tripped up on this. I basically just need to query and display all courses that have at least one ‘instructor\_confirmed’. The table structure is s…

---

## [Link\_to\_remote with :confirm...need syntax help](https://www.ruby-forum.com/t/link-to-remote-with-confirm-need-syntax-help/104180)

<div class="topic-metadata">

**Author:** [@suer\_rick](https://www.ruby-forum.com/u/suer_rick)\
**Replies:** 1\
**Last updated:** [May 15, 2007, 4:46am UTC](https://www.ruby-forum.com/t/link-to-remote-with-confirm-need-syntax-help/104180 "2007-05-15T04:46:47Z")

</div>

What is the syntax to use :confirm with link\_to\_remote? This doesn’t work, I’ve tried a few permutations, with no success: \<%= link\_to\_remote( "X", :update =\> 'address\_list', :url =\> { :controller =\> '…

---

## [ActionMailer not having to render message for each recipient](https://www.ruby-forum.com/t/actionmailer-not-having-to-render-message-for-each-recipient/104169)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 2\
**Last updated:** [May 15, 2007, 1:01am UTC](https://www.ruby-forum.com/t/actionmailer-not-having-to-render-message-for-each-recipient/104169 "2007-05-15T01:01:54Z")

</div>

Hi, I was wondering if there was a way for actionmailer to not have to render a new email message and send it seperately for each user when everything stays the same except for one or two things.

---

## [Counter Problem](https://www.ruby-forum.com/t/counter-problem/104139)

<div class="topic-metadata">

**Author:** [@asetzler](https://www.ruby-forum.com/u/asetzler)\
**Replies:** 3\
**Last updated:** [May 15, 2007, 12:44am UTC](https://www.ruby-forum.com/t/counter-problem/104139 "2007-05-15T00:44:30Z")

</div>

Hi. I have a problem with counters in Rails. The situation looks like this: -3 simple models class Forum \< ActiveRecord::Base has\_many :posts end class Topic \< ActiveRecord::Base has\_many :posts end class Post \< …

---

## [Recognize\_path and map.resources](https://www.ruby-forum.com/t/recognize-path-and-map-resources/104160)

<div class="topic-metadata">

**Author:** [@johanatan](https://www.ruby-forum.com/u/johanatan)\
**Replies:** 1\
**Last updated:** [May 15, 2007, 12:43am UTC](https://www.ruby-forum.com/t/recognize-path-and-map-resources/104160 "2007-05-15T00:43:30Z")

</div>

hi, in script/console, when i do \>\> rs = ActionController::Routing::Routes \>\> puts rs.routes the list includes GET /projects/ {:controller=\>“projects”, :action=\>“index”} but rs.recognize\_path “/projects/” A…

---

## [Paris hilton going to jail](https://www.ruby-forum.com/t/paris-hilton-going-to-jail/104173)

<div class="topic-metadata">

**Author:** [@foto](https://www.ruby-forum.com/u/foto)\
**Replies:** 0\
**Last updated:** [May 15, 2007, 12:21am UTC](https://www.ruby-forum.com/t/paris-hilton-going-to-jail/104173 "2007-05-15T00:21:28Z")

</div>

Paris hilton going to jail http://www.teenwag.com/playvideo/5257

---

## [New to Rails, hopefully this is an easy one](https://www.ruby-forum.com/t/new-to-rails-hopefully-this-is-an-easy-one/104163)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [May 14, 2007, 11:53pm UTC](https://www.ruby-forum.com/t/new-to-rails-hopefully-this-is-an-easy-one/104163 "2007-05-14T23:53:25Z")

</div>

I’m looking to bring up 3 different rails apps on one box. Each as a subdomain. app1.site.edu app2.site.edu app3.site.edu I won’t have to worry about speed, load, etc., as I’m just looking to test them with a smal…

---

## [Testing](https://www.ruby-forum.com/t/testing/104099)

<div class="topic-metadata">

**Author:** [@gino](https://www.ruby-forum.com/u/gino)\
**Replies:** 9\
**Last updated:** [May 14, 2007, 10:20pm UTC](https://www.ruby-forum.com/t/testing/104099 "2007-05-14T22:20:08Z")

</div>

what’s the difference beween testin the rails way, or just using the the browser? I don’t like testing, I don’t know how, and it will take time for me to learn it if using the browser is the same as testing? then I’m…

---

## [For sale - RailsConf ticket](https://www.ruby-forum.com/t/for-sale-railsconf-ticket/104158)

<div class="topic-metadata">

**Author:** [@mrkohrea](https://www.ruby-forum.com/u/mrkohrea)\
**Replies:** 0\
**Last updated:** [May 14, 2007, 9:45pm UTC](https://www.ruby-forum.com/t/for-sale-railsconf-ticket/104158 "2007-05-14T21:45:55Z")

</div>

Hi folks, Pardon me if this is inappropriate to post here. If there are other forums that are better suited please let me know. I have a ticket for sale for the sold out rails conference this upcoming week. If you’r…

---

## [\[ADV\] New book: The Accessible Web](https://www.ruby-forum.com/t/adv-new-book-the-accessible-web/104154)

<div class="topic-metadata">

**Author:** [@dirtytree](https://www.ruby-forum.com/u/dirtytree)\
**Replies:** 1\
**Last updated:** [May 14, 2007, 9:25pm UTC](https://www.ruby-forum.com/t/adv-new-book-the-accessible-web/104154 "2007-05-14T21:25:52Z")

</div>

Gentle Web D. Folk: Just in time for RailsConf, I’m happy to announce Jeremy Sydik’s book, “The Accessible Web”, is now available in beta. This is particularly sweet as Jeremy and I first discussed this book in the h…

---

## [Ruby and Rails Ruined my life](https://www.ruby-forum.com/t/ruby-and-rails-ruined-my-life/104147)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 5\
**Last updated:** [May 14, 2007, 9:15pm UTC](https://www.ruby-forum.com/t/ruby-and-rails-ruined-my-life/104147 "2007-05-14T21:15:51Z")

</div>

I’m a PHP developer by trade. I work w/ MVC architecture with a framework built by a friend of mine. And I used to think it was amazind developing with it. And in a backwards fashion, I met rails… Who introduced me …

---

## [Authentication for 2 models](https://www.ruby-forum.com/t/authentication-for-2-models/104079)

<div class="topic-metadata">

**Author:** [@jko170](https://www.ruby-forum.com/u/jko170)\
**Replies:** 3\
**Last updated:** [May 14, 2007, 9:02pm UTC](https://www.ruby-forum.com/t/authentication-for-2-models/104079 "2007-05-14T21:02:49Z")

</div>

I’ve got 2 models: School and Student I’m using restful authentication for school so when someone signs up they are routed to schools/new The schools table has info for an admin, but I also need authentication for st…

---

## [First Rails Project](https://www.ruby-forum.com/t/first-rails-project/104151)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [May 14, 2007, 8:31pm UTC](https://www.ruby-forum.com/t/first-rails-project/104151 "2007-05-14T20:31:46Z")

</div>

I’ve gone through endless tutorials, and I’ve made basic apps, I was wondering if anyone is interested in building a little APP i was going to do in PHP, but I thought it would be a cool first rails project. It’s not …

---

## [Syntax to invoke form.check\_box for elements of a hash](https://www.ruby-forum.com/t/syntax-to-invoke-form-check-box-for-elements-of-a-hash/104148)

<div class="topic-metadata">

**Author:** [@jhwinters](https://www.ruby-forum.com/u/jhwinters)\
**Replies:** 0\
**Last updated:** [May 14, 2007, 8:02pm UTC](https://www.ruby-forum.com/t/syntax-to-invoke-form-check-box-for-elements-of-a-hash/104148 "2007-05-14T20:02:43Z")

</div>

I have a model which contains a hash of boolean items, like this: @role\_flags={“Owner”=\>0, “Administrator”=\>0, “User”=\>0, “Teacher”=\>0, “HoD”=\>0, “Timetabler”=\>0} I would like to use form.check\_box to generate check\_b…

---

## [Using an AR Model to Specify and Store Complex Searches](https://www.ruby-forum.com/t/using-an-ar-model-to-specify-and-store-complex-searches/104024)

<div class="topic-metadata">

**Author:** [@dasil003](https://www.ruby-forum.com/u/dasil003)\
**Replies:** 4\
**Last updated:** [May 14, 2007, 8:01pm UTC](https://www.ruby-forum.com/t/using-an-ar-model-to-specify-and-store-complex-searches/104024 "2007-05-14T20:01:43Z")

</div>

For a recent project I’ve had to create very complex search forms that were core to the application. Because I wanted the ability to save searches I decide that the search itself should be represented as a model, but…

---

## [Best way to thin out controller](https://www.ruby-forum.com/t/best-way-to-thin-out-controller/104143)

<div class="topic-metadata">

**Author:** [@vinnie](https://www.ruby-forum.com/u/vinnie)\
**Replies:** 6\
**Last updated:** [May 14, 2007, 7:57pm UTC](https://www.ruby-forum.com/t/best-way-to-thin-out-controller/104143 "2007-05-14T19:57:42Z")

</div>

Sorry for such a nub question but How would I move the majority of this logic to the model? def save\_sub page = Page.find(params\[:id\]) subpage = page.children.create(params\[:form\]) if subpage.save flash\[:notice\] =…

---

## [NOOB question RSPEC](https://www.ruby-forum.com/t/noob-question-rspec/104122)

<div class="topic-metadata">

**Author:** [@Fefo](https://www.ruby-forum.com/u/Fefo)\
**Replies:** 1\
**Last updated:** [May 14, 2007, 7:53pm UTC](https://www.ruby-forum.com/t/noob-question-rspec/104122 "2007-05-14T19:53:42Z")

</div>

Hi all !! I have this code: require ‘account’ describe Account, “when first created” do before do @account = Account.new end it “should have a balance of $0” do @account.balance.should eql(Money.new(0, :dollars)) …

---

## [Splitting resources or not](https://www.ruby-forum.com/t/splitting-resources-or-not/104092)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 1\
**Last updated:** [May 14, 2007, 7:07pm UTC](https://www.ruby-forum.com/t/splitting-resources-or-not/104092 "2007-05-14T19:07:35Z")

</div>

I have a resource named ‘users’ and another one ‘posts’, but these one can have ‘offers’ or ‘requests’… shouild I define 2 other resources or keep only one, using something like : map.resources :users, :collection =\>…

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

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