# Rails

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

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

---

## [Changing text in view with variables](https://www.ruby-forum.com/t/changing-text-in-view-with-variables/136430)

<div class="topic-metadata">

**Author:** [@OhMyRuby](https://www.ruby-forum.com/u/OhMyRuby)\
**Replies:** 5\
**Last updated:** [May 2, 2008, 2:43am UTC](https://www.ruby-forum.com/t/changing-text-in-view-with-variables/136430 "2008-05-02T02:43:21Z")

</div>

in my view: \<% if @main\_singer\_1 == @your\_singer %\> \<% if @main\_drummer\_1 == @your\_drummer %\> i want to have this in a loop so i can change \_1 How would I do this. I have some idea but I am not sure. \[1…20\].each do…

---

## [Validates\_presence\_of with validates\_each dont work together](https://www.ruby-forum.com/t/validates-presence-of-with-validates-each-dont-work-together/88243)

<div class="topic-metadata">

**Author:** [@Jorge\_Mario\_GSMazo](https://www.ruby-forum.com/u/Jorge_Mario_GSMazo)\
**Replies:** 2\
**Last updated:** [May 2, 2008, 2:34am UTC](https://www.ruby-forum.com/t/validates-presence-of-with-validates-each-dont-work-together/88243 "2008-05-02T02:34:47Z")

</div>

Hi there how do I make validates\_presence\_of and validates each work? here is my code #validates\_presence\_of :quantity #validates\_numericality\_of :quantity validates\_each :quantity do |record, attr, value| if value…

---

## [Could someone explain this (transaction-related)?](https://www.ruby-forum.com/t/could-someone-explain-this-transaction-related/136426)

<div class="topic-metadata">

**Author:** [@kuma](https://www.ruby-forum.com/u/kuma)\
**Replies:** 1\
**Last updated:** [May 1, 2008, 11:51pm UTC](https://www.ruby-forum.com/t/could-someone-explain-this-transaction-related/136426 "2008-05-01T23:51:51Z")

</div>

Hi all, I was testing, and found a nested transaction (which I know is bad), and there’s something I don’t understand. If an exception occurs during a transaction, it is supposed to roll back. In a nested transactio…

---

## [Refreshing a div with preformated text](https://www.ruby-forum.com/t/refreshing-a-div-with-preformated-text/136415)

<div class="topic-metadata">

**Author:** [@joel](https://www.ruby-forum.com/u/joel)\
**Replies:** 2\
**Last updated:** [May 1, 2008, 11:17pm UTC](https://www.ruby-forum.com/t/refreshing-a-div-with-preformated-text/136415 "2008-05-01T23:17:20Z")

</div>

Hello, Just would like to know how I can refresh a div with formatted text ( html code ) on user onclick action on menu items. I guess I could to this with prototype but should I use the link\_remote\_tag ? In my case …

---

## [Acts\_as outside of Rails](https://www.ruby-forum.com/t/acts-as-outside-of-rails/136424)

<div class="topic-metadata">

**Author:** [@smurfherder](https://www.ruby-forum.com/u/smurfherder)\
**Replies:** 1\
**Last updated:** [May 1, 2008, 11:12pm UTC](https://www.ruby-forum.com/t/acts-as-outside-of-rails/136424 "2008-05-01T23:12:40Z")

</div>

I want to use acts\_as plugins that work with active\_record outside of rails as well as with rails. AR got installed as a gem, but since 2.0.x it ships without the old standard acts\_as\_list, acts\_as\_nested\_set, etc. …

---

## [Javascript color picker yields strange errors](https://www.ruby-forum.com/t/javascript-color-picker-yields-strange-errors/136418)

<div class="topic-metadata">

**Author:** [@railsdog](https://www.ruby-forum.com/u/railsdog)\
**Replies:** 0\
**Last updated:** [May 1, 2008, 10:32pm UTC](https://www.ruby-forum.com/t/javascript-color-picker-yields-strange-errors/136418 "2008-05-01T22:32:17Z")

</div>

First off, I am by no means Javascript-literate… but this little tool looks promising or what I have in mind: http://www.knallgrau.at/code/colorpicker I have it working ot the point where my users can select their pr…

---

## [Why doesn't my user-entered data persist after validation/preview in my multi-model form?](https://www.ruby-forum.com/t/why-doesnt-my-user-entered-data-persist-after-validation-preview-in-my-multi-model-form/136334)

<div class="topic-metadata">

**Author:** [@ebrad](https://www.ruby-forum.com/u/ebrad)\
**Replies:** 7\
**Last updated:** [May 1, 2008, 10:32pm UTC](https://www.ruby-forum.com/t/why-doesnt-my-user-entered-data-persist-after-validation-preview-in-my-multi-model-form/136334 "2008-05-01T22:32:01Z")

</div>

I’m creating a timesheet application where a “Timesheet” object has 7 “TimesheetDays” objects. Everything works fine until error validation or a ‘preview’ (after calculations) when the form is re-rendered. The data in…

---

## [Problems with passing :locals to a partial](https://www.ruby-forum.com/t/problems-with-passing-locals-to-a-partial/136406)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [May 1, 2008, 10:26pm UTC](https://www.ruby-forum.com/t/problems-with-passing-locals-to-a-partial/136406 "2008-05-01T22:26:11Z")

</div>

I have: \<% @link\_categories.each do |lc| %\> … \<%= link\_to\_function (image\_tag “icons/bullet\_add\_green.png”, :align =\> “absmiddle”, :border =\> 0), “show category” do |page| page\[:subcategory\].toggle page\[:subcatego…

---

## [Returning to multiple controllers from a single view](https://www.ruby-forum.com/t/returning-to-multiple-controllers-from-a-single-view/136206)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 18\
**Last updated:** [May 1, 2008, 10:20pm UTC](https://www.ruby-forum.com/t/returning-to-multiple-controllers-from-a-single-view/136206 "2008-05-01T22:20:54Z")

</div>

Given: class Entity has\_one :client class Client belongs\_to :entity I have the situation where a client role either can be created coincidentally with an entity or subsequent to an entity’s creation. I have th…

---

## [Quick Submit Button Question](https://www.ruby-forum.com/t/quick-submit-button-question/136331)

<div class="topic-metadata">

**Author:** [@sithadmin](https://www.ruby-forum.com/u/sithadmin)\
**Replies:** 5\
**Last updated:** [May 1, 2008, 9:41pm UTC](https://www.ruby-forum.com/t/quick-submit-button-question/136331 "2008-05-01T21:41:43Z")

</div>

Hello, Can I pass a variable from a submit button only? I have a form that the user fills out and I need two different submit buttons - one for ‘sync’ and one for ‘full push’. I was thinking I could add some sort of p…

---

## [Hosting rails with domain name on leased server](https://www.ruby-forum.com/t/hosting-rails-with-domain-name-on-leased-server/136396)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 1\
**Last updated:** [May 1, 2008, 9:38pm UTC](https://www.ruby-forum.com/t/hosting-rails-with-domain-name-on-leased-server/136396 "2008-05-01T21:38:42Z")

</div>

Hello, I have developed a rails application and i have a leased server from a company called poundhost. I have purchased a domain name from another company. Presently i use mongrel to run my application from the leas…

---

## [Need some help understanding partials, versus authentication](https://www.ruby-forum.com/t/need-some-help-understanding-partials-versus-authentication/136411)

<div class="topic-metadata">

**Author:** [@dhmspector](https://www.ruby-forum.com/u/dhmspector)\
**Replies:** 0\
**Last updated:** [May 1, 2008, 8:37pm UTC](https://www.ruby-forum.com/t/need-some-help-understanding-partials-versus-authentication/136411 "2008-05-01T20:37:29Z")

</div>

Hi, I am using Rick O.'s restful\_authentication plugin, using activefx’s great tutorial (http://www.railsforum.com/viewtopic.php? id=14216) which works well but I am trying to understand how to use partial to modify…

---

## [Need help interpreting bleak house output](https://www.ruby-forum.com/t/need-help-interpreting-bleak-house-output/136408)

<div class="topic-metadata">

**Author:** [@kyle](https://www.ruby-forum.com/u/kyle)\
**Replies:** 1\
**Last updated:** [May 1, 2008, 8:36pm UTC](https://www.ruby-forum.com/t/need-help-interpreting-bleak-house-output/136408 "2008-05-01T20:36:18Z")

</div>

Hello! I haven’t been able to find much on how to interpret the output from bleak house. I got this after exercising my app for a little while. Does anybody see anything suspicious? 342727 total objects Final heap…

---

## [What is .....undefined method \`authenticate'](https://www.ruby-forum.com/t/what-is-undefined-method-authenticate/136326)

<div class="topic-metadata">

**Author:** [@manish](https://www.ruby-forum.com/u/manish)\
**Replies:** 4\
**Last updated:** [May 1, 2008, 8:10pm UTC](https://www.ruby-forum.com/t/what-is-undefined-method-authenticate/136326 "2008-05-01T20:10:10Z")

</div>

def login\_submit if session\[‘user’\] @logged\_in = true else @logged\_in = false end @user = User.new(params\[‘user’\]) if session\[‘user’\] = User.authenticate(params\[‘user’\]\[‘username’\], params\[‘user’\]\[‘password’\]) f…

---

## [Problems using Gettext 1.90.0 update\_pofiles](https://www.ruby-forum.com/t/problems-using-gettext-1-90-0-update-pofiles/135986)

<div class="topic-metadata">

**Author:** [@vaughanjackson](https://www.ruby-forum.com/u/vaughanjackson)\
**Replies:** 2\
**Last updated:** [May 1, 2008, 7:57pm UTC](https://www.ruby-forum.com/t/problems-using-gettext-1-90-0-update-pofiles/135986 "2008-05-01T19:57:05Z")

</div>

Hi, I’m a newbie to Ruby and Rails. I am following Sascha E.'s tutorial on Gettext at Peak Obsession. This tutorial describes a step in which update\_pofiles is used to generate the .pot and .po files from .rb and .rh…

---

## [Hashes and Regexes and Special Characters](https://www.ruby-forum.com/t/hashes-and-regexes-and-special-characters/136399)

<div class="topic-metadata">

**Author:** [@armstheykill](https://www.ruby-forum.com/u/armstheykill)\
**Replies:** 2\
**Last updated:** [May 1, 2008, 7:52pm UTC](https://www.ruby-forum.com/t/hashes-and-regexes-and-special-characters/136399 "2008-05-01T19:52:37Z")

</div>

I am rolling my own smiley/emoticon generator. A lot of this has do do with my less than stellar knowledge of ruby, so if this is better asked on a ruby list, let me know and I’ll move along… I have text based emotic…

---

## [Ajax + Format.js = :(](https://www.ruby-forum.com/t/ajax-format-js/136397)

<div class="topic-metadata">

**Author:** [@Matt\_Grande](https://www.ruby-forum.com/u/Matt_Grande)\
**Replies:** 1\
**Last updated:** [May 1, 2008, 6:57pm UTC](https://www.ruby-forum.com/t/ajax-format-js/136397 "2008-05-01T18:57:06Z")

</div>

Hi all, I’m calling a method in my controller like this: \<%= link\_to\_remote ‘Search’, :url =\> customers\_path + ‘.js’, :with =\> “‘name=’ + $(‘name’).value”, :method =\> :get, :update =\> ‘customers’ - %\> And then updat…

---

## [Sort by column headers in Rails 2.0](https://www.ruby-forum.com/t/sort-by-column-headers-in-rails-2-0/132415)

<div class="topic-metadata">

**Author:** [@loominator1970](https://www.ruby-forum.com/u/loominator1970)\
**Replies:** 1\
**Last updated:** [May 1, 2008, 6:02pm UTC](https://www.ruby-forum.com/t/sort-by-column-headers-in-rails-2-0/132415 "2008-05-01T18:02:50Z")

</div>

hello, I’m attempting to implement the code created by Dave B. to sort by column headers shown here: http://www.koders.com/ruby/fidA98C27CE5EEE13550817B81CF0B07DAADAAA9B37.aspx?s=sort#L1 Well, i wouldn’t be writing h…

---

## [Record gets destroyed unexpectedly](https://www.ruby-forum.com/t/record-gets-destroyed-unexpectedly/136368)

<div class="topic-metadata">

**Author:** [@davidtl](https://www.ruby-forum.com/u/davidtl)\
**Replies:** 15\
**Last updated:** [May 1, 2008, 5:27pm UTC](https://www.ruby-forum.com/t/record-gets-destroyed-unexpectedly/136368 "2008-05-01T17:27:54Z")

</div>

I have got a list of records that belongs to a specific user in the “index” action. Each list item has got a “delete” link that links to the “destroy” action. Sounds very usual, right? But everytime I press the “dele…

---

## [How to create database mysql](https://www.ruby-forum.com/t/how-to-create-database-mysql/136380)

<div class="topic-metadata">

**Author:** [@mani](https://www.ruby-forum.com/u/mani)\
**Replies:** 3\
**Last updated:** [May 1, 2008, 5:19pm UTC](https://www.ruby-forum.com/t/how-to-create-database-mysql/136380 "2008-05-01T17:19:40Z")

</div>

it is creating database.yml in sqlite format how can i create database in mydql

---

## [Strategy for importing temporary .csv file?](https://www.ruby-forum.com/t/strategy-for-importing-temporary-csv-file/136387)

<div class="topic-metadata">

**Author:** [@Kathleen\_Kennedy](https://www.ruby-forum.com/u/Kathleen_Kennedy)\
**Replies:** 1\
**Last updated:** [May 1, 2008, 4:28pm UTC](https://www.ruby-forum.com/t/strategy-for-importing-temporary-csv-file/136387 "2008-05-01T16:28:32Z")

</div>

For some reason, I’ve posted this question to this forum 4 times now and it never appears in the daily consolidated email I get daily? I’ve written a routine allowing the client user to declare where their .csv import…

---

## [Better way to remove value from list?](https://www.ruby-forum.com/t/better-way-to-remove-value-from-list/136229)

<div class="topic-metadata">

**Author:** [@newrubygirl](https://www.ruby-forum.com/u/newrubygirl)\
**Replies:** 10\
**Last updated:** [May 1, 2008, 3:22pm UTC](https://www.ruby-forum.com/t/better-way-to-remove-value-from-list/136229 "2008-05-01T15:22:38Z")

</div>

I’ve got a field in a database that contains a string of ids. I want to be able to remove an item from that list and save the list again. The only way I saw how to do this was to convert it to an array and back to a …

---

## [CSS Styling Conventions/Standards](https://www.ruby-forum.com/t/css-styling-conventions-standards/136379)

<div class="topic-metadata">

**Author:** [@T\_K](https://www.ruby-forum.com/u/T_K)\
**Replies:** 1\
**Last updated:** [May 1, 2008, 3:14pm UTC](https://www.ruby-forum.com/t/css-styling-conventions-standards/136379 "2008-05-01T15:14:23Z")

</div>

Hi, Is there any set of rule that people generally follow when they write CSS files? This question is not directly related to Rails. Yet, CSS is part of development. Some use indents to show hierarchy; other don’t. …

---

## [Serializing a non-form input for a link\_to\_remote call--how to do it?](https://www.ruby-forum.com/t/serializing-a-non-form-input-for-a-link-to-remote-call-how-to-do-it/136230)

<div class="topic-metadata">

**Author:** [@rpardee](https://www.ruby-forum.com/u/rpardee)\
**Replies:** 13\
**Last updated:** [May 1, 2008, 3:00pm UTC](https://www.ruby-forum.com/t/serializing-a-non-form-input-for-a-link-to-remote-call-how-to-do-it/136230 "2008-05-01T15:00:18Z")

</div>

Hey All, I’m still working on my ‘add people to this project’ feature for my / projects/edit view. I’ve got a very nice AJAX search feature (thanks to the kind help here) that allows users to generate a list of peopl…

---

## [Ssl\_requirement, posts change to get and parameters are lost](https://www.ruby-forum.com/t/ssl-requirement-posts-change-to-get-and-parameters-are-lost/128033)

<div class="topic-metadata">

**Author:** [@bartb](https://www.ruby-forum.com/u/bartb)\
**Replies:** 5\
**Last updated:** [May 1, 2008, 2:15pm UTC](https://www.ruby-forum.com/t/ssl-requirement-posts-change-to-get-and-parameters-are-lost/128033 "2008-05-01T14:15:31Z")

</div>

Hi, I hope this isn’t a stupid question but I’ve searched all over and can’t find any one else having the same issue. I have just tried to add ssl to my app using ssl\_requirement. I have hit a snag when my product p…

---

## [Connecting with mysql](https://www.ruby-forum.com/t/connecting-with-mysql/136290)

<div class="topic-metadata">

**Author:** [@mani](https://www.ruby-forum.com/u/mani)\
**Replies:** 3\
**Last updated:** [May 1, 2008, 1:09pm UTC](https://www.ruby-forum.com/t/connecting-with-mysql/136290 "2008-05-01T13:09:48Z")

</div>

I created new project with rails mysql -d but now I am creating controller I am getting error I also installed mysql with gem install mysql Access denied for user ‘root’@‘localhost’ (using password: NO) what is the …

---

## [Rescue\_from issue with AWS - uninitialized constant](https://www.ruby-forum.com/t/rescue-from-issue-with-aws-uninitialized-constant/136267)

<div class="topic-metadata">

**Author:** [@Kip](https://www.ruby-forum.com/u/Kip)\
**Replies:** 7\
**Last updated:** [May 1, 2008, 12:30pm UTC](https://www.ruby-forum.com/t/rescue-from-issue-with-aws-uninitialized-constant/136267 "2008-05-01T12:30:53Z")

</div>

The new rescue\_from in edge rails seems to conflict with ActionWebService, which I need for various other purposes. When I define, for example (with AWS gem installed): rescue\_from ActionController::RoutingError, :wi…

---

## [Best practice for object transaction?](https://www.ruby-forum.com/t/best-practice-for-object-transaction/136312)

<div class="topic-metadata">

**Author:** [@fxn](https://www.ruby-forum.com/u/fxn)\
**Replies:** 6\
**Last updated:** [May 1, 2008, 11:59am UTC](https://www.ruby-forum.com/t/best-practice-for-object-transaction/136312 "2008-05-01T11:59:44Z")

</div>

I have a new @offer that needs to generate a document if saved. But that’s all or nothing: transaction do @offer.save! generate\_document end # handle exceptions if needed If save! fails everything is fine, but if …

---

## [Passenger (mod\_rails)](https://www.ruby-forum.com/t/passenger-mod-rails/134645)

<div class="topic-metadata">

**Author:** [@jmcervera](https://www.ruby-forum.com/u/jmcervera)\
**Replies:** 4\
**Last updated:** [May 1, 2008, 10:27am UTC](https://www.ruby-forum.com/t/passenger-mod-rails/134645 "2008-05-01T10:27:37Z")

</div>

I am trying to do some testing with mod\_rails. I think I have everything well configured, but when I try to get to my application I get an internal server error and this message in the error log: \[Sun Apr 13 11:23:14…

---

## [Ruby application for sql statements](https://www.ruby-forum.com/t/ruby-application-for-sql-statements/196661)

<div class="topic-metadata">

**Author:** [@StudxXxent](https://www.ruby-forum.com/u/StudxXxent)\
**Replies:** 1\
**Last updated:** [May 1, 2008, 10:19am UTC](https://www.ruby-forum.com/t/ruby-application-for-sql-statements/196661 "2008-05-01T10:19:04Z")

</div>

Hello everybody, I am currently working on a database system that utilizes ruby on rails with a oracle database. Here’s the situation: the ruby on rails web application is up and running (scaffolds have been genera…

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

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