# Rails

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

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

---

## [Javascript function needs rails variable](https://www.ruby-forum.com/t/javascript-function-needs-rails-variable/158804)

<div class="topic-metadata">

**Author:** [@Rabia](https://www.ruby-forum.com/u/Rabia)\
**Replies:** 2\
**Last updated:** [January 29, 2009, 5:24am UTC](https://www.ruby-forum.com/t/javascript-function-needs-rails-variable/158804 "2009-01-29T05:24:24Z")

</div>

I have implement this but rails variables are not working.

---

## [Rails runtime](https://www.ruby-forum.com/t/rails-runtime/158842)

<div class="topic-metadata">

**Author:** [@camilleroux](https://www.ruby-forum.com/u/camilleroux)\
**Replies:** 2\
**Last updated:** [January 29, 2009, 4:51am UTC](https://www.ruby-forum.com/t/rails-runtime/158842 "2009-01-29T04:51:38Z")

</div>

Hi, I’ve a question about the Rails runtime. I’d like to know which part of Rails is executed (and put in memory) at each request? at each server launch? In other words, is Rails like PHP (the whole code is “executed…

---

## [Plugin Module Help](https://www.ruby-forum.com/t/plugin-module-help/158313)

<div class="topic-metadata">

**Author:** [@nateleavitt](https://www.ruby-forum.com/u/nateleavitt)\
**Replies:** 8\
**Last updated:** [January 29, 2009, 4:35am UTC](https://www.ruby-forum.com/t/plugin-module-help/158313 "2009-01-29T04:35:51Z")

</div>

First off, I’m an intermediate Rails developer who is still learning the inner workings of Rails… so here is my situation/problem: I have written a Plugin that accesses a third party API. Within the Plugin I had mult…

---

## [CGI Sessions](https://www.ruby-forum.com/t/cgi-sessions/158888)

<div class="topic-metadata">

**Author:** [@doug](https://www.ruby-forum.com/u/doug)\
**Replies:** 0\
**Last updated:** [January 29, 2009, 3:31am UTC](https://www.ruby-forum.com/t/cgi-sessions/158888 "2009-01-29T03:31:25Z")

</div>

I have several Rails sites running that use sessions and they all post cookies properly and otherwise work flawlessly. I now have need of implementing a more raw approach to sessions using CGI::Sessions. The Pickaxe …

---

## [Accessing rails variables in javascript](https://www.ruby-forum.com/t/accessing-rails-variables-in-javascript/66651)

<div class="topic-metadata">

**Author:** [@thila](https://www.ruby-forum.com/u/thila)\
**Replies:** 3\
**Last updated:** [January 29, 2009, 3:29am UTC](https://www.ruby-forum.com/t/accessing-rails-variables-in-javascript/66651 "2009-01-29T03:29:39Z")

</div>

Hi- How to access class variables (@something) within onLoad javascript functions? I pass an array of customers object to a .rhtml file. When it is rendered on the browser, I call an onLoad function. I need to acces…

---

## [Net:HTTP.post returns an Array](https://www.ruby-forum.com/t/net-http-post-returns-an-array/158883)

<div class="topic-metadata">

**Author:** [@David\_Law](https://www.ruby-forum.com/u/David_Law)\
**Replies:** 0\
**Last updated:** [January 29, 2009, 1:40am UTC](https://www.ruby-forum.com/t/net-http-post-returns-an-array/158883 "2009-01-29T01:40:17Z")

</div>

I was wondering if anyone has run into this problem. I post using a Net::HTTP object and instead of getting Net::HTTPResponse object, the server returns an Array causing an error since an we typically attempt to read…

---

## [Can I "fake" an object model on top of a flat ActiveRecord?](https://www.ruby-forum.com/t/can-i-fake-an-object-model-on-top-of-a-flat-activerecord/158875)

<div class="topic-metadata">

**Author:** [@dmorin](https://www.ruby-forum.com/u/dmorin)\
**Replies:** 2\
**Last updated:** [January 29, 2009, 12:55am UTC](https://www.ruby-forum.com/t/can-i-fake-an-object-model-on-top-of-a-flat-activerecord/158875 "2009-01-29T00:55:58Z")

</div>

This might be a painfully bad idea, but it’s gotten me curious. I have a generic object Node, which has a name attribute. Say for example that one of the names is “Widget”. What I’m wondering is, is there a way to m…

---

## [ActiveRecord to\_xml not calling to\_xml on custom class](https://www.ruby-forum.com/t/activerecord-to-xml-not-calling-to-xml-on-custom-class/105746)

<div class="topic-metadata">

**Author:** [@underbluewaters](https://www.ruby-forum.com/u/underbluewaters)\
**Replies:** 1\
**Last updated:** [January 29, 2009, 12:15am UTC](https://www.ruby-forum.com/t/activerecord-to-xml-not-calling-to-xml-on-custom-class/105746 "2009-01-29T00:15:22Z")

</div>

I’m using the GeoRuby and Spatial Adapter to do some postgis stuff with rails. Working great. The thing is, these define custom types that get stored on these activerecord objects. Things like GeoRuby::SimpleFeatures:…

---

## [Xml\_http\_request : action not found?](https://www.ruby-forum.com/t/xml-http-request-action-not-found/158862)

<div class="topic-metadata">

**Author:** [@itsastickup](https://www.ruby-forum.com/u/itsastickup)\
**Replies:** 3\
**Last updated:** [January 28, 2009, 11:38pm UTC](https://www.ruby-forum.com/t/xml-http-request-action-not-found/158862 "2009-01-28T23:38:30Z")

</div>

I have this in a functional test: xml\_http\_request :delete, person\_movie\_path(1,1) and the error I get says the action cannot be found, as if the ‘:delete’ method is not being translated to the appropriate destroy a…

---

## [Database names](https://www.ruby-forum.com/t/database-names/158864)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 2\
**Last updated:** [January 28, 2009, 10:50pm UTC](https://www.ruby-forum.com/t/database-names/158864 "2009-01-28T22:50:00Z")

</div>

If I generate a model by: “./script generate model user” it make a table “users”. But if I want that table is “user” not “users” what I can do?

---

## [Best find for the job](https://www.ruby-forum.com/t/best-find-for-the-job/158829)

<div class="topic-metadata">

**Author:** [@Neal\_L](https://www.ruby-forum.com/u/Neal_L)\
**Replies:** 2\
**Last updated:** [January 28, 2009, 10:33pm UTC](https://www.ruby-forum.com/t/best-find-for-the-job/158829 "2009-01-28T22:33:16Z")

</div>

Hi all, I’m trying to find the most effective way to generate an aggregation report. The models involved are: Customer --(has\_many)–\> Charges Charges --(have\_one)–\>Account What I’m trying to do is find the total c…

---

## [Restful routes and Rails Console](https://www.ruby-forum.com/t/restful-routes-and-rails-console/158841)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 3\
**Last updated:** [January 28, 2009, 10:12pm UTC](https://www.ruby-forum.com/t/restful-routes-and-rails-console/158841 "2009-01-28T22:12:40Z")

</div>

The following is a snippet of the routes.rb file: map.resources :blogs do |blog| blog.resources :posts do |post| post.resources :comments end end The index action in the CommentsController shows: redirect\_to comme…

---

## [JOBS-Ruby on Rails Developer position OPEN in Atlanta!](https://www.ruby-forum.com/t/jobs-ruby-on-rails-developer-position-open-in-atlanta/158863)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [January 28, 2009, 9:42pm UTC](https://www.ruby-forum.com/t/jobs-ruby-on-rails-developer-position-open-in-atlanta/158863 "2009-01-28T21:42:13Z")

</div>

Client in Atlanta is looking for a Mid-Level Ruby on Rails Developer. Open to relocation. Check out job the description below. If you are interested please email resumes to removed\_email\_address@domain.invalid and I …

---

## [Creating an object from a pp string?](https://www.ruby-forum.com/t/creating-an-object-from-a-pp-string/158853)

<div class="topic-metadata">

**Author:** [@yannimac](https://www.ruby-forum.com/u/yannimac)\
**Replies:** 6\
**Last updated:** [January 28, 2009, 9:37pm UTC](https://www.ruby-forum.com/t/creating-an-object-from-a-pp-string/158853 "2009-01-28T21:37:37Z")

</div>

When I use pp on an object in rails, it prints out a nice string representation of the object. I am trying to pass objects from one server to another and I am wondering if I can just pass this string and create an ob…

---

## [User Interface / View Looks](https://www.ruby-forum.com/t/user-interface-view-looks/158850)

<div class="topic-metadata">

**Author:** [@tcsnide](https://www.ruby-forum.com/u/tcsnide)\
**Replies:** 2\
**Last updated:** [January 28, 2009, 9:16pm UTC](https://www.ruby-forum.com/t/user-interface-view-looks/158850 "2009-01-28T21:16:59Z")

</div>

What are people doing these days for the “user interface” side of applications? I’m in the process of writing something, using a lot of CSS (good) but I keep getting the feel that this application (“rts”) would be be…

---

## [Multi table inheritance problem with has\_one relationship](https://www.ruby-forum.com/t/multi-table-inheritance-problem-with-has-one-relationship/158762)

<div class="topic-metadata">

**Author:** [@rgagnon](https://www.ruby-forum.com/u/rgagnon)\
**Replies:** 2\
**Last updated:** [January 28, 2009, 8:39pm UTC](https://www.ruby-forum.com/t/multi-table-inheritance-problem-with-has-one-relationship/158762 "2009-01-28T20:39:54Z")

</div>

Here is my issue class TransactionProduct \< ActiveRecord::Base has\_one :product, :class\_name =\> ‘Product’ end class Product \< ActiveRecord::Base set\_inheritance\_column :class\_name end class ProductVT \< Product de…

---

## [Calculate Page views efficiently](https://www.ruby-forum.com/t/calculate-page-views-efficiently/158848)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [January 28, 2009, 8:13pm UTC](https://www.ruby-forum.com/t/calculate-page-views-efficiently/158848 "2009-01-28T20:13:12Z")

</div>

Hi, I am coding forum software in rails. In forum software how many times a thread is viewed is an important metric .one way of doing this is creating a before\_filter which logs in a view everytime a page is requeste…

---

## [Save value of text\_field in the view](https://www.ruby-forum.com/t/save-value-of-text-field-in-the-view/158609)

<div class="topic-metadata">

**Author:** [@maite](https://www.ruby-forum.com/u/maite)\
**Replies:** 5\
**Last updated:** [January 28, 2009, 7:25pm UTC](https://www.ruby-forum.com/t/save-value-of-text-field-in-the-view/158609 "2009-01-28T19:25:35Z")

</div>

hello everybody How I save de value of text\_fiel in the same view \<%= f.text\_field :precio\_compra, :size=\> 10 %\> How do it??? thanks for all

---

## [Change Database Name](https://www.ruby-forum.com/t/change-database-name/158846)

<div class="topic-metadata">

**Author:** [@dan](https://www.ruby-forum.com/u/dan)\
**Replies:** 2\
**Last updated:** [January 28, 2009, 6:55pm UTC](https://www.ruby-forum.com/t/change-database-name/158846 "2009-01-28T18:55:51Z")

</div>

Hi, I’d like to change the name of the database for an app I have in production (the current name is too ambiguous). As I see it I will need to change the database.yml file and the database name in mysql. Is there an…

---

## [Redirecting root to mongrel prefix](https://www.ruby-forum.com/t/redirecting-root-to-mongrel-prefix/158836)

<div class="topic-metadata">

**Author:** [@jemminger](https://www.ruby-forum.com/u/jemminger)\
**Replies:** 2\
**Last updated:** [January 28, 2009, 6:13pm UTC](https://www.ruby-forum.com/t/redirecting-root-to-mongrel-prefix/158836 "2009-01-28T18:13:52Z")

</div>

Mongrel can be started with a prefix e.g. mongrel\_rails start -p 3000 --prefix /foobar So that all of the app’s URLs are prefixed, e.g. http://localhost:3000/foobar http://localhost:3000/foobar/posts http://localhos…

---

## [Active\_scaffold + i18n](https://www.ruby-forum.com/t/active-scaffold-i18n/157993)

<div class="topic-metadata">

**Author:** [@felipegiotto](https://www.ruby-forum.com/u/felipegiotto)\
**Replies:** 2\
**Last updated:** [January 28, 2009, 5:46pm UTC](https://www.ruby-forum.com/t/active-scaffold-i18n/157993 "2009-01-28T17:46:16Z")

</div>

Hello all, I have a project where I’m using active\_scaffold and would also like to use i18n over it. While the i18n works fine if I just ignore the active\_scaffold, I couldn’t get it running with it. I searched th…

---

## [Restful named member routs is not decoded correctly](https://www.ruby-forum.com/t/restful-named-member-routs-is-not-decoded-correctly/158826)

<div class="topic-metadata">

**Author:** [@marmolin](https://www.ruby-forum.com/u/marmolin)\
**Replies:** 1\
**Last updated:** [January 28, 2009, 5:37pm UTC](https://www.ruby-forum.com/t/restful-named-member-routs-is-not-decoded-correctly/158826 "2009-01-28T17:37:26Z")

</div>

I define my own member action in the root file as map.resources :helps map.resources :helps, :member =\> {:display =\> :put} The tables listed by rake routs displays the pathes and helpers as display\_help …

---

## [Ajax search feature works in FF but not IE](https://www.ruby-forum.com/t/ajax-search-feature-works-in-ff-but-not-ie/158796)

<div class="topic-metadata">

**Author:** [@rpardee](https://www.ruby-forum.com/u/rpardee)\
**Replies:** 2\
**Last updated:** [January 28, 2009, 5:22pm UTC](https://www.ruby-forum.com/t/ajax-search-feature-works-in-ff-but-not-ie/158796 "2009-01-28T17:22:39Z")

</div>

Hey All, I put a simple search box on my projects/index view, via the following observe\_field call: \<%= observe\_field(‘project\_search’, :url =\> { :controller =\> “projects”, :action =\> “index\_search”}, :update =\> “pr…

---

## [How to delete temp files](https://www.ruby-forum.com/t/how-to-delete-temp-files/158797)

<div class="topic-metadata">

**Author:** [@anton\_effendi](https://www.ruby-forum.com/u/anton_effendi)\
**Replies:** 1\
**Last updated:** [January 28, 2009, 4:43pm UTC](https://www.ruby-forum.com/t/how-to-delete-temp-files/158797 "2009-01-28T16:43:20Z")

</div>

Haii… any body can help me?? I want to delete temp file… in controller… can help me please…??? thank you. – Wu You Duan

---

## [How does facebookâ€™s Share a link feature work?](https://www.ruby-forum.com/t/how-does-facebooka-s-share-a-link-feature-work/158832)

<div class="topic-metadata">

**Author:** [@sallam](https://www.ruby-forum.com/u/sallam)\
**Replies:** 0\
**Last updated:** [January 28, 2009, 4:10pm UTC](https://www.ruby-forum.com/t/how-does-facebooka-s-share-a-link-feature-work/158832 "2009-01-28T16:10:26Z")

</div>

I wanted to implement that feature in a Rails application I’m buidling. A user posts a url, and voila, he gets a better representation for that url. I already dealt with a similar feature before where the requirement …

---

## [Site content blocks](https://www.ruby-forum.com/t/site-content-blocks/158808)

<div class="topic-metadata">

**Author:** [@torp](https://www.ruby-forum.com/u/torp)\
**Replies:** 1\
**Last updated:** [January 28, 2009, 4:07pm UTC](https://www.ruby-forum.com/t/site-content-blocks/158808 "2009-01-28T16:07:58Z")

</div>

newbie question: what is the best way in rails to make content managed data that isn’t iterated? eg. on a ‘contact us’ page i have an business address field that the client needs to be able to update, and there are ma…

---

## [Override or delete the layouts that are generated by scaffold generated code?](https://www.ruby-forum.com/t/override-or-delete-the-layouts-that-are-generated-by-scaffold-generated-code/158810)

<div class="topic-metadata">

**Author:** [@Marksu](https://www.ruby-forum.com/u/Marksu)\
**Replies:** 1\
**Last updated:** [January 28, 2009, 3:40pm UTC](https://www.ruby-forum.com/t/override-or-delete-the-layouts-that-are-generated-by-scaffold-generated-code/158810 "2009-01-28T15:40:15Z")

</div>

Is it possible to ‘override’ or remove the layouts that are generated by scaffold generated code? I have a application.html.erb layout that works perfectly with my CSS/ DIV based navigation and all I want to do is cre…

---

## [Submit buttons with rollover images](https://www.ruby-forum.com/t/submit-buttons-with-rollover-images/120725)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 1\
**Last updated:** [January 28, 2009, 2:14pm UTC](https://www.ruby-forum.com/t/submit-buttons-with-rollover-images/120725 "2009-01-28T14:14:27Z")

</div>

The image\_submit\_button helper makes it easy enough to use images as submit buttons, but they don’t have any rollover effects. I’ve seen various JS approaches to make this work, but I’m wondering if there’s a preferre…

---

## [Apply style in collection\_select?](https://www.ruby-forum.com/t/apply-style-in-collection-select/158806)

<div class="topic-metadata">

**Author:** [@dharmdip](https://www.ruby-forum.com/u/dharmdip)\
**Replies:** 3\
**Last updated:** [January 28, 2009, 11:43am UTC](https://www.ruby-forum.com/t/apply-style-in-collection-select/158806 "2009-01-28T11:43:52Z")

</div>

Hi to all, i have this snip i want to apply style to this combo but there is no effect help… \<%= collection\_select(:customer,:country\_id, @countries,:id, :country, html\_options={ “style” =\> “width:110px” },:onchange…

---

## [How to create a permanent record in table](https://www.ruby-forum.com/t/how-to-create-a-permanent-record-in-table/158361)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 4\
**Last updated:** [January 28, 2009, 10:31am UTC](https://www.ruby-forum.com/t/how-to-create-a-permanent-record-in-table/158361 "2009-01-28T10:31:57Z")

</div>

I want one record in my table to be undeletable by a user. I guess/know i can achieve this by writing code in my controller and model to only present the user with reocords which can be deleted but im wondering if the…

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

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