# Rails

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

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

---

## [Sakebar logo a bit racist?](https://www.ruby-forum.com/t/sakebar-logo-a-bit-racist/114760)

<div class="topic-metadata">

**Author:** [@blinking\_bear](https://www.ruby-forum.com/u/blinking_bear)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/sakebar-logo-a-bit-racist/114760 "2007-09-25T23:10:20Z")

</div>

http://sakebar.railsrumble.com/images/sake-doll.jpg

---

## [Deploy osx apache2 (plus php)](https://www.ruby-forum.com/t/deploy-osx-apache2-plus-php/85150)

<div class="topic-metadata">

**Author:** [@dankelley](https://www.ruby-forum.com/u/dankelley)\
**Replies:** 7\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/deploy-osx-apache2-plus-php/85150 "2007-09-25T23:10:20Z")

</div>

I’m under the understanding that it is a good practice to have apache2 installed for RoR, and so I’ve used macports on OSX to install that, and then I stopped the existing server and restarted the apache2 instance usi…

---

## [Newbie Help](https://www.ruby-forum.com/t/newbie-help/94446)

<div class="topic-metadata">

**Author:** [@dbrady010](https://www.ruby-forum.com/u/dbrady010)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/newbie-help/94446 "2007-09-25T23:10:19Z")

</div>

Is it my environment? Is something wrong, cause I thought this should just work? I have a simple table and I created a model and a controller: ruby script/generate controller Restaurant ruby script/generate model Res…

---

## [Strange thing with posting to this group](https://www.ruby-forum.com/t/strange-thing-with-posting-to-this-group/114706)

<div class="topic-metadata">

**Author:** [@winterheat](https://www.ruby-forum.com/u/winterheat)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/strange-thing-with-posting-to-this-group/114706 "2007-09-25T23:10:16Z")

</div>

like no matter if I email to this group or post to this group on google groups, with the subject deal with Controller and Action logic in RJS? then the message is on the google groups website, but a search of “RJS” …

---

## [Help understanding routes](https://www.ruby-forum.com/t/help-understanding-routes/85137)

<div class="topic-metadata">

**Author:** [@glenn](https://www.ruby-forum.com/u/glenn)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/help-understanding-routes/85137 "2007-09-25T23:10:16Z")

</div>

Hi Trying to get my head around routes, particularly RESTful routes, and mapping to controllers, and the magic urls that go with them. I have a model called course\_materials which acts\_as\_tree which also belongs\_to a…

---

## [Interesting Framework Speed Test Results. Shows Rails 1.2.1](https://www.ruby-forum.com/t/interesting-framework-speed-test-results-shows-rails-1-2-1/83870)

<div class="topic-metadata">

**Author:** [@marstoni](https://www.ruby-forum.com/u/marstoni)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/interesting-framework-speed-test-results-shows-rails-1-2-1/83870 "2007-09-25T23:10:15Z")

</div>

I found this little post over at the Slicehost forums (http:// forums.slicehost.com): http://www.alrond.com/en/2007/jan/25/performance-test-of-6-leading- frameworks/ Speed test between Rails (1.1.6 and 1.2.1), Django…

---

## [Rails Benchmarks with PostgreSQL and MySQL](https://www.ruby-forum.com/t/rails-benchmarks-with-postgresql-and-mysql/114777)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 5\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/rails-benchmarks-with-postgresql-and-mysql/114777 "2007-09-25T23:10:12Z")

</div>

Hello, I did some simple benchmarking tests on a PostgreSQL database and MySQL database. This isn’t meant to prove that one is better than the other, but is just an experiment. The tests were run on my laptop with th…

---

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

<div class="topic-metadata">

**Author:** [@huang\_zhimin](https://www.ruby-forum.com/u/huang_zhimin)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/problem/169921 "2007-09-25T23:10:10Z")

</div>

This is the source code generated by SaltedLoginGenerator @params\[‘user’\].delete(‘form’) Can anybody explain what the delete message do? – http://rubyforge.org/projects/ropenwiki/

---

## [Creating/modifying a class in Rails](https://www.ruby-forum.com/t/creating-modifying-a-class-in-rails/112651)

<div class="topic-metadata">

**Author:** [@shane](https://www.ruby-forum.com/u/shane)\
**Replies:** 6\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/creating-modifying-a-class-in-rails/112651 "2007-09-25T23:10:10Z")

</div>

Forgive me if this is a really stupid question, I’ve only started learning Rails. After some Googling and talking to some people, I still don’t know how to do this. Basically, what I want to do is to be able to creat…

---

## [TypeError: can't modify frozen string in 1.8.6](https://www.ruby-forum.com/t/typeerror-cant-modify-frozen-string-in-1-8-6/112657)

<div class="topic-metadata">

**Author:** [@jney](https://www.ruby-forum.com/u/jney)\
**Replies:** 6\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/typeerror-cant-modify-frozen-string-in-1-8-6/112657 "2007-09-25T23:10:09Z")

</div>

i just upgrade ruby from 1.8.5 to 1.8.6. And now i get an error when i’m dealing with dates : TypeError: can’t modify frozen string /opt/local/lib/ruby/1.8/date/format.rb:105:in chomp!' /opt/local/lib/ruby/1.8/date/fo…

---

## [Pre-loading the database?](https://www.ruby-forum.com/t/pre-loading-the-database/114657)

<div class="topic-metadata">

**Author:** [@phil](https://www.ruby-forum.com/u/phil)\
**Replies:** 6\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/pre-loading-the-database/114657 "2007-09-25T23:10:01Z")

</div>

I am sure this has been asked before, but, I can’t seem to find an example. Our app needs a bunch of data pre-loaded into the database. What is the ‘accepted’ way of doing this? Do I put the data into a migration? Th…

---

## [ERB in Javascript](https://www.ruby-forum.com/t/erb-in-javascript/114766)

<div class="topic-metadata">

**Author:** [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 11:10pm UTC](https://www.ruby-forum.com/t/erb-in-javascript/114766 "2007-09-25T23:10:00Z")

</div>

Hi, I would like to use some ERB in my javascript files. How can I do this?

---

## [Check\_box\_tag always checked](https://www.ruby-forum.com/t/check-box-tag-always-checked/114771)

<div class="topic-metadata">

**Author:** [@creativelogic](https://www.ruby-forum.com/u/creativelogic)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:09pm UTC](https://www.ruby-forum.com/t/check-box-tag-always-checked/114771 "2007-09-25T23:09:57Z")

</div>

\#check\_box and #check\_box\_tag are going to be the end of me. Why is this always checked? \<% checked = @reservation.selected ? ‘checked’ : nil %\> \<%= check\_box\_tag("reservation\[" + @reservation.id.to\_s + "\]\[selected\]"…

---

## [Charts & reports](https://www.ruby-forum.com/t/charts-reports/87916)

<div class="topic-metadata">

**Author:** [@Tarek\_E](https://www.ruby-forum.com/u/Tarek_E)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 11:09pm UTC](https://www.ruby-forum.com/t/charts-reports/87916 "2007-09-25T23:09:55Z")

</div>

Hi all I am beginner using ruby & am working on a ruby on rails project (point of sale) & I was wondering if I can have a tool to generate charts & reports , can anyone help me please. – Tarek E. Computer and Sys…

---

## [Problem validating uniqueness](https://www.ruby-forum.com/t/problem-validating-uniqueness/113615)

<div class="topic-metadata">

**Author:** [@mike](https://www.ruby-forum.com/u/mike)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 11:09pm UTC](https://www.ruby-forum.com/t/problem-validating-uniqueness/113615 "2007-09-25T23:09:49Z")

</div>

I have validates\_uniqueness\_of :name in my model which works fine when creating a record but doesn’t work when I edit the record. In other words it won’t let me create a record with the same name but I can go in after…

---

## [ActiveMerchant Help](https://www.ruby-forum.com/t/activemerchant-help/86355)

<div class="topic-metadata">

**Author:** [@barrysfarm](https://www.ruby-forum.com/u/barrysfarm)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 11:09pm UTC](https://www.ruby-forum.com/t/activemerchant-help/86355 "2007-09-25T23:09:48Z")

</div>

Does anyone know of any good resources for getting ActiveMerchant up and running? I’m trying to get it set up via Paypal Pro and i can’t find detailed, clear directions on setting it up. It’s hard to know where to put…

---

## [Newbie question about POSTing xml file to RESTful rails app](https://www.ruby-forum.com/t/newbie-question-about-posting-xml-file-to-restful-rails-app/83910)

<div class="topic-metadata">

**Author:** [@tomPorter](https://www.ruby-forum.com/u/tomPorter)\
**Replies:** 5\
**Last updated:** [September 25, 2007, 11:09pm UTC](https://www.ruby-forum.com/t/newbie-question-about-posting-xml-file-to-restful-rails-app/83910 "2007-09-25T23:09:41Z")

</div>

I have a newbie question about creating a new item using REST in rails 1.2. I created my project: ‘rails mra -d sqlite3’ I generate all I can: ‘cd mra’ ‘script/generate scaffold\_resource widget name:string des…

---

## [Form\_remote\_tag not providing params in Ajax](https://www.ruby-forum.com/t/form-remote-tag-not-providing-params-in-ajax/114230)

<div class="topic-metadata">

**Author:** [@chris](https://www.ruby-forum.com/u/chris)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 11:09pm UTC](https://www.ruby-forum.com/t/form-remote-tag-not-providing-params-in-ajax/114230 "2007-09-25T23:09:38Z")

</div>

I’m new to Ruby, Rails and Ajax and I’m trying to do something seemingly simple. I am trying to use a value someone supplies in a form in another form that is dynamically generated using Ajax. I have the following co…

---

## [Ajuby 0.4 release](https://www.ruby-forum.com/t/ajuby-0-4-release/84394)

<div class="topic-metadata">

**Author:** [@Ajuby\_Ruby](https://www.ruby-forum.com/u/Ajuby_Ruby)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 11:09pm UTC](https://www.ruby-forum.com/t/ajuby-0-4-release/84394 "2007-09-25T23:09:38Z")

</div>

Friends, We have released Ajuby 0.4. Please test drive and let us know how we can improve this further. Would love to address specific problems rather than making a yet-another-framework. We are aiming to fill the …

---

## [PHP "stripclashes" equivalent in Ruby/Rails?](https://www.ruby-forum.com/t/php-stripclashes-equivalent-in-ruby-rails/110033)

<div class="topic-metadata">

**Author:** [@thabenksta](https://www.ruby-forum.com/u/thabenksta)\
**Replies:** 7\
**Last updated:** [September 25, 2007, 11:09pm UTC](https://www.ruby-forum.com/t/php-stripclashes-equivalent-in-ruby-rails/110033 "2007-09-25T23:09:24Z")

</div>

I’m porting some code from PHP into Rails; is there an equivalent of the PHP “stripcslashes” function in Ruby/Rails? http://us.php.net/stripcslashes

---

## [Case Statement](https://www.ruby-forum.com/t/case-statement/108933)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 10\
**Last updated:** [September 25, 2007, 11:09pm UTC](https://www.ruby-forum.com/t/case-statement/108933 "2007-09-25T23:09:17Z")

</div>

Hi! I am trying to switch from PHP to RoR. In my database, I have an integer represent a string. So, for example, a row would have a 1, 2, or 3. For example… 1 = Low 2 = Medium 3 = High I do not have the Low/Me…

---

## [Controller filter exludes w/ controller](https://www.ruby-forum.com/t/controller-filter-exludes-w-controller/114670)

<div class="topic-metadata">

**Author:** [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:09pm UTC](https://www.ruby-forum.com/t/controller-filter-exludes-w-controller/114670 "2007-09-25T23:09:17Z")

</div>

Hi, I have this before filter on my application controller for authentication purposes: class ApplicationController \< ActionController::Base before\_filter :check\_authentication, :check\_authorization, :except =\> \[:…

---

## [Rails application directory](https://www.ruby-forum.com/t/rails-application-directory/84841)

<div class="topic-metadata">

**Author:** [@Diego](https://www.ruby-forum.com/u/Diego)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:09pm UTC](https://www.ruby-forum.com/t/rails-application-directory/84841 "2007-09-25T23:09:13Z")

</div>

Hi all, I was wondering if there was a kosher way of getting the complete path to the root location of a Rails app? I know there’s ROOT\_PATH, but I think that changes when I do Dir.chdir() to some other location. Or a…

---

## [Help escaping column name in a migration file](https://www.ruby-forum.com/t/help-escaping-column-name-in-a-migration-file/112668)

<div class="topic-metadata">

**Author:** [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:09pm UTC](https://www.ruby-forum.com/t/help-escaping-column-name-in-a-migration-file/112668 "2007-09-25T23:09:12Z")

</div>

My DB column is name “3gp”, but the below is invalid syntax. How can i express this in ruby? class CreateVideos \< ActiveRecord::Migration def self.up create\_table :videos do |t| t.column :x, :integer t.column :y, :…

---

## [Checkbox and Ajax](https://www.ruby-forum.com/t/checkbox-and-ajax/114609)

<div class="topic-metadata">

**Author:** [@bradigan](https://www.ruby-forum.com/u/bradigan)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:08pm UTC](https://www.ruby-forum.com/t/checkbox-and-ajax/114609 "2007-09-25T23:08:19Z")

</div>

hello, I am trying to display a Textarea if a user checks the checkbox and hides the textarea if the checkbox is not clicked. I can get the display working properly, however the actual checkbox is not actually checkin…

---

## [A real puzzler: attr\_accessor / create incompatibility?](https://www.ruby-forum.com/t/a-real-puzzler-attr-accessor-create-incompatibility/89684)

<div class="topic-metadata">

**Author:** [@PSSS\_S](https://www.ruby-forum.com/u/PSSS_S)\
**Replies:** 2\
**Last updated:** [September 25, 2007, 11:08pm UTC](https://www.ruby-forum.com/t/a-real-puzzler-attr-accessor-create-incompatibility/89684 "2007-09-25T23:08:12Z")

</div>

Greetings, I have a problem with attr\_accessor and create seemingly being at odds with each other in my environment. Here is the setup: A simple class representing a US State (say, Maine for example): class State \< A…

---

## [Custom REST routes](https://www.ruby-forum.com/t/custom-rest-routes/115507)

<div class="topic-metadata">

**Author:** [@daz](https://www.ruby-forum.com/u/daz)\
**Replies:** 4\
**Last updated:** [September 25, 2007, 11:08pm UTC](https://www.ruby-forum.com/t/custom-rest-routes/115507 "2007-09-25T23:08:10Z")

</div>

Is there any way of getting the nice url methods such as new\_page\_path that you get when you declare map.resource :pages in routes.rb? Here is my situation: I have a Page model with lots of pages that use acts\_as\_li…

---

## [Ajax To-do List](https://www.ruby-forum.com/t/ajax-to-do-list/89968)

<div class="topic-metadata">

**Author:** [@john\_old](https://www.ruby-forum.com/u/john_old)\
**Replies:** 1\
**Last updated:** [September 25, 2007, 11:08pm UTC](https://www.ruby-forum.com/t/ajax-to-do-list/89968 "2007-09-25T23:08:08Z")

</div>

Hey there, I had a question regarding creating an AJAX to-do list (it’s not actually a to-do list but for the purposes of simplicity it answers the same question). Essentially, when you add a to-do item, I re-render …

---

## [SSL on Rails questions](https://www.ruby-forum.com/t/ssl-on-rails-questions/87187)

<div class="topic-metadata">

**Author:** [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:08pm UTC](https://www.ruby-forum.com/t/ssl-on-rails-questions/87187 "2007-09-25T23:08:03Z")

</div>

Greetings! Please forgive the cross post. This is my first experience with implementing SSL, so I’m not even sure if this is an application development or deployment issue. I hope you’ll forgive the “stupid newbie”…

---

## [Server pdf from controller](https://www.ruby-forum.com/t/server-pdf-from-controller/114779)

<div class="topic-metadata">

**Author:** [@eggie5](https://www.ruby-forum.com/u/eggie5)\
**Replies:** 3\
**Last updated:** [September 25, 2007, 11:08pm UTC](https://www.ruby-forum.com/t/server-pdf-from-controller/114779 "2007-09-25T23:08:03Z")

</div>

Hi, I want to serve a pdf from my controller. I have the file system path to the PDF how can I do this?

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

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