# Rails

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

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

---

## [Calling Controller methods from application controllers](https://www.ruby-forum.com/t/calling-controller-methods-from-application-controllers/135699)

<div class="topic-metadata">

**Author:** [@buddhi](https://www.ruby-forum.com/u/buddhi)\
**Replies:** 13\
**Last updated:** [April 25, 2008, 8:45pm UTC](https://www.ruby-forum.com/t/calling-controller-methods-from-application-controllers/135699 "2008-04-25T20:45:30Z")

</div>

Is there a way/workaround to call a controller method from application controller? #Controller SomeController \< ApplicationController def some\_method … end end #Application Controller ApplicationController \< Act…

---

## [Sending multiple emails](https://www.ruby-forum.com/t/sending-multiple-emails/135793)

<div class="topic-metadata">

**Author:** [@rushnosh](https://www.ruby-forum.com/u/rushnosh)\
**Replies:** 1\
**Last updated:** [April 25, 2008, 8:30pm UTC](https://www.ruby-forum.com/t/sending-multiple-emails/135793 "2008-04-25T20:30:36Z")

</div>

i have successfully set up sending email via postfix using md5 with ruby. everything works like ruby magic. now i need to send emails to multiple people. do i have to create a loop and send email in that form or is t…

---

## [How to reference view helpers from another controller?](https://www.ruby-forum.com/t/how-to-reference-view-helpers-from-another-controller/135802)

<div class="topic-metadata">

**Author:** [@J\_Y](https://www.ruby-forum.com/u/J_Y)\
**Replies:** 10\
**Last updated:** [April 25, 2008, 7:57pm UTC](https://www.ruby-forum.com/t/how-to-reference-view-helpers-from-another-controller/135802 "2008-04-25T19:57:09Z")

</div>

Hi, I’ve googled around looking for answers to this simple question, with little success. How do I go about using a view helper from another controller, without putting the helper into application\_helper.rb? For exa…

---

## [Json =\> hash in Ruby](https://www.ruby-forum.com/t/json-hash-in-ruby/135832)

<div class="topic-metadata">

**Author:** [@martin](https://www.ruby-forum.com/u/martin)\
**Replies:** 2\
**Last updated:** [April 25, 2008, 7:23pm UTC](https://www.ruby-forum.com/t/json-hash-in-ruby/135832 "2008-04-25T19:23:39Z")

</div>

Hi everyone, I would like to decode a json string and transform it into a hash in ruby. I tried json = “{“userid” : “21”, “friendid” : “9”}” hash = ActiveSupport::JSON.decode(json) puts hash\[:userid\] however, this…

---

## [Rake Aborted - Error Message Suggests Fix, Epic Fail](https://www.ruby-forum.com/t/rake-aborted-error-message-suggests-fix-epic-fail/135693)

<div class="topic-metadata">

**Author:** [@rornoob](https://www.ruby-forum.com/u/rornoob)\
**Replies:** 2\
**Last updated:** [April 25, 2008, 7:18pm UTC](https://www.ruby-forum.com/t/rake-aborted-error-message-suggests-fix-epic-fail/135693 "2008-04-25T19:18:53Z")

</div>

I’m running through the Depot tutorial on Agile Development w/ Rails (2nd Edition). I’ve created a DB and connect to it (and create dummy tables) via terminal with no problem. Everything is cool up until page 72 where…

---

## [Before\_save and create](https://www.ruby-forum.com/t/before-save-and-create/135860)

<div class="topic-metadata">

**Author:** [@raam](https://www.ruby-forum.com/u/raam)\
**Replies:** 1\
**Last updated:** [April 25, 2008, 6:45pm UTC](https://www.ruby-forum.com/t/before-save-and-create/135860 "2008-04-25T18:45:12Z")

</div>

Hi, I have a strange problem with before\_save and create. In my controller I have: self.current\_cart = Cart.create(:user\_id =\> current\_user.id, :status =\> CURRENT\_CART) self.current\_cart.update\_attributes({:order\_nu…

---

## [Setting rails root](https://www.ruby-forum.com/t/setting-rails-root/135856)

<div class="topic-metadata">

**Author:** [@Volume4](https://www.ruby-forum.com/u/Volume4)\
**Replies:** 0\
**Last updated:** [April 25, 2008, 6:36pm UTC](https://www.ruby-forum.com/t/setting-rails-root/135856 "2008-04-25T18:36:22Z")

</div>

Hi there, I was running a RoR app on a domain such as http://www.somedomain.com using the Mongrel server. I have now moved the app to a host that has the following requirements. The RoR app resides outside of public\_…

---

## [Mongrel Woes](https://www.ruby-forum.com/t/mongrel-woes/135781)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 2\
**Last updated:** [April 25, 2008, 6:06pm UTC](https://www.ruby-forum.com/t/mongrel-woes/135781 "2008-04-25T18:06:56Z")

</div>

An app that we have been using in-house for about 2 years now has decided it wants to have all sorts of issues with Mongrel dying. Could someone please look at these log entries and offer some suggestions as to what I…

---

## [Nginx maintenance message and search engines](https://www.ruby-forum.com/t/nginx-maintenance-message-and-search-engines/135504)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 3\
**Last updated:** [April 25, 2008, 5:31pm UTC](https://www.ruby-forum.com/t/nginx-maintenance-message-and-search-engines/135504 "2008-04-25T17:31:02Z")

</div>

Hi, the usual Rails configs I’ve seen floating around for nginx handle maintenance messages something like this: if (-f $document\_root/system/maintenance.html) { rewrite ^(.\*)$ /system/maintenance.html last; break…

---

## [PG\_Namespace cartesian join in postgresql\_adapter.rb](https://www.ruby-forum.com/t/pg-namespace-cartesian-join-in-postgresql-adapter-rb/135843)

<div class="topic-metadata">

**Author:** [@bob](https://www.ruby-forum.com/u/bob)\
**Replies:** 2\
**Last updated:** [April 25, 2008, 5:09pm UTC](https://www.ruby-forum.com/t/pg-namespace-cartesian-join-in-postgresql-adapter-rb/135843 "2008-04-25T17:09:17Z")

</div>

I’m working on a patch to Rails 2.0.2 to address a cartesian join with PG\_namespace in activerecord-2.0.2/lib/active\_record/ connection\_adapters/postgresql\_adapter.rb. (around line 559 or so). What I’m wondering is t…

---

## [Validates\_presence\_of Date with '00' year fails](https://www.ruby-forum.com/t/validates-presence-of-date-with-00-year-fails/135740)

<div class="topic-metadata">

**Author:** [@Olly\_L](https://www.ruby-forum.com/u/Olly_L)\
**Replies:** 1\
**Last updated:** [April 25, 2008, 4:55pm UTC](https://www.ruby-forum.com/t/validates-presence-of-date-with-00-year-fails/135740 "2008-04-25T16:55:10Z")

</div>

Hi there I’ve come across an interesting scenario with validates\_presence\_of and Dates in Rails. I’ve been looking through the Rails code but I just can’t figure out where in Rails the date parsing which presumably c…

---

## [Ajax problem with rails 2.0.2 - frozen string?](https://www.ruby-forum.com/t/ajax-problem-with-rails-2-0-2-frozen-string/129221)

<div class="topic-metadata">

**Author:** [@Jeremy\_Mayhew](https://www.ruby-forum.com/u/Jeremy_Mayhew)\
**Replies:** 3\
**Last updated:** [April 25, 2008, 4:49pm UTC](https://www.ruby-forum.com/t/ajax-problem-with-rails-2-0-2-frozen-string/129221 "2008-04-25T16:49:54Z")

</div>

I am deploying a new rails application on a shared host (hostingrails) for the first time. My local app works great. However, Ajax requests in the deployed application are generating the following error: /!\\ FAILSAF…

---

## [Can't start script/console, but can start webrick](https://www.ruby-forum.com/t/cant-start-script-console-but-can-start-webrick/135825)

<div class="topic-metadata">

**Author:** [@tbobker](https://www.ruby-forum.com/u/tbobker)\
**Replies:** 2\
**Last updated:** [April 25, 2008, 4:38pm UTC](https://www.ruby-forum.com/t/cant-start-script-console-but-can-start-webrick/135825 "2008-04-25T16:38:20Z")

</div>

I have this app on other computers and it works fine. On my laptop I was running instant rails, but have scrapped it. My error is: C:\\data\\0315\_FitWitWeb\>ruby script/console Loading development environment (Rails 2.0…

---

## [Learn DB2 Today](https://www.ruby-forum.com/t/learn-db2-today/135842)

<div class="topic-metadata">

**Author:** [@db2](https://www.ruby-forum.com/u/db2)\
**Replies:** 0\
**Last updated:** [April 25, 2008, 4:23pm UTC](https://www.ruby-forum.com/t/learn-db2-today/135842 "2008-04-25T16:23:10Z")

</div>

Learn DB2 faster using examples http://db2examples.googlepages.com

---

## [If Statement not working as intended?](https://www.ruby-forum.com/t/if-statement-not-working-as-intended/135729)

<div class="topic-metadata">

**Author:** [@rushnosh](https://www.ruby-forum.com/u/rushnosh)\
**Replies:** 2\
**Last updated:** [April 25, 2008, 4:16pm UTC](https://www.ruby-forum.com/t/if-statement-not-working-as-intended/135729 "2008-04-25T16:16:39Z")

</div>

i am having a problem with the if statement here. i know which team won the toss and what they elected to do. i have check the values/equations in the console and it works, but when the data is saved it always save o…

---

## [Using rails helpers in pdf-writer](https://www.ruby-forum.com/t/using-rails-helpers-in-pdf-writer/135834)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 2\
**Last updated:** [April 25, 2008, 4:09pm UTC](https://www.ruby-forum.com/t/using-rails-helpers-in-pdf-writer/135834 "2008-04-25T16:09:41Z")

</div>

How can I use Rails helpers with pdf-writer?

---

## [How do I make this controller RESTful?](https://www.ruby-forum.com/t/how-do-i-make-this-controller-restful/226005)

<div class="topic-metadata">

**Author:** [@Rubienubie](https://www.ruby-forum.com/u/Rubienubie)\
**Replies:** 5\
**Last updated:** [April 25, 2008, 4:05pm UTC](https://www.ruby-forum.com/t/how-do-i-make-this-controller-restful/226005 "2008-04-25T16:05:04Z")

</div>

Hello, I’m trying to make this controller RESTful, but its post method uses two other methods – select\_category and show\_form – see them in action at http://demo.chuckslist.org/ads/post. How do I reduce all of this t…

---

## [Creating a tabbed panel](https://www.ruby-forum.com/t/creating-a-tabbed-panel/135353)

<div class="topic-metadata">

**Author:** [@ekta](https://www.ruby-forum.com/u/ekta)\
**Replies:** 7\
**Last updated:** [April 25, 2008, 4:00pm UTC](https://www.ruby-forum.com/t/creating-a-tabbed-panel/135353 "2008-04-25T16:00:35Z")

</div>

How do I create tabbed panel in RubyOnRails? Like the way it is created in Java, I found nothing here. Is this facility provided? I want to create two tabs and on clicking on first, data related to first should appear…

---

## [New to Ruby and Rails and Such](https://www.ruby-forum.com/t/new-to-ruby-and-rails-and-such/135841)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 0\
**Last updated:** [April 25, 2008, 3:22pm UTC](https://www.ruby-forum.com/t/new-to-ruby-and-rails-and-such/135841 "2008-04-25T15:22:33Z")

</div>

I’ve been following this group for a bit, getting the digest daily - and while I know most of the posts are related to support, and “how do I do” questions… I just wanted to note that Ruby is full of the win. So is …

---

## [Attachment\_fu and mime type issues](https://www.ruby-forum.com/t/attachment-fu-and-mime-type-issues/135804)

<div class="topic-metadata">

**Author:** [@Sean\_OSHara](https://www.ruby-forum.com/u/Sean_OSHara)\
**Replies:** 1\
**Last updated:** [April 25, 2008, 2:58pm UTC](https://www.ruby-forum.com/t/attachment-fu-and-mime-type-issues/135804 "2008-04-25T14:58:54Z")

</div>

Hi All, I am having a problem with the attachment\_fu plugin and flac audio files. In the dev environment, using mongrel, the form upload object does not seem to have any associated content\_type. I get the following …

---

## [Avoiding duplicate inserts?](https://www.ruby-forum.com/t/avoiding-duplicate-inserts/135817)

<div class="topic-metadata">

**Author:** [@Mike\_Champion](https://www.ruby-forum.com/u/Mike_Champion)\
**Replies:** 2\
**Last updated:** [April 25, 2008, 2:45pm UTC](https://www.ruby-forum.com/t/avoiding-duplicate-inserts/135817 "2008-04-25T14:45:22Z")

</div>

I’m wondering if there is a good Rails solution to avoiding duplicate inserts with identical content. I know of the locking to prevent updates, but looking for something on inserts. For example, say you have an API to…

---

## [How can I limit the \<td\> characters?](https://www.ruby-forum.com/t/how-can-i-limit-the-td-characters/135831)

<div class="topic-metadata">

**Author:** [@captaffy](https://www.ruby-forum.com/u/captaffy)\
**Replies:** 1\
**Last updated:** [April 25, 2008, 1:23pm UTC](https://www.ruby-forum.com/t/how-can-i-limit-the-td-characters/135831 "2008-04-25T13:23:41Z")

</div>

I have this code: \<%=\_('Client')%\> \<% for repair\_ticket in @repair\_tickets %\> \<%=h repair\_ticket.client.name %\> \<% end %\> I want only to show the first 10 letters of client.name. Can I do that onl…

---

## [How to implement blog trackbacks?](https://www.ruby-forum.com/t/how-to-implement-blog-trackbacks/135830)

<div class="topic-metadata">

**Author:** [@huang\_zhimin](https://www.ruby-forum.com/u/huang_zhimin)\
**Replies:** 0\
**Last updated:** [April 25, 2008, 1:13pm UTC](https://www.ruby-forum.com/t/how-to-implement-blog-trackbacks/135830 "2008-04-25T13:13:05Z")

</div>

I’m writing a blog system and I find many blog systems have trackbacks, like msn spaces. But I don’t know how to implement trackbacks. Can anybody give me some idea? – My home: http://flyerhzm.com

---

## [Setting rails root](https://www.ruby-forum.com/t/setting-rails-root/196654)

<div class="topic-metadata">

**Author:** [@Schalk\_N](https://www.ruby-forum.com/u/Schalk_N)\
**Replies:** 0\
**Last updated:** [April 25, 2008, 12:18pm UTC](https://www.ruby-forum.com/t/setting-rails-root/196654 "2008-04-25T12:18:33Z")

</div>

Hi there, I was running a RoR app on a domain such as http://www.somedomain.com using the Mongrel server. I have now moved the app to a host that has the following requirements. The RoR app resides outside of public\_…

---

## [Click Table Headings to Sort](https://www.ruby-forum.com/t/click-table-headings-to-sort/101567)

<div class="topic-metadata">

**Author:** [@mohits](https://www.ruby-forum.com/u/mohits)\
**Replies:** 3\
**Last updated:** [April 25, 2008, 11:33am UTC](https://www.ruby-forum.com/t/click-table-headings-to-sort/101567 "2008-04-25T11:33:11Z")

</div>

Hi, I’m looking at using my table headings as links that reload the page and sort it by the field which was clicked on. As is common, if the list is already sorted by the field, it reverses the order. I’m now lookin…

---

## [Multipart form\_tag](https://www.ruby-forum.com/t/multipart-form-tag/135815)

<div class="topic-metadata">

**Author:** [@blair](https://www.ruby-forum.com/u/blair)\
**Replies:** 2\
**Last updated:** [April 25, 2008, 11:32am UTC](https://www.ruby-forum.com/t/multipart-form-tag/135815 "2008-04-25T11:32:37Z")

</div>

I’m new to ruby, working on the book from Christian Hellsten & Jarkko Laine writen for RoR 1, so I had to adapt for RoR 2. I got the error : undefined local variable or method \`multipart’ for #\<#Class:0xb714d388:0xb7…

---

## [How to edit my message](https://www.ruby-forum.com/t/how-to-edit-my-message/135819)

<div class="topic-metadata">

**Author:** [@travor](https://www.ruby-forum.com/u/travor)\
**Replies:** 2\
**Last updated:** [April 25, 2008, 10:47am UTC](https://www.ruby-forum.com/t/how-to-edit-my-message/135819 "2008-04-25T10:47:29Z")

</div>

Hi, I wrote a message on the group,but how can I edit smy already posted messaes?I can not find the edit like on the editor toolbar.

---

## [Create module dynamically](https://www.ruby-forum.com/t/create-module-dynamically/135748)

<div class="topic-metadata">

**Author:** [@varunkumargoel](https://www.ruby-forum.com/u/varunkumargoel)\
**Replies:** 3\
**Last updated:** [April 25, 2008, 9:43am UTC](https://www.ruby-forum.com/t/create-module-dynamically/135748 "2008-04-25T09:43:14Z")

</div>

Hi All, I wanna create module dynamically please help me with some code examples how can i do this. whenever i call a function then one module should be created dynamically with some functions. Please Help… Thanks …

---

## [\[ADV\] Rails Kits](https://www.ruby-forum.com/t/adv-rails-kits/135794)

<div class="topic-metadata">

**Author:** [@Benjamin\_C](https://www.ruby-forum.com/u/Benjamin_C)\
**Replies:** 1\
**Last updated:** [April 25, 2008, 9:23am UTC](https://www.ruby-forum.com/t/adv-rails-kits/135794 "2008-04-25T09:23:51Z")

</div>

A couple of days ago I launched Rails Kits (http://railskits.com/), a place to get ready-made Rails code so you can get your projects done faster. The first Kit is the SaaS Rails Kit (http://railskits.com/ saas/), wh…

---

## [Newbea question](https://www.ruby-forum.com/t/newbea-question/127323)

<div class="topic-metadata">

**Author:** [@casid](https://www.ruby-forum.com/u/casid)\
**Replies:** 4\
**Last updated:** [April 25, 2008, 9:09am UTC](https://www.ruby-forum.com/t/newbea-question/127323 "2008-04-25T09:09:26Z")

</div>

I have t\_project model and want to get “id” and “from\_date” datas. how can I call them I didnt understand codes at all. I need to add the values to textbox ? could you pls check the model .

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

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