# Rails

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

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

---

## [Haml says yes, rails says no](https://www.ruby-forum.com/t/haml-says-yes-rails-says-no/146768)

<div class="topic-metadata">

**Author:** [@bouldr-matt](https://www.ruby-forum.com/u/bouldr-matt)\
**Replies:** 3\
**Last updated:** [August 25, 2008, 3:28pm UTC](https://www.ruby-forum.com/t/haml-says-yes-rails-says-no/146768 "2008-08-25T15:28:25Z")

</div>

I’m using the haml gem and it’s great, been using it for a while and I love it. I’ve got a problem trying to display the flash messages, if I do the following: - if flash\[:notice\] #flashNotice =flash\[:notice…

---

## [Maths not working (can't get this)](https://www.ruby-forum.com/t/maths-not-working-cant-get-this/146791)

<div class="topic-metadata">

**Author:** [@bingobob](https://www.ruby-forum.com/u/bingobob)\
**Replies:** 2\
**Last updated:** [August 25, 2008, 3:13pm UTC](https://www.ruby-forum.com/t/maths-not-working-cant-get-this/146791 "2008-08-25T15:13:12Z")

</div>

I’ve got a few problems with this…Hopefully it’s cleaer what I’m trying to do (work out and display two prices, one discounted / one full). Be grateful for answers… The total price and discounted price are not calcula…

---

## [A general implementation question](https://www.ruby-forum.com/t/a-general-implementation-question/146781)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 1\
**Last updated:** [August 25, 2008, 2:36pm UTC](https://www.ruby-forum.com/t/a-general-implementation-question/146781 "2008-08-25T14:36:14Z")

</div>

Hi I have the models ServiceDesk and Problem .A servicedesk can be related to other service desk and problems .Similarly a problem can be related to other problem and servicedesks .At the first stage when doing serv…

---

## [Rails with php](https://www.ruby-forum.com/t/rails-with-php/146772)

<div class="topic-metadata">

**Author:** [@redster](https://www.ruby-forum.com/u/redster)\
**Replies:** 3\
**Last updated:** [August 25, 2008, 2:31pm UTC](https://www.ruby-forum.com/t/rails-with-php/146772 "2008-08-25T14:31:33Z")

</div>

hi I have installed InstanRails in my system. i can able to run php with phpmyadmin. i want create php with rails new application. if any one know. please let me know. thanks karthik

---

## [Action Mailer : FROM ADDRESS](https://www.ruby-forum.com/t/action-mailer-from-address/146780)

<div class="topic-metadata">

**Author:** [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Replies:** 1\
**Last updated:** [August 25, 2008, 1:53pm UTC](https://www.ruby-forum.com/t/action-mailer-from-address/146780 "2008-08-25T13:53:59Z")

</div>

Hi, I have been using action mailer with little or no issues for quite a while. I have been sending all mails as admin. Now that i thought of using user’s email IDs itself when they communicate with each other instea…

---

## [POST'ing a file with link\_to](https://www.ruby-forum.com/t/posting-a-file-with-link-to/146773)

<div class="topic-metadata">

**Author:** [@harm](https://www.ruby-forum.com/u/harm)\
**Replies:** 4\
**Last updated:** [August 25, 2008, 1:49pm UTC](https://www.ruby-forum.com/t/posting-a-file-with-link-to/146773 "2008-08-25T13:49:18Z")

</div>

Dear all, For a site I need a demo functionality. Long story short, I need people to be able to click a link which POST’s a file (which I, in this instance, provide). So far I’ve got: \<%= link\_to(“Example”, new\_reso…

---

## [Symmetrical Routes for Nested Resources](https://www.ruby-forum.com/t/symmetrical-routes-for-nested-resources/142216)

<div class="topic-metadata">

**Author:** [@SingleShot](https://www.ruby-forum.com/u/SingleShot)\
**Replies:** 2\
**Last updated:** [August 25, 2008, 1:34pm UTC](https://www.ruby-forum.com/t/symmetrical-routes-for-nested-resources/142216 "2008-08-25T13:34:37Z")

</div>

I’m having trouble setting up nested resources is a certain way that I believe makes sense. Given rules like these: an owner owns many books a book can be owned by many owners an owner can own multiple copies of the …

---

## [Moving files in server?](https://www.ruby-forum.com/t/moving-files-in-server/146784)

<div class="topic-metadata">

**Author:** [@torso](https://www.ruby-forum.com/u/torso)\
**Replies:** 0\
**Last updated:** [August 25, 2008, 1:01pm UTC](https://www.ruby-forum.com/t/moving-files-in-server/146784 "2008-08-25T13:01:48Z")

</div>

Hi I have a problem. I need to copy directory x to directory y. Only in server. But I need to choose the directory x and y by web browoser. How I can do it by rails? I have no ideas.

---

## [Controllers and Views](https://www.ruby-forum.com/t/controllers-and-views/146778)

<div class="topic-metadata">

**Author:** [@Yung-Rick](https://www.ruby-forum.com/u/Yung-Rick)\
**Replies:** 0\
**Last updated:** [August 25, 2008, 12:44pm UTC](https://www.ruby-forum.com/t/controllers-and-views/146778 "2008-08-25T12:44:48Z")

</div>

Hi all, I have two tables: tbl1 and tbl2. Both tables tracks ‘stocks’ that have been sent and those that have been retrieved for a particular date. information is stored in a database explained below tbl1 has fiels i…

---

## [Differnce in development,production](https://www.ruby-forum.com/t/differnce-in-development-production/146769)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 2\
**Last updated:** [August 25, 2008, 11:37am UTC](https://www.ruby-forum.com/t/differnce-in-development-production/146769 "2008-08-25T11:37:25Z")

</div>

Hi I would like to know the differnece in performance when I start my server ruby script/server -e production Is there differnece in execution speed Thanks in advance Sijo

---

## [Rails and prototype: adding a child to an element](https://www.ruby-forum.com/t/rails-and-prototype-adding-a-child-to-an-element/146738)

<div class="topic-metadata">

**Author:** [@surge](https://www.ruby-forum.com/u/surge)\
**Replies:** 4\
**Last updated:** [August 25, 2008, 10:56am UTC](https://www.ruby-forum.com/t/rails-and-prototype-adding-a-child-to-an-element/146738 "2008-08-25T10:56:20Z")

</div>

Hello, everybody A simple question… I want to add a child to an HTML element. In this case, the element is “tbody” and the HTML is a row. The insert\_html method requires me to specify :after, :before, etc, which in …

---

## [:URL Problem](https://www.ruby-forum.com/t/url-problem/146767)

<div class="topic-metadata">

**Author:** [@svenb](https://www.ruby-forum.com/u/svenb)\
**Replies:** 0\
**Last updated:** [August 25, 2008, 10:31am UTC](https://www.ruby-forum.com/t/url-problem/146767 "2008-08-25T10:31:51Z")

</div>

I have a Problem with :url i have the following code: :url =\> { :controller =\> :singlereceipts, :action =\> :update, :id =\> sr.id } and the generated URL looks like this: /singlereceipts/709689955 if i change :contro…

---

## [Rails Developer](https://www.ruby-forum.com/t/rails-developer/146408)

<div class="topic-metadata">

**Author:** [@DavidB](https://www.ruby-forum.com/u/DavidB)\
**Replies:** 2\
**Last updated:** [August 25, 2008, 10:25am UTC](https://www.ruby-forum.com/t/rails-developer/146408 "2008-08-25T10:25:51Z")

</div>

Hello Group, I am hoping to get some advice/referrals. I have an existing rails project that is in production and used by my business in the Chicago area, but I have colleagues who have indicated an interest in it. W…

---

## [Difference between render :template and render :partial?](https://www.ruby-forum.com/t/difference-between-render-template-and-render-partial/146761)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 2\
**Last updated:** [August 25, 2008, 9:11am UTC](https://www.ruby-forum.com/t/difference-between-render-template-and-render-partial/146761 "2008-08-25T09:11:17Z")

</div>

Hi, I am not getting the exact difference between render partial and render template. Is there any difference or they are equal? Thanks & Regards, Tushar

---

## [How to convert .rhtml into pdf](https://www.ruby-forum.com/t/how-to-convert-rhtml-into-pdf/146647)

<div class="topic-metadata">

**Author:** [@tejas](https://www.ruby-forum.com/u/tejas)\
**Replies:** 2\
**Last updated:** [August 25, 2008, 7:48am UTC](https://www.ruby-forum.com/t/how-to-convert-rhtml-into-pdf/146647 "2008-08-25T07:48:59Z")

</div>

Hi, I have complete rhtml for calendar month view, containing images also. I need to generate pdf for the selected month view calender. from .rhtml which plugin or gem I have to use. and how can I implement it.? Tha…

---

## [Mongrel Gem Install](https://www.ruby-forum.com/t/mongrel-gem-install/146758)

<div class="topic-metadata">

**Author:** [@wenhan](https://www.ruby-forum.com/u/wenhan)\
**Replies:** 1\
**Last updated:** [August 25, 2008, 7:44am UTC](https://www.ruby-forum.com/t/mongrel-gem-install/146758 "2008-08-25T07:44:53Z")

</div>

Hi, I am following deprec2 your slice from windows (http://crackthenut.cracklabs.com/deprec2-your-slice-from-windows/.) however I am getting stuck at gem install mongrel part of the install\_rails\_stack. I am on a 256m…

---

## [Can a project use another projetc's model, controller,files?](https://www.ruby-forum.com/t/can-a-project-use-another-projetcs-model-controller-files/146539)

<div class="topic-metadata">

**Author:** [@shikha](https://www.ruby-forum.com/u/shikha)\
**Replies:** 4\
**Last updated:** [August 25, 2008, 7:13am UTC](https://www.ruby-forum.com/t/can-a-project-use-another-projetcs-model-controller-files/146539 "2008-08-25T07:13:53Z")

</div>

i am working on a project in which we have two projects, one at admin side and another at viewer side and we are using the same database for that. now i am confused with this thing that can my admin project model, con…

---

## [\<%= link\_to('Want to read more',:controller =\> ) %\>?](https://www.ruby-forum.com/t/link-to-want-to-read-more-controller/146643)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 2\
**Last updated:** [August 25, 2008, 6:35am UTC](https://www.ruby-forum.com/t/link-to-want-to-read-more-controller/146643 "2008-08-25T06:35:10Z")

</div>

Hi All… In My App.I ve table called Feeds.It contains URL as field. In that I’ve Stored 6 Urls. Actually I m Trying to Make a Link from Application To That Url’s… That is from my HTML page To That url’s. I don’ve a…

---

## [Rails installation problem on windows](https://www.ruby-forum.com/t/rails-installation-problem-on-windows/146638)

<div class="topic-metadata">

**Author:** [@fzacharia](https://www.ruby-forum.com/u/fzacharia)\
**Replies:** 2\
**Last updated:** [August 25, 2008, 6:31am UTC](https://www.ruby-forum.com/t/rails-installation-problem-on-windows/146638 "2008-08-25T06:31:30Z")

</div>

Hi I installed ruby and mysql .And when tried from prompt gem install rails --include-dependencies it gives the error ERROR: While executing gem … (Gem::RemoteFetcher::FetchError) A connection attempt failed becau…

---

## [Error message when installing restful\_authentication from github](https://www.ruby-forum.com/t/error-message-when-installing-restful-authentication-from-github/146751)

<div class="topic-metadata">

**Author:** [@jeff](https://www.ruby-forum.com/u/jeff)\
**Replies:** 1\
**Last updated:** [August 25, 2008, 4:10am UTC](https://www.ruby-forum.com/t/error-message-when-installing-restful-authentication-from-github/146751 "2008-08-25T04:10:21Z")

</div>

Anybody know if I’m doing something stupidly wrong here? $ script/plugin install git://github.com/technoweenie/restful-authentication.git removing: /Users/jcohen/dev/rest\_with\_rails/theater\_login/vendor/ plugins/rest…

---

## [\[ANN\] NeverBlock supports ActiveRecord](https://www.ruby-forum.com/t/ann-neverblock-supports-activerecord/146748)

<div class="topic-metadata">

**Author:** [@oldmoe](https://www.ruby-forum.com/u/oldmoe)\
**Replies:** 0\
**Last updated:** [August 25, 2008, 3:26am UTC](https://www.ruby-forum.com/t/ann-neverblock-supports-activerecord/146748 "2008-08-25T03:26:39Z")

</div>

I gladly announce the first release of the NeverBlock PostgreSQL adapter for ActiveRecord. The new adapter enables ActiveRecord to perform queries in parallel even in a single threaded Ruby1.9 application. Benchmarki…

---

## [Tricky include question](https://www.ruby-forum.com/t/tricky-include-question/146742)

<div class="topic-metadata">

**Author:** [@staypufd](https://www.ruby-forum.com/u/staypufd)\
**Replies:** 3\
**Last updated:** [August 25, 2008, 1:56am UTC](https://www.ruby-forum.com/t/tricky-include-question/146742 "2008-08-25T01:56:37Z")

</div>

I’ve been here before and maybe I’m trying to do something that is not possible. I am trying to include tables that are associated to other tables in the actual include statement but not to the original table call. In…

---

## [Config.after\_initialize and development mode](https://www.ruby-forum.com/t/config-after-initialize-and-development-mode/146741)

<div class="topic-metadata">

**Author:** [@mveerman](https://www.ruby-forum.com/u/mveerman)\
**Replies:** 2\
**Last updated:** [August 25, 2008, 1:37am UTC](https://www.ruby-forum.com/t/config-after-initialize-and-development-mode/146741 "2008-08-25T01:37:41Z")

</div>

Hi, I’m using activemerchant and setting up a class variable using config.after\_initialize. It works great for the first request, but then the variable is nil. config.after\_initialize do ActiveMerchant::Billing::Ba…

---

## [Help: trick to get the domain name of an URL](https://www.ruby-forum.com/t/help-trick-to-get-the-domain-name-of-an-url/144169)

<div class="topic-metadata">

**Author:** [@Chris\_Nowlan](https://www.ruby-forum.com/u/Chris_Nowlan)\
**Replies:** 6\
**Last updated:** [August 25, 2008, 1:25am UTC](https://www.ruby-forum.com/t/help-trick-to-get-the-domain-name-of-an-url/144169 "2008-08-25T01:25:24Z")

</div>

Hello, I’ve been toying with my regex for a while and still has some problem with this. I would like to get the web hostname of URLs : "get\_domain(url) ": such as: http://yahoo.com → yahoo.com http://www.yah…

---

## [\[Ann\] Charting the rails - ZiYa gem 2.0.2 released](https://www.ruby-forum.com/t/ann-charting-the-rails-ziya-gem-2-0-2-released/146735)

<div class="topic-metadata">

**Author:** [@derailed](https://www.ruby-forum.com/u/derailed)\
**Replies:** 1\
**Last updated:** [August 24, 2008, 9:48pm UTC](https://www.ruby-forum.com/t/ann-charting-the-rails-ziya-gem-2-0-2-released/146735 "2008-08-24T21:48:16Z")

</div>

Want to create some good looking interactive charts/gauges for your rails applications ? ZiYa was originally released as a rails plugin and as now involved into a gem. More charts and many additional features were cre…

---

## [Help with thesis idea - REST and Enterprise Mashups](https://www.ruby-forum.com/t/help-with-thesis-idea-rest-and-enterprise-mashups/146733)

<div class="topic-metadata">

**Author:** [@pix](https://www.ruby-forum.com/u/pix)\
**Replies:** 0\
**Last updated:** [August 24, 2008, 9:20pm UTC](https://www.ruby-forum.com/t/help-with-thesis-idea-rest-and-enterprise-mashups/146733 "2008-08-24T21:20:08Z")

</div>

Hello, I have to define a project for my master’s thesis, and I think it will be about REST and mashups, though the exact research topic is not yet defined. It would be great to have your opinion about the project ou…

---

## [Age calculation, where to put it?](https://www.ruby-forum.com/t/age-calculation-where-to-put-it/146723)

<div class="topic-metadata">

**Author:** [@txapelgorri](https://www.ruby-forum.com/u/txapelgorri)\
**Replies:** 2\
**Last updated:** [August 24, 2008, 8:29pm UTC](https://www.ruby-forum.com/t/age-calculation-where-to-put-it/146723 "2008-08-24T20:29:46Z")

</div>

Hi there: I was trying to figure out where to put a simple block of code to calculate the age of every “user” I have in the table “people”. In the controller I get all the users from the model like this: @people = Pe…

---

## [To\_json of hash containing an array](https://www.ruby-forum.com/t/to-json-of-hash-containing-an-array/146714)

<div class="topic-metadata">

**Author:** [@Mads\_K](https://www.ruby-forum.com/u/Mads_K)\
**Replies:** 3\
**Last updated:** [August 24, 2008, 8:05pm UTC](https://www.ruby-forum.com/t/to-json-of-hash-containing-an-array/146714 "2008-08-24T20:05:46Z")

</div>

Hi there, I am fairly new to the Rails framework, so forgive me if there is an obvious solution to this problem. I am using Rails 2.1.0 and trying to jsonify a hash containing an array. E.g. result = { :name =\> “McL…

---

## [Ruby URL format](https://www.ruby-forum.com/t/ruby-url-format/146660)

<div class="topic-metadata">

**Author:** [@tomzoo](https://www.ruby-forum.com/u/tomzoo)\
**Replies:** 2\
**Last updated:** [August 24, 2008, 7:56pm UTC](https://www.ruby-forum.com/t/ruby-url-format/146660 "2008-08-24T19:56:44Z")

</div>

I’m working on a straight forward rails app. One thing that has me puzzled is the generated hyperlinks in rails, \<%= link\_to ‘Home’, :controller =\> ‘my\_controller’, :action =\> ‘index’ %\> generates a hyperlink like: …

---

## [Many to many :through problem](https://www.ruby-forum.com/t/many-to-many-through-problem/146724)

<div class="topic-metadata">

**Author:** [@Wijnand\_W](https://www.ruby-forum.com/u/Wijnand_W)\
**Replies:** 1\
**Last updated:** [August 24, 2008, 7:39pm UTC](https://www.ruby-forum.com/t/many-to-many-through-problem/146724 "2008-08-24T19:39:27Z")

</div>

Hi all, This should be a simple one, but I just don’t see my mistake. Migration1: class CreateCompanyUsers \< ActiveRecord::Migration def self.up create\_table :employments, :id =\> false do |t| t.boolean :admin\_role …

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

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