# Rails

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

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

---

## [Single Page AJAX site with Multiple Models](https://www.ruby-forum.com/t/single-page-ajax-site-with-multiple-models/142390)

<div class="topic-metadata">

**Author:** [@rocknrollcar](https://www.ruby-forum.com/u/rocknrollcar)\
**Replies:** 0\
**Last updated:** [July 7, 2008, 3:06pm UTC](https://www.ruby-forum.com/t/single-page-ajax-site-with-multiple-models/142390 "2008-07-07T15:06:29Z")

</div>

Hi. My site is like an event management system. It has multiple models like to-do lists, events,etc which have CRUD operations. I am thinking of using a single page ajax for the entire website. Will this affect the pe…

---

## [Identifying the attributes of an object dynamically](https://www.ruby-forum.com/t/identifying-the-attributes-of-an-object-dynamically/142376)

<div class="topic-metadata">

**Author:** [@shankar](https://www.ruby-forum.com/u/shankar)\
**Replies:** 3\
**Last updated:** [July 7, 2008, 2:46pm UTC](https://www.ruby-forum.com/t/identifying-the-attributes-of-an-object-dynamically/142376 "2008-07-07T14:46:00Z")

</div>

Hello I have an object ‘details’ which comprises of many attributes like name address.city address.state department.name For a given object of ‘details’, I am trying to obtain the values of some attributes from a …

---

## [HAML and nestings](https://www.ruby-forum.com/t/haml-and-nestings/142380)

<div class="topic-metadata">

**Author:** [@Leandro\_NSCamargo](https://www.ruby-forum.com/u/Leandro_NSCamargo)\
**Replies:** 0\
**Last updated:** [July 7, 2008, 2:10pm UTC](https://www.ruby-forum.com/t/haml-and-nestings/142380 "2008-07-07T14:10:26Z")

</div>

I have this partial: 1 - bairros = bairros\_select 2 - selected\_id ||= nil 3 - if bairros.any? 4 - cid = nil 5 = select\_tag :imovel, :bairro\_id do 6 - for b in bairros 7 - sel = b.id == selected\_id ? …

---

## [How to simplify the following code with respond\_to?](https://www.ruby-forum.com/t/how-to-simplify-the-following-code-with-respond-to/142363)

<div class="topic-metadata">

**Author:** [@learningruby](https://www.ruby-forum.com/u/learningruby)\
**Replies:** 2\
**Last updated:** [July 7, 2008, 2:09pm UTC](https://www.ruby-forum.com/t/how-to-simplify-the-following-code-with-respond-to/142363 "2008-07-07T14:09:51Z")

</div>

I have following code. class Person def eat puts "I am eating" end def sleep puts "I am going to bed" end def laugh puts "Wahahaha" end def talk puts "...." end end little\_boy = Person.ne…

---

## [Gravatars](https://www.ruby-forum.com/t/gravatars/142374)

<div class="topic-metadata">

**Author:** [@BelSSSSn](https://www.ruby-forum.com/u/BelSSSSn)\
**Replies:** 2\
**Last updated:** [July 7, 2008, 1:56pm UTC](https://www.ruby-forum.com/t/gravatars/142374 "2008-07-07T13:56:57Z")

</div>

I want to put some icons in a web and I want to know how can I detect if a person has a gravatar so in case they don’t have one I want to show another icon, can anyone help me?? Thanks in advance Belén

---

## [Can I put all my Ruby constants in environment.rb?](https://www.ruby-forum.com/t/can-i-put-all-my-ruby-constants-in-environment-rb/142321)

<div class="topic-metadata">

**Author:** [@Save\_The\_Vinyls](https://www.ruby-forum.com/u/Save_The_Vinyls)\
**Replies:** 6\
**Last updated:** [July 7, 2008, 1:23pm UTC](https://www.ruby-forum.com/t/can-i-put-all-my-ruby-constants-in-environment-rb/142321 "2008-07-07T13:23:34Z")

</div>

Hello, I got a lot of Ruby constants spread over a couple of models. Is it possible to throw them all into environment.rb instead? I’d really enjoy having things in one place. Thanks.

---

## [Monthly earning $1000 to $10000](https://www.ruby-forum.com/t/monthly-earning-1000-to-10000/142375)

<div class="topic-metadata">

**Author:** [@rose](https://www.ruby-forum.com/u/rose)\
**Replies:** 0\
**Last updated:** [July 7, 2008, 1:20pm UTC](https://www.ruby-forum.com/t/monthly-earning-1000-to-10000/142375 "2008-07-07T13:20:35Z")

</div>

monthly earning $1000 to $10000 simple online survey crateyour membership other details visit wwww.awsurveys.com/homemain.cfm? ref id:sivaicici

---

## [Session variable model validation](https://www.ruby-forum.com/t/session-variable-model-validation/142370)

<div class="topic-metadata">

**Author:** [@iceburging](https://www.ruby-forum.com/u/iceburging)\
**Replies:** 1\
**Last updated:** [July 7, 2008, 1:03pm UTC](https://www.ruby-forum.com/t/session-variable-model-validation/142370 "2008-07-07T13:03:35Z")

</div>

I am trying to implement a basic user permissions system with three access levels; 1, 2, and 3 (with 1 being the highest). A user should be able to create a new user but they should only at or below their own permissi…

---

## [Tree related problem](https://www.ruby-forum.com/t/tree-related-problem/142251)

<div class="topic-metadata">

**Author:** [@mrbless](https://www.ruby-forum.com/u/mrbless)\
**Replies:** 5\
**Last updated:** [July 7, 2008, 12:41pm UTC](https://www.ruby-forum.com/t/tree-related-problem/142251 "2008-07-07T12:41:51Z")

</div>

How to find the child and subchild of particular node in a tree in sql.

---

## [Use Java code in RoR](https://www.ruby-forum.com/t/use-java-code-in-ror/142369)

<div class="topic-metadata">

**Author:** [@procrastinx](https://www.ruby-forum.com/u/procrastinx)\
**Replies:** 1\
**Last updated:** [July 7, 2008, 12:35pm UTC](https://www.ruby-forum.com/t/use-java-code-in-ror/142369 "2008-07-07T12:35:59Z")

</div>

Hi All, I have some old code in Java which does a set of tasks which are needed by my RoR application. Currently the mecahnism is that there is a java web server which runs the Java code and the ROR app gets the …

---

## [How to make an API?](https://www.ruby-forum.com/t/how-to-make-an-api/142181)

<div class="topic-metadata">

**Author:** [@vapor](https://www.ruby-forum.com/u/vapor)\
**Replies:** 2\
**Last updated:** [July 7, 2008, 11:33am UTC](https://www.ruby-forum.com/t/how-to-make-an-api/142181 "2008-07-07T11:33:54Z")

</div>

I am looking for tutorial/book which tells a noob that how to make an API (with unique private keys and stuff) of a rails app.

---

## [Free & Biggest Ruby on Rails Tutorial Starts from 15th July](https://www.ruby-forum.com/t/free-biggest-ruby-on-rails-tutorial-starts-from-15th-july/142366)

<div class="topic-metadata">

**Author:** [@softmind](https://www.ruby-forum.com/u/softmind)\
**Replies:** 0\
**Last updated:** [July 7, 2008, 11:33am UTC](https://www.ruby-forum.com/t/free-biggest-ruby-on-rails-tutorial-starts-from-15th-july/142366 "2008-07-07T11:33:23Z")

</div>

Hi, I have an information to share here… http://rubyindia.wordpress.com/2008/07/07/free-and-biggest-ruby-on-rails-tutorials-with-850-members-starts-soon/ The First batch, will be starting from 15th July 2008 Name of …

---

## [Problems with link\_to\_function----Help](https://www.ruby-forum.com/t/problems-with-link-to-function-help/142355)

<div class="topic-metadata">

**Author:** [@fries88](https://www.ruby-forum.com/u/fries88)\
**Replies:** 3\
**Last updated:** [July 7, 2008, 10:58am UTC](https://www.ruby-forum.com/t/problems-with-link-to-function-help/142355 "2008-07-07T10:58:29Z")

</div>

Hi, I am using link\_to\_remote to update part of the page. The new content that is going to replace the original one has javascript tabs. The problem is the javascript tabs doesn’t work in this situation. The tabs wor…

---

## [How to insert a string content into varbinary column in rails](https://www.ruby-forum.com/t/how-to-insert-a-string-content-into-varbinary-column-in-rails/142364)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [July 7, 2008, 10:48am UTC](https://www.ruby-forum.com/t/how-to-insert-a-string-content-into-varbinary-column-in-rails/142364 "2008-07-07T10:48:16Z")

</div>

There is a varbinary column in database table,in sql statement,we can use ’ convert(varbinary(10),‘hello’) ’ to convert string to varbinary ,but in rails,how can I do that or there is a another way to insert a strin…

---

## [Simple\_captcha problem](https://www.ruby-forum.com/t/simple-captcha-problem/142361)

<div class="topic-metadata">

**Author:** [@sadeesh\_kumar](https://www.ruby-forum.com/u/sadeesh_kumar)\
**Replies:** 0\
**Last updated:** [July 7, 2008, 10:09am UTC](https://www.ruby-forum.com/t/simple-captcha-problem/142361 "2008-07-07T10:09:32Z")

</div>

Hi, I am using simple\_captcha plugin. It works well. But after sometime, throwing error “undefined method find\_by\_key”. If I restart my mongrel, the problem gets fixed and after sometime the same problem appears agai…

---

## [MemCache Failed - Any alternatives?](https://www.ruby-forum.com/t/memcache-failed-any-alternatives/142292)

<div class="topic-metadata">

**Author:** [@Rajeshwar\_Mothe](https://www.ruby-forum.com/u/Rajeshwar_Mothe)\
**Replies:** 4\
**Last updated:** [July 7, 2008, 9:44am UTC](https://www.ruby-forum.com/t/memcache-failed-any-alternatives/142292 "2008-07-07T09:44:22Z")

</div>

Hi all, Actually My Rails application configuration is on Apache/Mongrel/Rails.We are using Apache for balancing.We have clustered Mongrel and What we assume is happening is that we have a problem with RoR sessions.…

---

## [Attachment\_fu width](https://www.ruby-forum.com/t/attachment-fu-width/142341)

<div class="topic-metadata">

**Author:** [@paradise](https://www.ruby-forum.com/u/paradise)\
**Replies:** 2\
**Last updated:** [July 7, 2008, 8:15am UTC](https://www.ruby-forum.com/t/attachment-fu-width/142341 "2008-07-07T08:15:25Z")

</div>

Does anyone know how to resize images according to a specific width using attachment\_fu? More specifically, I am trying to resize images so that they retain their ratio but all have the same width. Thanks.

---

## [Edit uploaded file](https://www.ruby-forum.com/t/edit-uploaded-file/142260)

<div class="topic-metadata">

**Author:** [@jaiganez](https://www.ruby-forum.com/u/jaiganez)\
**Replies:** 3\
**Last updated:** [July 7, 2008, 6:02am UTC](https://www.ruby-forum.com/t/edit-uploaded-file/142260 "2008-07-07T06:02:49Z")

</div>

how to edit uploaded file ???pls help…

---

## [Rss Aggregator](https://www.ruby-forum.com/t/rss-aggregator/142305)

<div class="topic-metadata">

**Author:** [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Replies:** 2\
**Last updated:** [July 7, 2008, 5:38am UTC](https://www.ruby-forum.com/t/rss-aggregator/142305 "2008-07-07T05:38:30Z")

</div>

Hello frnds I want to aggregate data from various feed url into my db and display those data in form of Title Description Source so on So is there any plugin available for the same? Or is there any help for it.? …

---

## [Hosting suggestion](https://www.ruby-forum.com/t/hosting-suggestion/142303)

<div class="topic-metadata">

**Author:** [@wemagor](https://www.ruby-forum.com/u/wemagor)\
**Replies:** 2\
**Last updated:** [July 7, 2008, 5:15am UTC](https://www.ruby-forum.com/t/hosting-suggestion/142303 "2008-07-07T05:15:52Z")

</div>

Hello again, I’ve been giving some thought to hosting for my Rails application, and I’m wondering if anyone has any suggestions. I’m a little short on cash (even more so since I plan on purchasing Ben Curtis’ SaaS …

---

## [Radio\_button() problem with collections](https://www.ruby-forum.com/t/radio-button-problem-with-collections/142304)

<div class="topic-metadata">

**Author:** [@steveluscher](https://www.ruby-forum.com/u/steveluscher)\
**Replies:** 3\
**Last updated:** [July 7, 2008, 5:07am UTC](https://www.ruby-forum.com/t/radio-button-problem-with-collections/142304 "2008-07-07T05:07:36Z")

</div>

Hi - I think I’m seeing a bug in rails but am not sure. Maybe I’m just struggling. Could somebody take a look at this? I have a form to enter runner’s times for an ultra marathon. The form has 20 rows so we can en…

---

## [Select\_datetime // datetime\_select](https://www.ruby-forum.com/t/select-datetime-datetime-select/142240)

<div class="topic-metadata">

**Author:** [@gianpero](https://www.ruby-forum.com/u/gianpero)\
**Replies:** 4\
**Last updated:** [July 7, 2008, 4:56am UTC](https://www.ruby-forum.com/t/select-datetime-datetime-select/142240 "2008-07-07T04:56:35Z")

</div>

Hi I have 2 question for you guys, Which is the difference between this two methods? (select\_datetime, datetime\_select) How I assign the selected date-time values, to an specific variable or array using select\_dateti…

---

## [Action Mailer Driving me insane](https://www.ruby-forum.com/t/action-mailer-driving-me-insane/142327)

<div class="topic-metadata">

**Author:** [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Replies:** 12\
**Last updated:** [July 7, 2008, 4:47am UTC](https://www.ruby-forum.com/t/action-mailer-driving-me-insane/142327 "2008-07-07T04:47:11Z")

</div>

Ok, maybe its a short walk, not a drive… I have it working just fine using smtp in development env from my OSX machine. When I deploy it to the server (which happens to be the same box where the smtp server lives), n…

---

## [GeoKit / Form Validation](https://www.ruby-forum.com/t/geokit-form-validation/142338)

<div class="topic-metadata">

**Author:** [@Jeff.Corcoran](https://www.ruby-forum.com/u/Jeff.Corcoran)\
**Replies:** 1\
**Last updated:** [July 7, 2008, 4:27am UTC](https://www.ruby-forum.com/t/geokit-form-validation/142338 "2008-07-07T04:27:21Z")

</div>

I am new to rails and have been scouring the web for the past two days trying to figure out 2 things. I am currently using a form with 2 models. The first is person, the second is address. I attempted to duplicate t…

---

## [Link\_to :with functionality](https://www.ruby-forum.com/t/link-to-with-functionality/142328)

<div class="topic-metadata">

**Author:** [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Replies:** 3\
**Last updated:** [July 7, 2008, 1:09am UTC](https://www.ruby-forum.com/t/link-to-with-functionality/142328 "2008-07-07T01:09:09Z")

</div>

I’m trying to pass the argument from a select box with a link\_to call. This works with link\_to\_remote, but i absolutely cannot use ajax in this situation. What is the correct way to pass my select\_tag argument as a pa…

---

## [Gem install mysql options](https://www.ruby-forum.com/t/gem-install-mysql-options/142329)

<div class="topic-metadata">

**Author:** [@nextpulse](https://www.ruby-forum.com/u/nextpulse)\
**Replies:** 2\
**Last updated:** [July 7, 2008, 12:54am UTC](https://www.ruby-forum.com/t/gem-install-mysql-options/142329 "2008-07-07T00:54:33Z")

</div>

gem install mysql Need to update 7 gems from http://gems.rubyforge.org … complete Select which gem to install for your platform (i386-linux) mysql 2.7.2006.05.10 (mswin32) mysql 2.7.2006.04.21 (mswin32) mysql 2.7…

---

## [Add a profile model with User model - Edit Problem](https://www.ruby-forum.com/t/add-a-profile-model-with-user-model-edit-problem/141975)

<div class="topic-metadata">

**Author:** [@chenillen](https://www.ruby-forum.com/u/chenillen)\
**Replies:** 2\
**Last updated:** [July 7, 2008, 12:21am UTC](https://www.ruby-forum.com/t/add-a-profile-model-with-user-model-edit-problem/141975 "2008-07-07T00:21:47Z")

</div>

Hi there, I used restful authentication to generate the authenticated system, but i still want to add a profile model as a part of user model. So between user & profile I use has\_one association to connect them. Crea…

---

## [Gem install error for activesupport - wrong version](https://www.ruby-forum.com/t/gem-install-error-for-activesupport-wrong-version/142334)

<div class="topic-metadata">

**Author:** [@Kriya](https://www.ruby-forum.com/u/Kriya)\
**Replies:** 1\
**Last updated:** [July 6, 2008, 11:37pm UTC](https://www.ruby-forum.com/t/gem-install-error-for-activesupport-wrong-version/142334 "2008-07-06T23:37:18Z")

</div>

I installed rails 2.1.0 I updated my gems with the following commands gem update --system gem update --source http://gems.rubyonrails.org But when I run ruby script/server, I get the following error: C:/InstantRails…

---

## [Rails security model defaults to non-escaped output](https://www.ruby-forum.com/t/rails-security-model-defaults-to-non-escaped-output/142326)

<div class="topic-metadata">

**Author:** [@chovy](https://www.ruby-forum.com/u/chovy)\
**Replies:** 4\
**Last updated:** [July 6, 2008, 11:32pm UTC](https://www.ruby-forum.com/t/rails-security-model-defaults-to-non-escaped-output/142326 "2008-07-06T23:32:17Z")

</div>

Is there a way to toggle the security model so all output is escaped by default, and passing \<%=n (paragraph) %\> when I do not want my output escaped? Having to add \<%=h () %\> currently to do it is cumbersome and pron…

---

## [Custom CSS for use with Ultraviolet](https://www.ruby-forum.com/t/custom-css-for-use-with-ultraviolet/142333)

<div class="topic-metadata">

**Author:** [@rooster](https://www.ruby-forum.com/u/rooster)\
**Replies:** 0\
**Last updated:** [July 6, 2008, 11:21pm UTC](https://www.ruby-forum.com/t/custom-css-for-use-with-ultraviolet/142333 "2008-07-06T23:21:02Z")

</div>

Im using the textpow, ultraviolet and radiograph plugin for syntax highlighting in my rails app. I can switch between the provided themes, but I would like to create my own theme from a textmate theme. I haven’t found…

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

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