# Rails

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

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

---

## [Restful\_authentication with web services](https://www.ruby-forum.com/t/restful-authentication-with-web-services/91155)

<div class="topic-metadata">

**Author:** [@webguy7890](https://www.ruby-forum.com/u/webguy7890)\
**Replies:** 0\
**Last updated:** [April 5, 2007, 6:27am UTC](https://www.ruby-forum.com/t/restful-authentication-with-web-services/91155 "2007-04-05T06:27:51Z")

</div>

hi, i have a question about using rails 1.2 for restful web services. with the new features, it’s really easy to get the results in xml. however, i am struggling to have a login system to authenticate the user. i am…

---

## [Having trouble editing self-reference join model attribute](https://www.ruby-forum.com/t/having-trouble-editing-self-reference-join-model-attribute/91154)

<div class="topic-metadata">

**Author:** [@shinkaku](https://www.ruby-forum.com/u/shinkaku)\
**Replies:** 0\
**Last updated:** [April 5, 2007, 6:10am UTC](https://www.ruby-forum.com/t/having-trouble-editing-self-reference-join-model-attribute/91154 "2007-04-05T06:10:59Z")

</div>

I’m a newbie in rails and working on my first project with it. I have a database that uses a self reference through a join model to add favorite players. In the join model I have an additional attribute for players to…

---

## [Rails applications deployed as subdomains of Rails applicati](https://www.ruby-forum.com/t/rails-applications-deployed-as-subdomains-of-rails-applicati/91113)

<div class="topic-metadata">

**Author:** [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Replies:** 1\
**Last updated:** [April 5, 2007, 6:07am UTC](https://www.ruby-forum.com/t/rails-applications-deployed-as-subdomains-of-rails-applicati/91113 "2007-04-05T06:07:48Z")

</div>

Sorry about the subject line, but I couldn’t think of a better way to state my problem. I’ve got a Rails app deployed at www.main-domain.com. I need to deploy copies of that app to subdomains like sub1.main-domain.co…

---

## [Finding highest value in a Hash](https://www.ruby-forum.com/t/finding-highest-value-in-a-hash/91049)

<div class="topic-metadata">

**Author:** [@d6veteran](https://www.ruby-forum.com/u/d6veteran)\
**Replies:** 5\
**Last updated:** [April 5, 2007, 5:24am UTC](https://www.ruby-forum.com/t/finding-highest-value-in-a-hash/91049 "2007-04-05T05:24:59Z")

</div>

I have a hash where the values are numbers. After I build the hash I want to get the key back that has the largest number as a value. So for example: I build the hash and add to the values - results = Hash.new(0) sc…

---

## [How to Create Data in Rails App using Inbound Email includin](https://www.ruby-forum.com/t/how-to-create-data-in-rails-app-using-inbound-email-includin/102733)

<div class="topic-metadata">

**Author:** [@nathandelane](https://www.ruby-forum.com/u/nathandelane)\
**Replies:** 1\
**Last updated:** [April 5, 2007, 5:18am UTC](https://www.ruby-forum.com/t/how-to-create-data-in-rails-app-using-inbound-email-includin/102733 "2007-04-05T05:18:46Z")

</div>

I am trying to create a feature within my application to receive product data including an image attachment via inbound email. Can someone point me to a tutorial or other document online that will help out with this. …

---

## [Joining across databases in a find statement with include (l](https://www.ruby-forum.com/t/joining-across-databases-in-a-find-statement-with-include-l/91114)

<div class="topic-metadata">

**Author:** [@arjackson](https://www.ruby-forum.com/u/arjackson)\
**Replies:** 4\
**Last updated:** [April 5, 2007, 5:17am UTC](https://www.ruby-forum.com/t/joining-across-databases-in-a-find-statement-with-include-l/91114 "2007-04-05T05:17:46Z")

</div>

Hi, I have a legacy database ‘old’ and a new database ‘new’ which rails uses. I set up models using old with establish\_connection(old), and this works well, except for include: class OldModel \< ActiveRecord::Base e…

---

## [Strange web service testing problems](https://www.ruby-forum.com/t/strange-web-service-testing-problems/89752)

<div class="topic-metadata">

**Author:** [@michael](https://www.ruby-forum.com/u/michael)\
**Replies:** 1\
**Last updated:** [April 5, 2007, 4:45am UTC](https://www.ruby-forum.com/t/strange-web-service-testing-problems/89752 "2007-04-05T04:45:42Z")

</div>

I seem to be having some strange problems with functionally testing web services. For some reason when I assert\_routing of a web service called test with a method test: options = {:controller =\> “test”, :action =\> “t…

---

## [Freelance Rails Developer Wanted](https://www.ruby-forum.com/t/freelance-rails-developer-wanted/91109)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 7\
**Last updated:** [April 5, 2007, 2:56am UTC](https://www.ruby-forum.com/t/freelance-rails-developer-wanted/91109 "2007-04-05T02:56:32Z")

</div>

Hello, I hope it’s ok to be posting this here. I’m looking for an experienced Rails developer to take on a fairly simple project and possibly many others in the future. I have the entire project written down and I’m …

---

## [Page Caching appears to cause certain actions to render blan](https://www.ruby-forum.com/t/page-caching-appears-to-cause-certain-actions-to-render-blan/90928)

<div class="topic-metadata">

**Author:** [@tharealpatton](https://www.ruby-forum.com/u/tharealpatton)\
**Replies:** 6\
**Last updated:** [April 5, 2007, 2:53am UTC](https://www.ruby-forum.com/t/page-caching-appears-to-cause-certain-actions-to-render-blan/90928 "2007-04-05T02:53:32Z")

</div>

Hi, I’m wondering if anyone else has experienced this… I have a controller with three actions, and I want to cache only the action named index. At the top of the controller I have: caches\_page :index The index acti…

---

## [Ruby on Rails bachelor thesis](https://www.ruby-forum.com/t/ruby-on-rails-bachelor-thesis/88701)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 10\
**Last updated:** [April 5, 2007, 2:49am UTC](https://www.ruby-forum.com/t/ruby-on-rails-bachelor-thesis/88701 "2007-04-05T02:49:31Z")

</div>

Dear Rubyists, This year I have to write my bachelor thesis for my Informatics study and I want to perform research regarding RoR. However, I have no concrete idea or subject which I can use. So my question to you is, …

---

## [Regular expression and routing](https://www.ruby-forum.com/t/regular-expression-and-routing/91142)

<div class="topic-metadata">

**Author:** [@ehudros](https://www.ruby-forum.com/u/ehudros)\
**Replies:** 1\
**Last updated:** [April 5, 2007, 2:38am UTC](https://www.ruby-forum.com/t/regular-expression-and-routing/91142 "2007-04-05T02:38:04Z")

</div>

Hi everyone, I’m struggling to get my routing as I want it… I want to create a regular expression that will only allow the controller/action to be executed if the subdomain is not ‘www’. I have soemthing like this: …

---

## [Login\_engine database migration broken?](https://www.ruby-forum.com/t/login-engine-database-migration-broken/93936)

<div class="topic-metadata">

**Author:** [@adambeazley](https://www.ruby-forum.com/u/adambeazley)\
**Replies:** 3\
**Last updated:** [April 5, 2007, 2:33am UTC](https://www.ruby-forum.com/t/login-engine-database-migration-broken/93936 "2007-04-05T02:33:40Z")

</div>

I’m trying to install the login\_engine. I installed the engine system and the login\_engine, and now I’m trying to migrate the database schema, as detailed here: http://api.rails-engines.org/login\_engine/. The commands…

---

## [Flash hash with ajax and redirect\_to](https://www.ruby-forum.com/t/flash-hash-with-ajax-and-redirect-to/91141)

<div class="topic-metadata">

**Author:** [@Invincible\_C](https://www.ruby-forum.com/u/Invincible_C)\
**Replies:** 0\
**Last updated:** [April 5, 2007, 2:28am UTC](https://www.ruby-forum.com/t/flash-hash-with-ajax-and-redirect-to/91141 "2007-04-05T02:28:29Z")

</div>

Hi, I have a method in a controller which I am calling by using link\_to\_remote with update option. The method performs some operations, sets the status message in the flash hash as flash\[:notice\], and then redirect…

---

## [Unique Boolean Condition Constraint](https://www.ruby-forum.com/t/unique-boolean-condition-constraint/91139)

<div class="topic-metadata">

**Author:** [@preston](https://www.ruby-forum.com/u/preston)\
**Replies:** 0\
**Last updated:** [April 5, 2007, 2:15am UTC](https://www.ruby-forum.com/t/unique-boolean-condition-constraint/91139 "2007-04-05T02:15:29Z")

</div>

I’d like to add a unique constraint (via add\_index or something similar) in a migration which works off two columns, one of which is boolean and must be true for the constraint to hold. Something like… add\_index …

---

## [Two redirect\_to from one action](https://www.ruby-forum.com/t/two-redirect-to-from-one-action/91136)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 2\
**Last updated:** [April 5, 2007, 1:57am UTC](https://www.ruby-forum.com/t/two-redirect-to-from-one-action/91136 "2007-04-05T01:57:27Z")

</div>

I have a ‘login’ action that I would like to simultaneously move to the next page and to open a separate popup window for a time clock function. I can easily create a popup window from a clickable link but essentially…

---

## [Re: flash message not shown after redirect\_to](https://www.ruby-forum.com/t/re-flash-message-not-shown-after-redirect-to/91128)

<div class="topic-metadata">

**Author:** [@blakeage](https://www.ruby-forum.com/u/blakeage)\
**Replies:** 1\
**Last updated:** [April 5, 2007, 1:16am UTC](https://www.ruby-forum.com/t/re-flash-message-not-shown-after-redirect-to/91128 "2007-04-05T01:16:25Z")

</div>

Ehud, I think I know what’s going on here. Think of redirect\_to like a render() call that just sends a response which causes the browser to request the page you passed to redirect\_to. There are 3 request/response cy…

---

## [Flash message not shown after redirect\_to](https://www.ruby-forum.com/t/flash-message-not-shown-after-redirect-to/91107)

<div class="topic-metadata">

**Author:** [@ehudros](https://www.ruby-forum.com/u/ehudros)\
**Replies:** 7\
**Last updated:** [April 5, 2007, 1:14am UTC](https://www.ruby-forum.com/t/flash-message-not-shown-after-redirect-to/91107 "2007-04-05T01:14:25Z")

</div>

Hi everyone… I’m new to rails and trying to set up error messages via the flash mechanism. I have method in my application.rb file that tries to find the current subdomain the user is accessing (eg: ehud.localhost.co…

---

## [Simple RJS Calls Not Working](https://www.ruby-forum.com/t/simple-rjs-calls-not-working/91129)

<div class="topic-metadata">

**Author:** [@Daniel\_Curran](https://www.ruby-forum.com/u/Daniel_Curran)\
**Replies:** 2\
**Last updated:** [April 5, 2007, 12:45am UTC](https://www.ruby-forum.com/t/simple-rjs-calls-not-working/91129 "2007-04-05T00:45:22Z")

</div>

I have a simlple view: Tags \<% unless @recipe.tags.empty? %\> \<%= render :partial=\>'tags/tag', :collection=\>@recipe.tags %\> \<% end %\> \<% form\_remote\_tag :url=\>tags\_path(@recipe) d…

---

## [Status: 500 Internal Server Error - A session\_key is require](https://www.ruby-forum.com/t/status-500-internal-server-error-a-session-key-is-require/102738)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 7\
**Last updated:** [April 4, 2007, 10:59pm UTC](https://www.ruby-forum.com/t/status-500-internal-server-error-a-session-key-is-require/102738 "2007-04-04T22:59:11Z")

</div>

Hi, Anyone seen this error / have any suggestions here? I basically did a “cap deploy” to dreamhost but I’m now getting this in the “production.log” when trying to run up the application. The key things I changed …

---

## [Order a find using a has\_many association](https://www.ruby-forum.com/t/order-a-find-using-a-has-many-association/91108)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [April 4, 2007, 10:47pm UTC](https://www.ruby-forum.com/t/order-a-find-using-a-has-many-association/91108 "2007-04-04T22:47:20Z")

</div>

I’m trying to order a find through a has\_many association. I have a model called SalesOrder. Each sales order has things like amount, description, etc. I use the following to get the Sales Orders: @sales\_orders = S…

---

## [Db:migrate:engines task missing (svn externals install)](https://www.ruby-forum.com/t/dbengines-task-missing-svn-externals-install/58557)

<div class="topic-metadata">

**Author:** [@hatless](https://www.ruby-forum.com/u/hatless)\
**Replies:** 2\
**Last updated:** [April 4, 2007, 10:40pm UTC](https://www.ruby-forum.com/t/dbengines-task-missing-svn-externals-install/58557 "2007-04-04T22:40:41Z")

</div>

On my main development machine I have several apps. One uses a fixed version of engines installed via script\\plugin and explicitly runs under Rails 1.0 in environment.rb. User and Login engines run fine. For a new app…

---

## [:include and conditions](https://www.ruby-forum.com/t/include-and-conditions/91125)

<div class="topic-metadata">

**Author:** [@jason](https://www.ruby-forum.com/u/jason)\
**Replies:** 0\
**Last updated:** [April 4, 2007, 10:36pm UTC](https://www.ruby-forum.com/t/include-and-conditions/91125 "2007-04-04T22:36:30Z")

</div>

What is wrong with the following: @sales\_orders = SalesOrder.find(:all, :include =\> \[:histories, :routes\], :order =\> ‘routes.name ASC’) That should give me a list of all sales orders sorted by route\_id, which comes t…

---

## [Can I capture the SQL generated from a query?](https://www.ruby-forum.com/t/can-i-capture-the-sql-generated-from-a-query/91046)

<div class="topic-metadata">

**Author:** [@pergesu](https://www.ruby-forum.com/u/pergesu)\
**Replies:** 8\
**Last updated:** [April 4, 2007, 10:23pm UTC](https://www.ruby-forum.com/t/can-i-capture-the-sql-generated-from-a-query/91046 "2007-04-04T22:23:08Z")

</div>

I want to get the SQL string that was used in a AR query…I know that I can just look in the log, but I want to do it programmatically. ActiveRecord.sql\_from { User.find(:all) } =\> “SELECT \* FROM users” kinda thin…

---

## [Getting aditional data from auto\_complete](https://www.ruby-forum.com/t/getting-aditional-data-from-auto-complete/91119)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 1\
**Last updated:** [April 4, 2007, 10:06pm UTC](https://www.ruby-forum.com/t/getting-aditional-data-from-auto-complete/91119 "2007-04-04T22:06:22Z")

</div>

Hi again. I’m using auto\_complete to search people in my DB. I have one input field with auto\_complete that search and shows first\_name and last\_name. So, showing first and last name is good for the view but in my co…

---

## [Deploying Rails app in subdomains of Rails app](https://www.ruby-forum.com/t/deploying-rails-app-in-subdomains-of-rails-app/91120)

<div class="topic-metadata">

**Author:** [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Replies:** 0\
**Last updated:** [April 4, 2007, 9:38pm UTC](https://www.ruby-forum.com/t/deploying-rails-app-in-subdomains-of-rails-app/91120 "2007-04-04T21:38:02Z")

</div>

Hi, I’ve got a Rails app deployed at www.main-domain.com. I need to deploy copies of that app to subdomains like sub1.main-domain.com, sub2.main-domain.com, etc. Each subdomain could use the same app code, but each…

---

## [===.() not being called in case statement](https://www.ruby-forum.com/t/not-being-called-in-case-statement/91058)

<div class="topic-metadata">

**Author:** [@monki](https://www.ruby-forum.com/u/monki)\
**Replies:** 4\
**Last updated:** [April 4, 2007, 9:25pm UTC](https://www.ruby-forum.com/t/not-being-called-in-case-statement/91058 "2007-04-04T21:25:01Z")

</div>

I’ve been trying to get the open\_id\_authentication plugin to play nice in my applications, and after a few hours of trial and error I have it running. I had to make a number of changes from the README text, and I’m t…

---

## [Integer limit on migration doesn't have any effect?](https://www.ruby-forum.com/t/integer-limit-on-migration-doesnt-have-any-effect/90690)

<div class="topic-metadata">

**Author:** [@Reynard](https://www.ruby-forum.com/u/Reynard)\
**Replies:** 2\
**Last updated:** [April 4, 2007, 9:17pm UTC](https://www.ruby-forum.com/t/integer-limit-on-migration-doesnt-have-any-effect/90690 "2007-04-04T21:17:59Z")

</div>

I have this code on migration file t.column :some\_integer, :integer, :limit =\> 4 t.column :other\_integer, :integer, :limit =\> 8 on mysql, I checked the datatype: some\_integer INT(4) other\_integer INT(8) but when I …

---

## [Many to many self join. Data insertion using text box](https://www.ruby-forum.com/t/many-to-many-self-join-data-insertion-using-text-box/91115)

<div class="topic-metadata">

**Author:** [@Vishwaraj](https://www.ruby-forum.com/u/Vishwaraj)\
**Replies:** 0\
**Last updated:** [April 4, 2007, 9:05pm UTC](https://www.ruby-forum.com/t/many-to-many-self-join-data-insertion-using-text-box/91115 "2007-04-04T21:05:53Z")

</div>

Hi again, Well I’m struck at place since several days. I have a relationship such that many services could be dependent on a service. I have listed all the dependent services of a service on the show page. Now just b…

---

## [Queries](https://www.ruby-forum.com/t/queries/91037)

<div class="topic-metadata">

**Author:** [@leonb](https://www.ruby-forum.com/u/leonb)\
**Replies:** 2\
**Last updated:** [April 4, 2007, 9:01pm UTC](https://www.ruby-forum.com/t/queries/91037 "2007-04-04T21:01:56Z")

</div>

Hi, I have this code: for user in User.find(:all, :include =\> :declarations ) for declaration in user.declarations pay += declaration.share($my) if declaration.my? paid = declaration.amount end …

---

## [Where to get the slate CMS?](https://www.ruby-forum.com/t/where-to-get-the-slate-cms/91093)

<div class="topic-metadata">

**Author:** [@patcito](https://www.ruby-forum.com/u/patcito)\
**Replies:** 1\
**Last updated:** [April 4, 2007, 8:40pm UTC](https://www.ruby-forum.com/t/where-to-get-the-slate-cms/91093 "2007-04-04T20:40:53Z")

</div>

I searched on the site but couldn’t find it :confused: I went to the campfire chat room there was another guy looking for the same info. So does anyone know where to get it? (svn, tarball…) thanx in advance Pat

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

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