# Rails

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

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

---

## [Attachement\_fu error when updating existing photos](https://www.ruby-forum.com/t/attachement-fu-error-when-updating-existing-photos/191398)

<div class="topic-metadata">

**Author:** [@circlefusion](https://www.ruby-forum.com/u/circlefusion)\
**Replies:** 0\
**Last updated:** [July 12, 2010, 1:49am UTC](https://www.ruby-forum.com/t/attachement-fu-error-when-updating-existing-photos/191398 "2010-07-12T01:49:28Z")

</div>

Hi, I am attempting to replace an exiting photo with a new one uploaded by the user. I am using attachment\_fu and I am coming up with the following exception: can’t convert nil into String /vendor/plugins/attachmen…

---

## [Rake complains about missing "default" task](https://www.ruby-forum.com/t/rake-complains-about-missing-default-task/191347)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 4\
**Last updated:** [July 11, 2010, 10:45pm UTC](https://www.ruby-forum.com/t/rake-complains-about-missing-default-task/191347 "2010-07-11T22:45:53Z")

</div>

Hi, I got an example rakefile from the webpage http://jasonseifer.com/2010/04/06/rake-tutorial which displays “Published: April 6, 2010 at 4:25 AM” Below are my results from testing that rakefile in a Command window …

---

## [Active record relationship problems](https://www.ruby-forum.com/t/active-record-relationship-problems/191377)

<div class="topic-metadata">

**Author:** [@Norm\_S](https://www.ruby-forum.com/u/Norm_S)\
**Replies:** 4\
**Last updated:** [July 11, 2010, 9:48pm UTC](https://www.ruby-forum.com/t/active-record-relationship-problems/191377 "2010-07-11T21:48:31Z")

</div>

Using RoR 2.2.2 with MySql Server version: 5.0.75-0ubuntu10.5 on Ubuntu. I have three tables/models and I want to do a find on Reservations ordering the results by the names in Sitetype. Sql for tables and the models…

---

## [Haml ... ending a line with a | (vertical bar)](https://www.ruby-forum.com/t/haml-ending-a-line-with-a-vertical-bar/191240)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 4\
**Last updated:** [July 11, 2010, 4:26pm UTC](https://www.ruby-forum.com/t/haml-ending-a-line-with-a-vertical-bar/191240 "2010-07-11T16:26:52Z")

</div>

I don’t know if HAML questions are appropriate here … but here goes. How does on end line to be rendered with a vertical bar (|) ? The vertical bar is a line continuation, aparently. Doing | cause the vertical bar to …

---

## [How to update a Protected Attributes](https://www.ruby-forum.com/t/how-to-update-a-protected-attributes/126079)

<div class="topic-metadata">

**Author:** [@Penuel](https://www.ruby-forum.com/u/Penuel)\
**Replies:** 6\
**Last updated:** [July 11, 2010, 3:22pm UTC](https://www.ruby-forum.com/t/how-to-update-a-protected-attributes/126079 "2010-07-11T15:22:37Z")

</div>

Hello All, I am trying to update a protected attribute called ‘picture’. I am forced (I think) to use the following technique. #first find a record or object @user = User.find(:some\_id\_here) … … then assign the ne…

---

## [Simple class question - new to ruby on rails](https://www.ruby-forum.com/t/simple-class-question-new-to-ruby-on-rails/191380)

<div class="topic-metadata">

**Author:** [@superwick](https://www.ruby-forum.com/u/superwick)\
**Replies:** 1\
**Last updated:** [July 11, 2010, 12:47pm UTC](https://www.ruby-forum.com/t/simple-class-question-new-to-ruby-on-rails/191380 "2010-07-11T12:47:50Z")

</div>

I am getting an error with this code below… basically its meant to read /jazz/j00132.mp3 3:45 Fats Waller Ain’t Misbehavin’ /jazz/j00319.mp3 2:58 Louis Armstrong Wonderful World /bgrass/bg0732.mp3 4:09 Strength in Num…

---

## [Additional methods in models - how to access them?](https://www.ruby-forum.com/t/additional-methods-in-models-how-to-access-them/191367)

<div class="topic-metadata">

**Author:** [@Szymon\_PrzybySSSS\_S](https://www.ruby-forum.com/u/Szymon_PrzybySSSS_S)\
**Replies:** 9\
**Last updated:** [July 11, 2010, 11:12am UTC](https://www.ruby-forum.com/t/additional-methods-in-models-how-to-access-them/191367 "2010-07-11T11:12:17Z")

</div>

Hi! I’m new in Rails and I’m making my first site using this. I have some problem with methods in models: I have model Note with one additional method: class Note \< ActiveRecord::Base belongs\_to :pattern def get\_lo…

---

## [Rails 3 convert time of created\_at before saving to MySQL](https://www.ruby-forum.com/t/rails-3-convert-time-of-created-at-before-saving-to-mysql/191370)

<div class="topic-metadata">

**Author:** [@sharkie](https://www.ruby-forum.com/u/sharkie)\
**Replies:** 7\
**Last updated:** [July 11, 2010, 10:00am UTC](https://www.ruby-forum.com/t/rails-3-convert-time-of-created-at-before-saving-to-mysql/191370 "2010-07-11T10:00:41Z")

</div>

How can I prevent this? This happens even if I do not set config.time\_zone Basically Rails 3 subtract 7 hours from the current time before saving it to MySQL. I never had this issue in Rails 2.3.5. How would I disab…

---

## [Need pdf gen which is support to Asian languages](https://www.ruby-forum.com/t/need-pdf-gen-which-is-support-to-asian-languages/191271)

<div class="topic-metadata">

**Author:** [@nirosh](https://www.ruby-forum.com/u/nirosh)\
**Replies:** 8\
**Last updated:** [July 11, 2010, 8:24am UTC](https://www.ruby-forum.com/t/need-pdf-gen-which-is-support-to-asian-languages/191271 "2010-07-11T08:24:54Z")

</div>

which PDF plug-in is support to Asian languages? i tried prawn PDF::writer both of those dosen’t workout for me. any idea?? -nirosh-

---

## [Routing problem](https://www.ruby-forum.com/t/routing-problem/191369)

<div class="topic-metadata">

**Author:** [@leo72](https://www.ruby-forum.com/u/leo72)\
**Replies:** 2\
**Last updated:** [July 10, 2010, 10:42pm UTC](https://www.ruby-forum.com/t/routing-problem/191369 "2010-07-10T22:42:04Z")

</div>

Hi guys, I’m having a problem with nested routes and I don’t know what I’m missing. I have a “products” resource, which has a “available” collection action. map.resources :courses, :member =\> { :confirm =\> :get}, :…

---

## [How do you pronounce git? :D](https://www.ruby-forum.com/t/how-do-you-pronounce-git-d/191373)

<div class="topic-metadata">

**Author:** [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Replies:** 3\
**Last updated:** [July 10, 2010, 10:35pm UTC](https://www.ruby-forum.com/t/how-do-you-pronounce-git-d/191373 "2010-07-10T22:35:02Z")

</div>

Hey How do you pronounce git? Is it like “jit”? or is it more like “gghit”? I know ryan b pronounces it the second way :wink: Not sure how it’s supposed to pronounced. I pronounce it the first way. Just wondering. …

---

## [Generate PDF and attach to email on the fly](https://www.ruby-forum.com/t/generate-pdf-and-attach-to-email-on-the-fly/191328)

<div class="topic-metadata">

**Author:** [@railslist](https://www.ruby-forum.com/u/railslist)\
**Replies:** 3\
**Last updated:** [July 10, 2010, 10:27pm UTC](https://www.ruby-forum.com/t/generate-pdf-and-attach-to-email-on-the-fly/191328 "2010-07-10T22:27:25Z")

</div>

Hi Friends! I have a controller action that can render the response in pdf format as well as html format. Now, I need to attach a pdf file rendered by the above action to an email on the fly. How can I do this? Wha…

---

## [Very noobish question](https://www.ruby-forum.com/t/very-noobish-question/191361)

<div class="topic-metadata">

**Author:** [@denniss](https://www.ruby-forum.com/u/denniss)\
**Replies:** 5\
**Last updated:** [July 10, 2010, 10:19pm UTC](https://www.ruby-forum.com/t/very-noobish-question/191361 "2010-07-10T22:19:49Z")

</div>

So I just started with rails a few days ago and I am wondering why this does not work. I get an ArgumentError in User#create Extracted source (around line #2): 1: 2: \<% form.for :user, @user, :url =\> {:action =\> “cre…

---

## [Merge 2 user tables?](https://www.ruby-forum.com/t/merge-2-user-tables/191372)

<div class="topic-metadata">

**Author:** [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Replies:** 0\
**Last updated:** [July 10, 2010, 9:31pm UTC](https://www.ruby-forum.com/t/merge-2-user-tables/191372 "2010-07-10T21:31:49Z")

</div>

Hey there I have 2 tables, one for admins and another for regular users. (i used authlogic to make them) Now, there has to be 2 different login forms for the 2 different types of users. Is there anyway to have 1 for…

---

## [No bundle command?](https://www.ruby-forum.com/t/no-bundle-command/191366)

<div class="topic-metadata">

**Author:** [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Replies:** 1\
**Last updated:** [July 10, 2010, 8:27pm UTC](https://www.ruby-forum.com/t/no-bundle-command/191366 "2010-07-10T20:27:27Z")

</div>

First of all, I had to run “sudo” to install bundler cause it was complaining that it didn’t have access to /var/ruby blah what ever So now bundler is installed, if i run gem list bundler is among one of them Now if …

---

## [CamelCase and Underscores](https://www.ruby-forum.com/t/camelcase-and-underscores/191349)

<div class="topic-metadata">

**Author:** [@ralphshnelvar](https://www.ruby-forum.com/u/ralphshnelvar)\
**Replies:** 8\
**Last updated:** [July 10, 2010, 8:00pm UTC](https://www.ruby-forum.com/t/camelcase-and-underscores/191349 "2010-07-10T20:00:31Z")

</div>

Is there a document anywhere that indicates when to use camel casing and when to use underscores between words?

---

## [Update Ruby Version!](https://www.ruby-forum.com/t/update-ruby-version/191348)

<div class="topic-metadata">

**Author:** [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Replies:** 3\
**Last updated:** [July 10, 2010, 4:35pm UTC](https://www.ruby-forum.com/t/update-ruby-version/191348 "2010-07-10T16:35:39Z")

</div>

Hey guys I am running Ruby 1.8.7 on Ubuntu 10.04 How can I update it to 1.9.1? I tried instaling the 1.9.1 package, everything seemed to work, but if I run “ruby -v” it still says 1.8.7. I might be doing something w…

---

## [How to set JQuery's effect for normal link](https://www.ruby-forum.com/t/how-to-set-jquerys-effect-for-normal-link/191315)

<div class="topic-metadata">

**Author:** [@jmanivannancse](https://www.ruby-forum.com/u/jmanivannancse)\
**Replies:** 2\
**Last updated:** [July 10, 2010, 9:16am UTC](https://www.ruby-forum.com/t/how-to-set-jquerys-effect-for-normal-link/191315 "2010-07-10T09:16:41Z")

</div>

Hi, I would like to apply some JQuery’s effects(fadeIn,fadeOut) in my site while page is loading. So i tried below code.when i clicking normal request,code is working fine But i had problem only when i clicking aja…

---

## [SQLite and Rails 3](https://www.ruby-forum.com/t/sqlite-and-rails-3/191350)

<div class="topic-metadata">

**Author:** [@davidz101](https://www.ruby-forum.com/u/davidz101)\
**Replies:** 1\
**Last updated:** [July 10, 2010, 4:50am UTC](https://www.ruby-forum.com/t/sqlite-and-rails-3/191350 "2010-07-10T04:50:25Z")

</div>

Did you ever get this kind of error?-- Could not find gem ‘sqlite3- ruby (\>= 0, runtime)’ in the gems available on this machine. I am running rails 3 beta, and apparently ruby 1.8.7. I am using Ubuntu 10.04 Whenever …

---

## [PDF::Toolkit Execution Error](https://www.ruby-forum.com/t/pdf-toolkit-execution-error/191346)

<div class="topic-metadata">

**Author:** [@sivakumar](https://www.ruby-forum.com/u/sivakumar)\
**Replies:** 0\
**Last updated:** [July 9, 2010, 11:54pm UTC](https://www.ruby-forum.com/t/pdf-toolkit-execution-error/191346 "2010-07-09T23:54:02Z")

</div>

Hello guys, I was working in getting the properties of a \*.pdf I installed pdf-toolkit gem. But it was raising some errors. I cant open a pdf and then can’t collect the properties of a pdf. Please help me out guys. T…

---

## [Deployment question: has anyone deployed w. sqlite?](https://www.ruby-forum.com/t/deployment-question-has-anyone-deployed-w-sqlite/191327)

<div class="topic-metadata">

**Author:** [@Lille](https://www.ruby-forum.com/u/Lille)\
**Replies:** 6\
**Last updated:** [July 9, 2010, 10:43pm UTC](https://www.ruby-forum.com/t/deployment-question-has-anyone-deployed-w-sqlite/191327 "2010-07-09T22:43:22Z")

</div>

Hi, I’d like to make a demo version of my app available, but I’m not ready to get into database stuff, yet. Has anyone ever deployed with sqlite (what I used to develop my app)? If so, what hosting service(s) would y…

---

## [Template is missing.... but it is there!](https://www.ruby-forum.com/t/template-is-missing-but-it-is-there/191342)

<div class="topic-metadata">

**Author:** [@LuisRuby](https://www.ruby-forum.com/u/LuisRuby)\
**Replies:** 2\
**Last updated:** [July 9, 2010, 9:53pm UTC](https://www.ruby-forum.com/t/template-is-missing-but-it-is-there/191342 "2010-07-09T21:53:02Z")

</div>

Hello friends! I have an application to list different kinds of institution names. So I have one table “instits” for the institutions and another table “nome\_instits” for their names. For test, I put two rows inside …

---

## [Uncountable nouns in resource routes with Rails 3](https://www.ruby-forum.com/t/uncountable-nouns-in-resource-routes-with-rails-3/191343)

<div class="topic-metadata">

**Author:** [@mreiland](https://www.ruby-forum.com/u/mreiland)\
**Replies:** 0\
**Last updated:** [July 9, 2010, 9:48pm UTC](https://www.ruby-forum.com/t/uncountable-nouns-in-resource-routes-with-rails-3/191343 "2010-07-09T21:48:34Z")

</div>

I have a model called Aircraft, inflected as uncountable, and it’s driving me nuts. What is the correct way to handle this in Rails 3 beta 4? resources :aircraft do member do get :flights end end # Of course …

---

## [Active record question](https://www.ruby-forum.com/t/active-record-question/190997)

<div class="topic-metadata">

**Author:** [@badnaam](https://www.ruby-forum.com/u/badnaam)\
**Replies:** 9\
**Last updated:** [July 9, 2010, 9:07pm UTC](https://www.ruby-forum.com/t/active-record-question/190997 "2010-07-09T21:07:57Z")

</div>

I have three models, Question, Response and User User has many question, :through Responses My response table has 3 main columns response, question\_id and user\_id. The use case is lets say the user can respond to 100…

---

## ["show" action - restrict manual url change from user to view](https://www.ruby-forum.com/t/show-action-restrict-manual-url-change-from-user-to-view/190843)

<div class="topic-metadata">

**Author:** [@railsfan\_radha](https://www.ruby-forum.com/u/railsfan_radha)\
**Replies:** 5\
**Last updated:** [July 9, 2010, 7:47pm UTC](https://www.ruby-forum.com/t/show-action-restrict-manual-url-change-from-user-to-view/190843 "2010-07-09T19:47:24Z")

</div>

This is “show” action in my “category controller”. #---- Show — def show # @category=Category.find(params\[:category\_id\]) @category=Category.find(params\[:category\_id\]) end “show” action - restrict manual url change …

---

## [Auto\_complete plugin](https://www.ruby-forum.com/t/auto-complete-plugin/191326)

<div class="topic-metadata">

**Author:** [@Mlle](https://www.ruby-forum.com/u/Mlle)\
**Replies:** 0\
**Last updated:** [July 9, 2010, 5:21pm UTC](https://www.ruby-forum.com/t/auto-complete-plugin/191326 "2010-07-09T17:21:52Z")

</div>

I have a method in my controller that would apply to all fields that use the auto\_complete plugin def auto\_complete\_for object = params\[:id\].split('\_')\[0\] method = params\[:id\].split('\_')\[1\] table = object.to\_s.cameli…

---

## [:style error in paperclip](https://www.ruby-forum.com/t/style-error-in-paperclip/191314)

<div class="topic-metadata">

**Author:** [@debadatta](https://www.ruby-forum.com/u/debadatta)\
**Replies:** 7\
**Last updated:** [July 9, 2010, 5:20pm UTC](https://www.ruby-forum.com/t/style-error-in-paperclip/191314 "2010-07-09T17:20:41Z")

</div>

Hi all :style =\> {:thumb =\> ‘200x200\>’} is not working for paperclip gem help thanks

---

## [Elegant Registration / Log in fix](https://www.ruby-forum.com/t/elegant-registration-log-in-fix/191320)

<div class="topic-metadata">

**Author:** [@DanC](https://www.ruby-forum.com/u/DanC)\
**Replies:** 1\
**Last updated:** [July 9, 2010, 5:14pm UTC](https://www.ruby-forum.com/t/elegant-registration-log-in-fix/191320 "2010-07-09T17:14:15Z")

</div>

Hi, I have an app which allows users to register using two different email address suffixes only which identifies them as being from a certain organisation. Let’s call them @abcd.co.uk and @abcdefg.co.uk The shorter…

---

## [\[Rails3\] Issue in modifying locale and redisplaying page](https://www.ruby-forum.com/t/rails3-issue-in-modifying-locale-and-redisplaying-page/191285)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 1\
**Last updated:** [July 9, 2010, 5:11pm UTC](https://www.ruby-forum.com/t/rails3-issue-in-modifying-locale-and-redisplaying-page/191285 "2010-07-09T17:11:19Z")

</div>

In a test app, I have a drop-down selection to change the language of the site. I use an Ajax request to an action in which the locale is changed, and the it’s redirected to the home page unfortunately, the locale se…

---

## [Kind of object](https://www.ruby-forum.com/t/kind-of-object/191300)

<div class="topic-metadata">

**Author:** [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Replies:** 4\
**Last updated:** [July 9, 2010, 5:01pm UTC](https://www.ruby-forum.com/t/kind-of-object/191300 "2010-07-09T17:01:57Z")

</div>

Hello All, I want to know that is there anything in ruby by which i can know that which kind of object is this…? Something like is\_object? :slight\_smile: I mean… lets suppose i have two objects of Model ABC and Model …

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

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