# Rails

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

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

---

## [How do you manually specify the name of a submit button?](https://www.ruby-forum.com/t/how-do-you-manually-specify-the-name-of-a-submit-button/185267)

<div class="topic-metadata">

**Author:** [@ct9a](https://www.ruby-forum.com/u/ct9a)\
**Replies:** 8\
**Last updated:** [March 17, 2010, 11:28am UTC](https://www.ruby-forum.com/t/how-do-you-manually-specify-the-name-of-a-submit-button/185267 "2010-03-17T11:28:16Z")

</div>

hi, guys, I have an app which has two forms on the page. Both forms are based on a “search” model. Search by keyword only (hence, only 1 element being “keyword”) Search by a few different attributes (including keywor…

---

## [Rails 3 and Haml breaks ERB](https://www.ruby-forum.com/t/rails-3-and-haml-breaks-erb/185274)

<div class="topic-metadata">

**Author:** [@sigvei](https://www.ruby-forum.com/u/sigvei)\
**Replies:** 1\
**Last updated:** [March 17, 2010, 10:43am UTC](https://www.ruby-forum.com/t/rails-3-and-haml-breaks-erb/185274 "2010-03-17T10:43:11Z")

</div>

I installed rails 3.0 beta and haml 2.2.21 and created a new project, and initalized haml for it. I then generate a standard ERb scaffold (rails scaffold Person name:string) and add “gem ‘haml’” to the Gemfile. When …

---

## [Xss](https://www.ruby-forum.com/t/xss/185151)

<div class="topic-metadata">

**Author:** [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Replies:** 6\
**Last updated:** [March 17, 2010, 10:14am UTC](https://www.ruby-forum.com/t/xss/185151 "2010-03-17T10:14:30Z")

</div>

Hi Google Code Archive - Long-term storage for Google Code Project Hosting. I have found this rails plugin which automatically removes XSS from models upon saving. This is great. My concern is, which is the best choi…

---

## [How to install rails without gems?!](https://www.ruby-forum.com/t/how-to-install-rails-without-gems/184424)

<div class="topic-metadata">

**Author:** [@janita\_kinsi](https://www.ruby-forum.com/u/janita_kinsi)\
**Replies:** 4\
**Last updated:** [March 17, 2010, 9:51am UTC](https://www.ruby-forum.com/t/how-to-install-rails-without-gems/184424 "2010-03-17T09:51:40Z")

</div>

i have install ruby on my computer. but what if i want to install rails manually without install gem first?!

---

## [Before\_filters on re-rendered methods - what is the correct RAILS way?](https://www.ruby-forum.com/t/before-filters-on-re-rendered-methods-what-is-the-correct-rails-way/185217)

<div class="topic-metadata">

**Author:** [@Chris\_Mayan](https://www.ruby-forum.com/u/Chris_Mayan)\
**Replies:** 3\
**Last updated:** [March 17, 2010, 9:35am UTC](https://www.ruby-forum.com/t/before-filters-on-re-rendered-methods-what-is-the-correct-rails-way/185217 "2010-03-17T09:35:58Z")

</div>

Hello, My Question: How can one have the equivalent of “before\_filter” checking (e.g. to require a user to be logged in before carrying out an action) on a method when the method is called implicitly inside another ac…

---

## [Get lng and lat from Google maps](https://www.ruby-forum.com/t/get-lng-and-lat-from-google-maps/185271)

<div class="topic-metadata">

**Author:** [@mohammed\_a](https://www.ruby-forum.com/u/mohammed_a)\
**Replies:** 1\
**Last updated:** [March 17, 2010, 9:32am UTC](https://www.ruby-forum.com/t/get-lng-and-lat-from-google-maps/185271 "2010-03-17T09:32:50Z")

</div>

Hi I am trying to have a google map where the user can click on the map and choose a location. After that, I need to save the lng and lat chosen by the user from the map into the database using rails. What would be t…

---

## [Add a method for approving/disapproving content](https://www.ruby-forum.com/t/add-a-method-for-approving-disapproving-content/185266)

<div class="topic-metadata">

**Author:** [@davidjrice](https://www.ruby-forum.com/u/davidjrice)\
**Replies:** 3\
**Last updated:** [March 17, 2010, 7:18am UTC](https://www.ruby-forum.com/t/add-a-method-for-approving-disapproving-content/185266 "2010-03-17T07:18:21Z")

</div>

Hey everyone, This is my first post to the forums. I’m trying to add an ‘approve’ and ‘disapprove’ link for new content to my website. I thought I should just add two links to the “show” view to trigger the “approve…

---

## [\[ann\] Rubynation DC April 9-10](https://www.ruby-forum.com/t/ann-rubynation-dc-april-9-10/185264)

<div class="topic-metadata">

**Author:** [@grayherter](https://www.ruby-forum.com/u/grayherter)\
**Replies:** 0\
**Last updated:** [March 17, 2010, 3:47am UTC](https://www.ruby-forum.com/t/ann-rubynation-dc-april-9-10/185264 "2010-03-17T03:47:05Z")

</div>

Just a note to remind everyone that the RubyNation conference is around the corner, less than one month away. We are getting close to sold out, so help us push this thing over the top! This year we have more (and bett…

---

## [Noob stuck - complex model relationships and one of two foreign keys not getting saved or updated](https://www.ruby-forum.com/t/noob-stuck-complex-model-relationships-and-one-of-two-foreign-keys-not-getting-saved-or-updated/185257)

<div class="topic-metadata">

**Author:** [@ander31415](https://www.ruby-forum.com/u/ander31415)\
**Replies:** 2\
**Last updated:** [March 17, 2010, 12:46am UTC](https://www.ruby-forum.com/t/noob-stuck-complex-model-relationships-and-one-of-two-foreign-keys-not-getting-saved-or-updated/185257 "2010-03-17T00:46:12Z")

</div>

Rather than posting my code and asking “what’s wrong”, here’s a simpler version: The problem is my C’s are not saving or updating the foreign key for B when I create or update a C. The foreign key value remains nil. …

---

## [Error created with using "script/generate" command](https://www.ruby-forum.com/t/error-created-with-using-script-generate-command/185258)

<div class="topic-metadata">

**Author:** [@gregnewman](https://www.ruby-forum.com/u/gregnewman)\
**Replies:** 1\
**Last updated:** [March 17, 2010, 12:16am UTC](https://www.ruby-forum.com/t/error-created-with-using-script-generate-command/185258 "2010-03-17T00:16:22Z")

</div>

When attempting to create some Rails components using below command, I receive the following errors: \[root@localhost blog\]# rake db:create (in /root/work/blog) db/development.sqlite3 already exists \[root@localhost …

---

## [\[JOBS\] Ruby Developer needed](https://www.ruby-forum.com/t/jobs-ruby-developer-needed/185260)

<div class="topic-metadata">

**Author:** [@Darren\_Fernandes](https://www.ruby-forum.com/u/Darren_Fernandes)\
**Replies:** 0\
**Last updated:** [March 17, 2010, 12:02am UTC](https://www.ruby-forum.com/t/jobs-ruby-developer-needed/185260 "2010-03-17T00:02:55Z")

</div>

Just wanted to send this out to anyone who is interested or knows of someone who might be. This position is with one of the nationâ€™s premier workplaces, located in Washington, DC/Ashburn VA. We are looking for a ve…

---

## [Finding a Rails Programmer](https://www.ruby-forum.com/t/finding-a-rails-programmer/185259)

<div class="topic-metadata">

**Author:** [@Orlando\_Web\_Service](https://www.ruby-forum.com/u/Orlando_Web_Service)\
**Replies:** 0\
**Last updated:** [March 16, 2010, 11:24pm UTC](https://www.ruby-forum.com/t/finding-a-rails-programmer/185259 "2010-03-16T23:24:52Z")

</div>

We are looking for an experienced rails programmer to support new clients and to assist our existing Rails developer that we use as a freelance. If you or someone you know with an established portfolio is seeking free…

---

## [SQL result to String conversion](https://www.ruby-forum.com/t/sql-result-to-string-conversion/185241)

<div class="topic-metadata">

**Author:** [@rohits](https://www.ruby-forum.com/u/rohits)\
**Replies:** 6\
**Last updated:** [March 16, 2010, 9:28pm UTC](https://www.ruby-forum.com/t/sql-result-to-string-conversion/185241 "2010-03-16T21:28:44Z")

</div>

Hello All, I am very new to Ruby on Rails and I have a quick question for you all, which is as follows: I have this following line of code in an partial that renders itself on the posts/index view: Created By (User)…

---

## [Updating rails apps via REST](https://www.ruby-forum.com/t/updating-rails-apps-via-rest/185248)

<div class="topic-metadata">

**Author:** [@tomtt](https://www.ruby-forum.com/u/tomtt)\
**Replies:** 0\
**Last updated:** [March 16, 2010, 9:04pm UTC](https://www.ruby-forum.com/t/updating-rails-apps-via-rest/185248 "2010-03-16T21:04:24Z")

</div>

hi, i have two rails-applications (similar inventory apps). they both use restful\_auth. now i got the request that one app needs to be able to update a record / create a new one in the other app. so basically what i …

---

## [Trying to install postgres gem on fedora 12](https://www.ruby-forum.com/t/trying-to-install-postgres-gem-on-fedora-12/184995)

<div class="topic-metadata">

**Author:** [@Jedrin](https://www.ruby-forum.com/u/Jedrin)\
**Replies:** 19\
**Last updated:** [March 16, 2010, 7:23pm UTC](https://www.ruby-forum.com/t/trying-to-install-postgres-gem-on-fedora-12/184995 "2010-03-16T19:23:51Z")

</div>

I get these errors : gem install pg – --with-pgsql-include-dir=’/usr/include/pgsql’ – with-pgsql-lib-dir=’/usr/lib/pgsql’ Building native extensions. This could take a while… ERROR: Error installing pg: ERROR: Fai…

---

## [Get content from HTML element in Rails](https://www.ruby-forum.com/t/get-content-from-html-element-in-rails/185227)

<div class="topic-metadata">

**Author:** [@iggar](https://www.ruby-forum.com/u/iggar)\
**Replies:** 4\
**Last updated:** [March 16, 2010, 6:59pm UTC](https://www.ruby-forum.com/t/get-content-from-html-element-in-rails/185227 "2010-03-16T18:59:46Z")

</div>

Hey, I’m looking for a way to get the content of my div in my Rails view. I would like the literal HTML content, so only HTML and no Rails I thought inner\_html would work, but I get a RJS exception (TypeError: $(“con…

---

## [What is the proper role of seed data?](https://www.ruby-forum.com/t/what-is-the-proper-role-of-seed-data/185228)

<div class="topic-metadata">

**Author:** [@Grary](https://www.ruby-forum.com/u/Grary)\
**Replies:** 4\
**Last updated:** [March 16, 2010, 6:18pm UTC](https://www.ruby-forum.com/t/what-is-the-proper-role-of-seed-data/185228 "2010-03-16T18:18:10Z")

</div>

Hi, In my Rails app, I have some parameters whose values change only infrequently. These parameters are used in computations. Where is the place for data like this – data that is particular to the application? On th…

---

## [Db change not reflected in app](https://www.ruby-forum.com/t/db-change-not-reflected-in-app/185236)

<div class="topic-metadata">

**Author:** [@wirelesspower](https://www.ruby-forum.com/u/wirelesspower)\
**Replies:** 7\
**Last updated:** [March 16, 2010, 4:41pm UTC](https://www.ruby-forum.com/t/db-change-not-reflected-in-app/185236 "2010-03-16T16:41:00Z")

</div>

Hi folks. I’m just starting to learn ruby and rails, and I’m working through a tutorial. I’ve hit a hurdle attempting to add a column to a table. I’ve created the migration file and ran it through rake, and I can see…

---

## [Losing Decimal scale from sqlite3 to mysql going from development to staging](https://www.ruby-forum.com/t/losing-decimal-scale-from-sqlite3-to-mysql-going-from-development-to-staging/185238)

<div class="topic-metadata">

**Author:** [@Owain](https://www.ruby-forum.com/u/Owain)\
**Replies:** 0\
**Last updated:** [March 16, 2010, 4:39pm UTC](https://www.ruby-forum.com/t/losing-decimal-scale-from-sqlite3-to-mysql-going-from-development-to-staging/185238 "2010-03-16T16:39:50Z")

</div>

I have been performing some testing between my development and staging environments. I had noticed that the order.amount has been truncated. All works fine in sqlite3 in development. Here is the output: Amount is me…

---

## [DJ: Delayed Job Noob Question](https://www.ruby-forum.com/t/dj-delayed-job-noob-question/185078)

<div class="topic-metadata">

**Author:** [@kampers](https://www.ruby-forum.com/u/kampers)\
**Replies:** 1\
**Last updated:** [March 16, 2010, 4:33pm UTC](https://www.ruby-forum.com/t/dj-delayed-job-noob-question/185078 "2010-03-16T16:33:07Z")

</div>

Hi guys: just got into Rails about a month ago and an about to launch something. I use Heroku and they limit the execution time of pages to 30 seconds. i have a process which takes a lot longer than that. So i’m tryin…

---

## [HashWithIndifferentAccess remove inner hash question](https://www.ruby-forum.com/t/hashwithindifferentaccess-remove-inner-hash-question/185233)

<div class="topic-metadata">

**Author:** [@Dudebot](https://www.ruby-forum.com/u/Dudebot)\
**Replies:** 7\
**Last updated:** [March 16, 2010, 4:28pm UTC](https://www.ruby-forum.com/t/hashwithindifferentaccess-remove-inner-hash-question/185233 "2010-03-16T16:28:07Z")

</div>

This is probably more of a ruby question, but I’m posting it here as HashWithIndifferentAccess is more of a rails thing. I have a @morton which is — !map:HashWithIndifferentAccess new\_lab\_data\_attributes: !map:Hash…

---

## [Upgrading a 1.1.2 RoR App](https://www.ruby-forum.com/t/upgrading-a-1-1-2-ror-app/185199)

<div class="topic-metadata">

**Author:** [@Roch\_Delsalle](https://www.ruby-forum.com/u/Roch_Delsalle)\
**Replies:** 3\
**Last updated:** [March 16, 2010, 3:55pm UTC](https://www.ruby-forum.com/t/upgrading-a-1-1-2-ror-app/185199 "2010-03-16T15:55:21Z")

</div>

Hi, I have been running a 1.1.2 RoR app for a few years without upgrading. I’m now forced to move it since we the current hosting plan is ending. I would like to know what would be the best way to do it since it has …

---

## [Action resource delete method is not working since upgrade to Rails 3 beta](https://www.ruby-forum.com/t/action-resource-delete-method-is-not-working-since-upgrade-to-rails-3-beta/185209)

<div class="topic-metadata">

**Author:** [@builtbysimple](https://www.ruby-forum.com/u/builtbysimple)\
**Replies:** 1\
**Last updated:** [March 16, 2010, 3:03pm UTC](https://www.ruby-forum.com/t/action-resource-delete-method-is-not-working-since-upgrade-to-rails-3-beta/185209 "2010-03-16T15:03:44Z")

</div>

Hi guys, I just upgraded my application to use Rails 3. But after the upgrade my delete/destroy method is not working anymore. Anybody experience the same thing as I do? What changes needed to be done in order to ma…

---

## [How to refresh a parent page](https://www.ruby-forum.com/t/how-to-refresh-a-parent-page/185214)

<div class="topic-metadata">

**Author:** [@sameera](https://www.ruby-forum.com/u/sameera)\
**Replies:** 1\
**Last updated:** [March 16, 2010, 2:55pm UTC](https://www.ruby-forum.com/t/how-to-refresh-a-parent-page/185214 "2010-03-16T14:55:06Z")

</div>

Hi Guys, I have the fllowing requirement, I have a model called Task to display user tasks 1 . Link to add a new task (in the tasks index page) 2 . when a user click the link, ‘tasks/new’ action will open up inside a …

---

## [DB in Non-Standard Place](https://www.ruby-forum.com/t/db-in-non-standard-place/185222)

<div class="topic-metadata">

**Author:** [@acgreen](https://www.ruby-forum.com/u/acgreen)\
**Replies:** 2\
**Last updated:** [March 16, 2010, 2:41pm UTC](https://www.ruby-forum.com/t/db-in-non-standard-place/185222 "2010-03-16T14:41:01Z")

</div>

I’ll be doing a deployment soon and looking ahead to the future, I was wondering what people do with regarding putting a SQLite db in a non standard place. The simplest solution to get it out of the app is to move it …

---

## [Retaining file object](https://www.ruby-forum.com/t/retaining-file-object/185231)

<div class="topic-metadata">

**Author:** [@karthikragu](https://www.ruby-forum.com/u/karthikragu)\
**Replies:** 0\
**Last updated:** [March 16, 2010, 1:58pm UTC](https://www.ruby-forum.com/t/retaining-file-object/185231 "2010-03-16T13:58:45Z")

</div>

Dear All, I have a form with file upload option and others input fields. if a user makes error in any input field is it possible to show the form again with the error msg and input field populated with the file object …

---

## [RESTful route question](https://www.ruby-forum.com/t/restful-route-question/185124)

<div class="topic-metadata">

**Author:** [@Dudebot](https://www.ruby-forum.com/u/Dudebot)\
**Replies:** 3\
**Last updated:** [March 16, 2010, 1:20pm UTC](https://www.ruby-forum.com/t/restful-route-question/185124 "2010-03-16T13:20:14Z")

</div>

I have in routes.rb map.resources :labs, :collection =\> { :group =\> :get } which is working. But when I try to pass a parameter, e.g. \<% form\_tag group\_labs\_path( :patient\_id =\> @patient.id ), :method =\> :get do %\> …

---

## [How to configure nested routers to omit controller from URL?](https://www.ruby-forum.com/t/how-to-configure-nested-routers-to-omit-controller-from-url/184696)

<div class="topic-metadata">

**Author:** [@interactivenyc](https://www.ruby-forum.com/u/interactivenyc)\
**Replies:** 1\
**Last updated:** [March 16, 2010, 12:48pm UTC](https://www.ruby-forum.com/t/how-to-configure-nested-routers-to-omit-controller-from-url/184696 "2010-03-16T12:48:02Z")

</div>

I have the following nested route in my routes.rb map.resources :users do |user| user.resources :pie\_charts end and the ‘rake routes’ command shows the following routes: user\_pie\_charts GET /users/:user\_id/pie\_chart…

---

## [Logging in Rails](https://www.ruby-forum.com/t/logging-in-rails/185219)

<div class="topic-metadata">

**Author:** [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Replies:** 7\
**Last updated:** [March 16, 2010, 12:28pm UTC](https://www.ruby-forum.com/t/logging-in-rails/185219 "2010-03-16T12:28:08Z")

</div>

Hi I dont know much about logging in rails? Could anybody please explain how to do that in a live application? Or point me to any latest links which gives a detailed description of how to do this for different enviro…

---

## [ActionView::TemplateError (You have a nil object when you di](https://www.ruby-forum.com/t/actionview-templateerror-you-have-a-nil-object-when-you-di/185221)

<div class="topic-metadata">

**Author:** [@murfhy](https://www.ruby-forum.com/u/murfhy)\
**Replies:** 0\
**Last updated:** [March 16, 2010, 10:30am UTC](https://www.ruby-forum.com/t/actionview-templateerror-you-have-a-nil-object-when-you-di/185221 "2010-03-16T10:30:08Z")

</div>

actually i am trying to add some values into a dropdown listfrom an xml file.while running my application i am getting one error mentioned like this ActionView::TemplateError (You have a nil object when you did…

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

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