# Rails

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

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

---

## [How to import db](https://www.ruby-forum.com/t/how-to-import-db/168421)

<div class="topic-metadata">

**Author:** [@mk27](https://www.ruby-forum.com/u/mk27)\
**Replies:** 2\
**Last updated:** [May 21, 2009, 9:00pm UTC](https://www.ruby-forum.com/t/how-to-import-db/168421 "2009-05-21T21:00:16Z")

</div>

I’m just starting out learning. So far, all I’ve done is little test apps starting from scratch – ie, ones in which rails creates an empty database, then I make up some classes and views and controllers and such. Nic…

---

## [Date\_select](https://www.ruby-forum.com/t/date-select/168469)

<div class="topic-metadata">

**Author:** [@knappe](https://www.ruby-forum.com/u/knappe)\
**Replies:** 6\
**Last updated:** [May 21, 2009, 8:30pm UTC](https://www.ruby-forum.com/t/date-select/168469 "2009-05-21T20:30:57Z")

</div>

I don’t really understand how forms are generated so this may be a very easy question. I have some code that does a date select: \<p\> \<%= f.label :StartDate%\> \<br /\> \<%= f.date\_select :start…

---

## [Another quick question, or two](https://www.ruby-forum.com/t/another-quick-question-or-two/168513)

<div class="topic-metadata">

**Author:** [@mk27](https://www.ruby-forum.com/u/mk27)\
**Replies:** 4\
**Last updated:** [May 21, 2009, 8:29pm UTC](https://www.ruby-forum.com/t/another-quick-question-or-two/168513 "2009-05-21T20:29:22Z")

</div>

If I want to link from/redirect via the index page (which I notice will not process as erb), what’s the local relative path I should use to the the view (object/method don’t work)? I am getting to like rails so I will…

---

## [Referencing 'constant' record in db](https://www.ruby-forum.com/t/referencing-constant-record-in-db/168394)

<div class="topic-metadata">

**Author:** [@colinloretz](https://www.ruby-forum.com/u/colinloretz)\
**Replies:** 9\
**Last updated:** [May 21, 2009, 8:27pm UTC](https://www.ruby-forum.com/t/referencing-constant-record-in-db/168394 "2009-05-21T20:27:59Z")

</div>

I have a table where one of the records is a constant record that I keep finding myself referencing the id of in code such as if item.id == Item.named\_scope\_for\_constant\_record.id where the named scope involves a db q…

---

## [NoMethodError in AdminController#index](https://www.ruby-forum.com/t/nomethoderror-in-admincontroller-index/168518)

<div class="topic-metadata">

**Author:** [@sachinkale](https://www.ruby-forum.com/u/sachinkale)\
**Replies:** 0\
**Last updated:** [May 21, 2009, 8:25pm UTC](https://www.ruby-forum.com/t/nomethoderror-in-admincontroller-index/168518 "2009-05-21T20:25:36Z")

</div>

hi, Following error occured when I browse (URL http://localhost:3000/admin): NoMethodError in AdminController#index undefined method \`scaffold’ for AdminController:Class RAILS\_ROOT: /root/work/depot

---

## [Loading images from Picasa](https://www.ruby-forum.com/t/loading-images-from-picasa/168519)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [May 21, 2009, 8:24pm UTC](https://www.ruby-forum.com/t/loading-images-from-picasa/168519 "2009-05-21T20:24:27Z")

</div>

Hi everyone, I was trying to use picasa\_ruby gem in my app rails to load picasa images. But photos aren’t loaded although the thumbnails do. I mean, photo.thumbnails\[0\].url works but photo.url don’t. It seems to be t…

---

## [Custom error pages-- which exceptions to catch?](https://www.ruby-forum.com/t/custom-error-pages-which-exceptions-to-catch/168520)

<div class="topic-metadata">

**Author:** [@rafe](https://www.ruby-forum.com/u/rafe)\
**Replies:** 0\
**Last updated:** [May 21, 2009, 8:24pm UTC](https://www.ruby-forum.com/t/custom-error-pages-which-exceptions-to-catch/168520 "2009-05-21T20:24:27Z")

</div>

Hi all, I implemented custom 404 and 500 error pages using rescue\_from according to an example I found at http://blog.ubrio.us/code/rails-22-custom-error-pages-with-exception-loggable/ Here’s my version: unless Acti…

---

## [Is it possible?](https://www.ruby-forum.com/t/is-it-possible/168503)

<div class="topic-metadata">

**Author:** [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Replies:** 5\
**Last updated:** [May 21, 2009, 8:22pm UTC](https://www.ruby-forum.com/t/is-it-possible/168503 "2009-05-21T20:22:06Z")

</div>

Hello G.s, I have a requirement in which a cron will run everyday and a rake file will execute along with rake file i need to javascript function so just wanted to know is there any way i can run a javascript. Rega…

---

## [Activeresource-2.3.2 HTTPHeaderSyntaxError](https://www.ruby-forum.com/t/activeresource-2-3-2-httpheadersyntaxerror/168447)

<div class="topic-metadata">

**Author:** [@pekeler](https://www.ruby-forum.com/u/pekeler)\
**Replies:** 1\
**Last updated:** [May 21, 2009, 7:49pm UTC](https://www.ruby-forum.com/t/activeresource-2-3-2-httpheadersyntaxerror/168447 "2009-05-21T19:49:50Z")

</div>

Hi, I’m upgrading my app from 2.2.2 to 2.3.2 and am having a problem with ActiveResource. class FooResource \< ActiveResource::Base self.site = "whatever" self.element\_name = "foo" end FooResource.create(:bar =\> '…

---

## [DRYing up admin controllers](https://www.ruby-forum.com/t/drying-up-admin-controllers/168515)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 0\
**Last updated:** [May 21, 2009, 7:15pm UTC](https://www.ruby-forum.com/t/drying-up-admin-controllers/168515 "2009-05-21T19:15:58Z")

</div>

Hi, This week I have been writing shit loads of very similar tests for my admin controllers. It was a terrible PITA as they all look the same, so it was a lot of copying and pasting. What do you guys do to write admi…

---

## [DB field documentation suggestions wanted](https://www.ruby-forum.com/t/db-field-documentation-suggestions-wanted/168449)

<div class="topic-metadata">

**Author:** [@pedz](https://www.ruby-forum.com/u/pedz)\
**Replies:** 2\
**Last updated:** [May 21, 2009, 6:40pm UTC](https://www.ruby-forum.com/t/db-field-documentation-suggestions-wanted/168449 "2009-05-21T18:40:04Z")

</div>

Where do folks generally document their database attributes? They appear as attributes (or methods) to the model. Is there a way to add pseudo methods so that rdoc picks them up along with their documentation but the…

---

## [Ffmpeg + mp3 convert](https://www.ruby-forum.com/t/ffmpeg-mp3-convert/168455)

<div class="topic-metadata">

**Author:** [@petan](https://www.ruby-forum.com/u/petan)\
**Replies:** 3\
**Last updated:** [May 21, 2009, 6:28pm UTC](https://www.ruby-forum.com/t/ffmpeg-mp3-convert/168455 "2009-05-21T18:28:54Z")

</div>

Hi all, I am using paperclip plugin to upload mp3’s. Before I save the mp3 I would like to convert it to a smaller size. I am using ffmpeg library and in my Track model I am calling: before\_save :convert\_mp3 def con…

---

## [Functional testing a has\_many :through validation](https://www.ruby-forum.com/t/functional-testing-a-has-many-through-validation/168466)

<div class="topic-metadata">

**Author:** [@Phoenix\_R](https://www.ruby-forum.com/u/Phoenix_R)\
**Replies:** 4\
**Last updated:** [May 21, 2009, 6:24pm UTC](https://www.ruby-forum.com/t/functional-testing-a-has-many-through-validation/168466 "2009-05-21T18:24:48Z")

</div>

The title of this post may be somewhat misleading; I am indeed UNIT testing this, and it works fine, however I’m also functional testing a POST to an action that is responsible for creating a new ActiveRecord object t…

---

## [Pass hidden field to the controller](https://www.ruby-forum.com/t/pass-hidden-field-to-the-controller/168505)

<div class="topic-metadata">

**Author:** [@prabesh](https://www.ruby-forum.com/u/prabesh)\
**Replies:** 2\
**Last updated:** [May 21, 2009, 5:46pm UTC](https://www.ruby-forum.com/t/pass-hidden-field-to-the-controller/168505 "2009-05-21T17:46:43Z")

</div>

How do I get the value form the hidden field and pass it to the controller?Also how do I get the value in the controller.

---

## [Layout Confusion](https://www.ruby-forum.com/t/layout-confusion/168508)

<div class="topic-metadata">

**Author:** [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Replies:** 0\
**Last updated:** [May 21, 2009, 4:49pm UTC](https://www.ruby-forum.com/t/layout-confusion/168508 "2009-05-21T16:49:43Z")

</div>

I am using AuthLogic and ActiveScaffold together in a Rails App. Essentailly, through AuthLogic (using Railscast 167 tutorial) I create a username/password signon screen, which has a link in the upper right to allow o…

---

## [PP + Multiple rails apps](https://www.ruby-forum.com/t/pp-multiple-rails-apps/168486)

<div class="topic-metadata">

**Author:** [@p\_W](https://www.ruby-forum.com/u/p_W)\
**Replies:** 2\
**Last updated:** [May 21, 2009, 3:50pm UTC](https://www.ruby-forum.com/t/pp-multiple-rails-apps/168486 "2009-05-21T15:50:01Z")

</div>

I am a RoR beginner and thought I’d give it a try by using rails to write some ‘in-house’ apps…for my house. I have a webserver in my apt. that I just run as a kind of ‘intranet’ and have apps on it that help us with…

---

## [New gem Excellent](https://www.ruby-forum.com/t/new-gem-excellent/168496)

<div class="topic-metadata">

**Author:** [@marcoow](https://www.ruby-forum.com/u/marcoow)\
**Replies:** 0\
**Last updated:** [May 21, 2009, 2:40pm UTC](https://www.ruby-forum.com/t/new-gem-excellent/168496 "2009-05-21T14:40:22Z")

</div>

Hi all, I just released a new gem called Excellent that performs static code analysis on Ruba code. It combines roodi, reek and flog and also adds some Rails specific checks (e.g. verifying that ActiveRecord models s…

---

## [ctionView::TemplateError (undefined method \`start\_form\_tag'](https://www.ruby-forum.com/t/ctionview-templateerror-undefined-method-start-form-tag/168410)

<div class="topic-metadata">

**Author:** [@alissonx](https://www.ruby-forum.com/u/alissonx)\
**Replies:** 8\
**Last updated:** [May 21, 2009, 2:31pm UTC](https://www.ruby-forum.com/t/ctionview-templateerror-undefined-method-start-form-tag/168410 "2009-05-21T14:31:10Z")

</div>

I upgrade my version of ruby on rails And my SO Free BSD was working with Ruby 1.8 + 1.2.6 and now Mandriva Linux with Ruby 1.8 + Rails 2.1.1 it’s not working ERROR: Processing LoginController#fazer\_login (for 192.16…

---

## [FasterCSV won't accept :headers option](https://www.ruby-forum.com/t/fastercsv-wont-accept-headers-option/168482)

<div class="topic-metadata">

**Author:** [@milandobrota](https://www.ruby-forum.com/u/milandobrota)\
**Replies:** 0\
**Last updated:** [May 21, 2009, 11:13am UTC](https://www.ruby-forum.com/t/fastercsv-wont-accept-headers-option/168482 "2009-05-21T11:13:29Z")

</div>

When I pass :headers =\> true to FasterCSV.foreach it complains. Without it it works. Am I doing something wrong? FasterCSV.foreach(file, {:row\_sep =\> :auto, :col\_sep =\> “\\t”, :quote\_char =\> “~”, :return\_headers =\> fal…

---

## [Install RMagick on Lunix](https://www.ruby-forum.com/t/install-rmagick-on-lunix/168477)

<div class="topic-metadata">

**Author:** [@rameshgajula](https://www.ruby-forum.com/u/rameshgajula)\
**Replies:** 2\
**Last updated:** [May 21, 2009, 11:07am UTC](https://www.ruby-forum.com/t/install-rmagick-on-lunix/168477 "2009-05-21T11:07:10Z")

</div>

Hi All, Can please help me on how to install RMagick on Linux machine Thanks for reply

---

## ["HTTP Parameter Pollution" and Rails](https://www.ruby-forum.com/t/http-parameter-pollution-and-rails/168479)

<div class="topic-metadata">

**Author:** [@stephanwehner](https://www.ruby-forum.com/u/stephanwehner)\
**Replies:** 0\
**Last updated:** [May 21, 2009, 8:54am UTC](https://www.ruby-forum.com/t/http-parameter-pollution-and-rails/168479 "2009-05-21T08:54:20Z")

</div>

Today there was a posting by Stefano di Paola to the Web Security Mailing List, http://www.webappsec.org/lists/websecurity about “HTTP Parameter Pollution”, with a reference to his and Luca Carettoni presentation a…

---

## [Any way to hide / mask / salt record ID?](https://www.ruby-forum.com/t/any-way-to-hide-mask-salt-record-id/168471)

<div class="topic-metadata">

**Author:** [@rjsquire](https://www.ruby-forum.com/u/rjsquire)\
**Replies:** 1\
**Last updated:** [May 21, 2009, 8:27am UTC](https://www.ruby-forum.com/t/any-way-to-hide-mask-salt-record-id/168471 "2009-05-21T08:27:55Z")

</div>

In RoR applications, each record is accessed by its own ID, usually as in products/ID. However, I’d prefer that users not be able to know how many records are in the database nor be able to access them on an increment…

---

## [Rails 2.3.2 Multipart Emails](https://www.ruby-forum.com/t/rails-2-3-2-multipart-emails/168451)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [May 21, 2009, 8:17am UTC](https://www.ruby-forum.com/t/rails-2-3-2-multipart-emails/168451 "2009-05-21T08:17:25Z")

</div>

I’m trying to send implicit multipart emails with Rails 2.3.2. I have the files as in the past: mailer\_action.text.plain.erb mailer\_action.text.html.erb When I run my tests, everything looks good. When I deliver em…

---

## [Beautiful url](https://www.ruby-forum.com/t/beautiful-url/168380)

<div class="topic-metadata">

**Author:** [@MrSBless](https://www.ruby-forum.com/u/MrSBless)\
**Replies:** 5\
**Last updated:** [May 21, 2009, 7:00am UTC](https://www.ruby-forum.com/t/beautiful-url/168380 "2009-05-21T07:00:10Z")

</div>

How to have a beautiful url like hulu. For example I like to have a url like this to show the movie detail with an id 1 as http://localhost:3000/movie/detail/1-movie\_name If via a link, i can do this by writing the to…

---

## [RoR Trainees required for JobeeHive.com](https://www.ruby-forum.com/t/ror-trainees-required-for-jobeehive-com/168476)

<div class="topic-metadata">

**Author:** [@vanquisher](https://www.ruby-forum.com/u/vanquisher)\
**Replies:** 0\
**Last updated:** [May 21, 2009, 6:42am UTC](https://www.ruby-forum.com/t/ror-trainees-required-for-jobeehive-com/168476 "2009-05-21T06:42:02Z")

</div>

We need RoR trainees for JobeeHive.com, India’s employer and salary review website. JobeeHive.com BETA version was launched in September 2008 and today it is one of the biggest employer reviews sites with 20,000+ revi…

---

## [Calculating the Date of the Start of Week](https://www.ruby-forum.com/t/calculating-the-date-of-the-start-of-week/168464)

<div class="topic-metadata">

**Author:** [@knappe](https://www.ruby-forum.com/u/knappe)\
**Replies:** 6\
**Last updated:** [May 21, 2009, 6:09am UTC](https://www.ruby-forum.com/t/calculating-the-date-of-the-start-of-week/168464 "2009-05-21T06:09:50Z")

</div>

I’m creating a calendar of sorts which maps events. For each event, I know its start and end date/time. I also know the current date and time. What I need to be able to do is calculate the start of the week, regardl…

---

## [How to pass data across the different controllers](https://www.ruby-forum.com/t/how-to-pass-data-across-the-different-controllers/168409)

<div class="topic-metadata">

**Author:** [@Vipin](https://www.ruby-forum.com/u/Vipin)\
**Replies:** 2\
**Last updated:** [May 21, 2009, 4:35am UTC](https://www.ruby-forum.com/t/how-to-pass-data-across-the-different-controllers/168409 "2009-05-21T04:35:03Z")

</div>

I have made three scaffold generated controllers in my project by following three commands ruby script/generate scaffold amain a:integer ruby script/generate scaffold bmain b:integer ruby script/generate scaffold cma…

---

## [Question about state during subsequent calls of an action](https://www.ruby-forum.com/t/question-about-state-during-subsequent-calls-of-an-action/168411)

<div class="topic-metadata">

**Author:** [@asymmetric](https://www.ruby-forum.com/u/asymmetric)\
**Replies:** 2\
**Last updated:** [May 21, 2009, 3:23am UTC](https://www.ruby-forum.com/t/question-about-state-during-subsequent-calls-of-an-action/168411 "2009-05-21T03:23:31Z")

</div>

Hi! i’m developing a rails application for a university assignment. i’ll spare you the details as i think my question is much more general. i have a model, called TreasureHunt, which contains a class variable, @@idno,…

---

## [Authenticity\_token and Flash - plus sign not recognizing](https://www.ruby-forum.com/t/authenticity-token-and-flash-plus-sign-not-recognizing/168467)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [May 21, 2009, 3:17am UTC](https://www.ruby-forum.com/t/authenticity-token-and-flash-plus-sign-not-recognizing/168467 "2009-05-21T03:17:40Z")

</div>

OK I need to send the auth token to Flash. I can get it, but for some reason the + signs in the auth code are showing up as spaces. Anyone know why? or how to get around this? Also, if I send the authenticity\_token ba…

---

## [Attaching files to emails using ActionMailer](https://www.ruby-forum.com/t/attaching-files-to-emails-using-actionmailer/168465)

<div class="topic-metadata">

**Author:** [@Stewart](https://www.ruby-forum.com/u/Stewart)\
**Replies:** 1\
**Last updated:** [May 21, 2009, 3:02am UTC](https://www.ruby-forum.com/t/attaching-files-to-emails-using-actionmailer/168465 "2009-05-21T03:02:24Z")

</div>

Hey Guys, I wish to generate a PDF on the fly to attach to an email. I am using action mailer and I want to tell the action mailer to attach a PDF from a URL not a file. All of the examples I have seen attach the f…

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

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