# Rails

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

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

---

## [Model.new(params) can be dangerous?](https://www.ruby-forum.com/t/model-new-params-can-be-dangerous/142748)

<div class="topic-metadata">

**Author:** [@mjacobs](https://www.ruby-forum.com/u/mjacobs)\
**Replies:** 1\
**Last updated:** [July 11, 2008, 11:39am UTC](https://www.ruby-forum.com/t/model-new-params-can-be-dangerous/142748 "2008-07-11T11:39:29Z")

</div>

I was just thinking, what if someone accidentally leaves something dangerous in a blah= method… could have some really bad consequences. Perhaps we’re better off defining all write-able attributes, rather than doing…

---

## [Observe\_form, rjs for form validate and a lot of mistakes!](https://www.ruby-forum.com/t/observe-form-rjs-for-form-validate-and-a-lot-of-mistakes/142763)

<div class="topic-metadata">

**Author:** [@lz-coelho](https://www.ruby-forum.com/u/lz-coelho)\
**Replies:** 1\
**Last updated:** [July 11, 2008, 11:19am UTC](https://www.ruby-forum.com/t/observe-form-rjs-for-form-validate-and-a-lot-of-mistakes/142763 "2008-07-11T11:19:40Z")

</div>

First, thanks for reading this post! Today i’m trying to implement a real-time form validator. I have a model (user) within: t.column :email, :string t.column :name, :string t.column :surname, :string t.co…

---

## [What is the use of Dependencies.log\_activity](https://www.ruby-forum.com/t/what-is-the-use-of-dependencies-log-activity/142765)

<div class="topic-metadata">

**Author:** [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Replies:** 1\
**Last updated:** [July 11, 2008, 11:00am UTC](https://www.ruby-forum.com/t/what-is-the-use-of-dependencies-log-activity/142765 "2008-07-11T11:00:56Z")

</div>

Hi, What is the use of Dependencies.log\_activity = true Dependencies.explicitly\_unloadable\_constants \<\< ‘Notification’ Thanks in advance…

---

## [New time object with custom value](https://www.ruby-forum.com/t/new-time-object-with-custom-value/142706)

<div class="topic-metadata">

**Author:** [@sadeesh\_kumar](https://www.ruby-forum.com/u/sadeesh_kumar)\
**Replies:** 7\
**Last updated:** [July 11, 2008, 10:55am UTC](https://www.ruby-forum.com/t/new-time-object-with-custom-value/142706 "2008-07-11T10:55:05Z")

</div>

hi, I need to construct anew time object with hour-\>7,min-55,sec-33. Then how could i do it?. As i search for it, I found no constructor to make time object like this. Anybody? Thanks, -Sadeesh kumar.

---

## [GLoc's l\_date don't work](https://www.ruby-forum.com/t/glocs-l-date-dont-work/142773)

<div class="topic-metadata">

**Author:** [@zhangpeihao](https://www.ruby-forum.com/u/zhangpeihao)\
**Replies:** 0\
**Last updated:** [July 11, 2008, 9:52am UTC](https://www.ruby-forum.com/t/glocs-l-date-dont-work/142773 "2008-07-11T09:52:11Z")

</div>

Hi, are there anyone have used l\_date to format a date object. I have used it as: \<%= l\_date porject.created\_at %\> And defineded the “general\_fmt\_date” in “lang\\en.yml” as: general\_fmt\_date: %%m/%%d/%%Y When run it,…

---

## [Connect Rails to an existant database](https://www.ruby-forum.com/t/connect-rails-to-an-existant-database/142699)

<div class="topic-metadata">

**Author:** [@zzzer](https://www.ruby-forum.com/u/zzzer)\
**Replies:** 8\
**Last updated:** [July 11, 2008, 9:36am UTC](https://www.ruby-forum.com/t/connect-rails-to-an-existant-database/142699 "2008-07-11T09:36:38Z")

</div>

Hello, I’ve been using rails for a few days and I know how to create a new application and new database. My problem is that I now have to connect Rails to an existant database, and I don’t know how to do … Can someb…

---

## [Ruby RTSP server](https://www.ruby-forum.com/t/ruby-rtsp-server/142711)

<div class="topic-metadata">

**Author:** [@dicouw](https://www.ruby-forum.com/u/dicouw)\
**Replies:** 2\
**Last updated:** [July 11, 2008, 9:11am UTC](https://www.ruby-forum.com/t/ruby-rtsp-server/142711 "2008-07-11T09:11:54Z")

</div>

Hello everyone, Does anybody know a RTSP server written in ruby? It’s for video content streaming, thanks !

---

## [How to dynamically called RESTful route helpers](https://www.ruby-forum.com/t/how-to-dynamically-called-restful-route-helpers/142753)

<div class="topic-metadata">

**Author:** [@weyus](https://www.ruby-forum.com/u/weyus)\
**Replies:** 2\
**Last updated:** [July 11, 2008, 7:30am UTC](https://www.ruby-forum.com/t/how-to-dynamically-called-restful-route-helpers/142753 "2008-07-11T07:30:59Z")

</div>

All, I’m writing a generic application helper that will take an object and then attempt to generate the name of the appropriate RESTful route helper for POST and PUT. Here it is so far: def get\_form\_url(object) tab…

---

## [Fedora 8 and Mysql gem memory leak?](https://www.ruby-forum.com/t/fedora-8-and-mysql-gem-memory-leak/142133)

<div class="topic-metadata">

**Author:** [@nextpulse](https://www.ruby-forum.com/u/nextpulse)\
**Replies:** 15\
**Last updated:** [July 11, 2008, 7:29am UTC](https://www.ruby-forum.com/t/fedora-8-and-mysql-gem-memory-leak/142133 "2008-07-11T07:29:33Z")

</div>

I was able to see a memory leak on my production server so I tried a simple test on the dev server: Fedora 8 Rails 1.2.6 MySQL 5 Gems: mysql (2.7) mongrel\_cluster (1.0.5) mongrel (1.1.5) The mongrel is a cluster…

---

## [Filename](https://www.ruby-forum.com/t/filename/142688)

<div class="topic-metadata">

**Author:** [@prionko](https://www.ruby-forum.com/u/prionko)\
**Replies:** 2\
**Last updated:** [July 11, 2008, 6:27am UTC](https://www.ruby-forum.com/t/filename/142688 "2008-07-11T06:27:04Z")

</div>

Hi, I am using attachment\_fu plugin for uploading files. Can anybody tell me how to access the filename in the Model before the file gets uploaded ? Actually I want to a system where the users will be able to upload f…

---

## [Displaying error messages](https://www.ruby-forum.com/t/displaying-error-messages/142764)

<div class="topic-metadata">

**Author:** [@paradise](https://www.ruby-forum.com/u/paradise)\
**Replies:** 0\
**Last updated:** [July 11, 2008, 6:06am UTC](https://www.ruby-forum.com/t/displaying-error-messages/142764 "2008-07-11T06:06:33Z")

</div>

I am able to display error messages when a user tries to sign up for my site but doesnt pass the validations, but I am having trouble displaying them for another controller in my site. I have included: \<%= error\_mess…

---

## [Image resize ..using attachment\_fu](https://www.ruby-forum.com/t/image-resize-using-attachment-fu/142667)

<div class="topic-metadata">

**Author:** [@jaiganez](https://www.ruby-forum.com/u/jaiganez)\
**Replies:** 2\
**Last updated:** [July 11, 2008, 6:04am UTC](https://www.ruby-forum.com/t/image-resize-using-attachment-fu/142667 "2008-07-11T06:04:53Z")

</div>

i ve tried this link http://clarkware.com/cgi/blosxom/2007/02/24… for image resize …everything works fine …but image size remains same for tiny ,small,medium …i cant change the size … my model is… has\_attachment :…

---

## [Accessing a class in Model from Controller](https://www.ruby-forum.com/t/accessing-a-class-in-model-from-controller/142756)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 3\
**Last updated:** [July 11, 2008, 5:57am UTC](https://www.ruby-forum.com/t/accessing-a-class-in-model-from-controller/142756 "2008-07-11T05:57:45Z")

</div>

I have a model with Class Cart, but when I try to Cart.new in my controller, it does not recognize the constant Cart. Suggestions??

---

## [HTTP Post request for a link](https://www.ruby-forum.com/t/http-post-request-for-a-link/142714)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 5\
**Last updated:** [July 11, 2008, 5:37am UTC](https://www.ruby-forum.com/t/http-post-request-for-a-link/142714 "2008-07-11T05:37:46Z")

</div>

\<%= link\_to image\_tag(product.url), :action =\> :add\_to\_cart, :method =\> :delete, :id =\> product %\> Hi, Did I implement this link correctly to send an HTTP Post request? Thanks

---

## [\[ANN\] Lockdown 0.5.13](https://www.ruby-forum.com/t/ann-lockdown-0-5-13/142762)

<div class="topic-metadata">

**Author:** [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Replies:** 0\
**Last updated:** [July 11, 2008, 5:31am UTC](https://www.ruby-forum.com/t/ann-lockdown-0-5-13/142762 "2008-07-11T05:31:26Z")

</div>

About: http://stonean.com/wiki/lockdown Lockdown is a authentication/authorization system for RubyOnRails (ver 2.x). Lockdown operates on the principal of restrict all access unless access has been defined. Anothe…

---

## [Can you not \<%= render :action =\> "x" %\> in a view?](https://www.ruby-forum.com/t/can-you-not-render-action-x-in-a-view/142727)

<div class="topic-metadata">

**Author:** [@squeegy](https://www.ruby-forum.com/u/squeegy)\
**Replies:** 3\
**Last updated:** [July 11, 2008, 4:51am UTC](https://www.ruby-forum.com/t/can-you-not-render-action-x-in-a-view/142727 "2008-07-11T04:51:04Z")

</div>

Have I gotten stupider? I can seem to get this to work. It seems that absolutely nothing happens when I do a \<%= render :controller =\> “patients”, :action =\> “new” %\> in a view. Is it not possible? Am I supposed to u…

---

## [Report abuse and polymorphism](https://www.ruby-forum.com/t/report-abuse-and-polymorphism/142758)

<div class="topic-metadata">

**Author:** [@joel](https://www.ruby-forum.com/u/joel)\
**Replies:** 0\
**Last updated:** [July 11, 2008, 3:56am UTC](https://www.ruby-forum.com/t/report-abuse-and-polymorphism/142758 "2008-07-11T03:56:02Z")

</div>

Hello All, i m trying to implement a report abuse system on my website; basically i want to be able to report anything, from suer profiles to user comments. So I guess I should use object\_id and object\_type to be able …

---

## [Acts\_as\_authenticated current\_user in a model with rails 2.02 fails](https://www.ruby-forum.com/t/acts-as-authenticated-current-user-in-a-model-with-rails-2-02-fails/142754)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 0\
**Last updated:** [July 11, 2008, 3:22am UTC](https://www.ruby-forum.com/t/acts-as-authenticated-current-user-in-a-model-with-rails-2-02-fails/142754 "2008-07-11T03:22:04Z")

</div>

Hi - I’m using acts\_as\_authenticated on my local machine, in a model I ask if current\_user and it works locally no problem. I upload to my host, and suddenly I get : undefined local variable or method \`current\_user…

---

## [Fields\_for/pseudoattribute approach failing on create parent (b/c parent not saved?)](https://www.ruby-forum.com/t/fields-for-pseudoattribute-approach-failing-on-create-parent-b-c-parent-not-saved/142656)

<div class="topic-metadata">

**Author:** [@rpardee](https://www.ruby-forum.com/u/rpardee)\
**Replies:** 1\
**Last updated:** [July 11, 2008, 2:58am UTC](https://www.ruby-forum.com/t/fields-for-pseudoattribute-approach-failing-on-create-parent-b-c-parent-not-saved/142656 "2008-07-11T02:58:40Z")

</div>

Hey All, I’m trying to use the railscasts ep 75 approach to including multiple models on a single form, by using fields\_for to load up a pseudoattribute. My ‘parent’ model is a Project, and the ‘child’ is a ProjectP…

---

## [Custom method in model](https://www.ruby-forum.com/t/custom-method-in-model/142658)

<div class="topic-metadata">

**Author:** [@amrita](https://www.ruby-forum.com/u/amrita)\
**Replies:** 8\
**Last updated:** [July 11, 2008, 2:04am UTC](https://www.ruby-forum.com/t/custom-method-in-model/142658 "2008-07-11T02:04:52Z")

</div>

Hello, I am a RAILS beginner and have been building an application that has quite a few models in it. The problem I encounter is the following: There are three models: Contig, Intergenic, Longshortgene A contig has m…

---

## [Newbie REST confusion](https://www.ruby-forum.com/t/newbie-rest-confusion/142745)

<div class="topic-metadata">

**Author:** [@paradise](https://www.ruby-forum.com/u/paradise)\
**Replies:** 1\
**Last updated:** [July 11, 2008, 1:14am UTC](https://www.ruby-forum.com/t/newbie-rest-confusion/142745 "2008-07-11T01:14:29Z")

</div>

So I am trying to do the simple action of updating user information(the model is named spec) that may not exist in the first place. Meaning I have one view for both new and update. I think theres something wrong with…

---

## [Serialization save problem](https://www.ruby-forum.com/t/serialization-save-problem/142742)

<div class="topic-metadata">

**Author:** [@juan](https://www.ruby-forum.com/u/juan)\
**Replies:** 0\
**Last updated:** [July 11, 2008, 12:13am UTC](https://www.ruby-forum.com/t/serialization-save-problem/142742 "2008-07-11T00:13:08Z")

</div>

This is my class: class Articulo \< ActiveRecord::Base serialize :atributos\_extendidos, Hash def after\_find self.atributos\_extendidos.each do |k,v| Articulo.class\_eval \<\<-CODE def #{k} self.atributos\_extendidos ||=…

---

## [Install plugin from zip file](https://www.ruby-forum.com/t/install-plugin-from-zip-file/142739)

<div class="topic-metadata">

**Author:** [@scottnj](https://www.ruby-forum.com/u/scottnj)\
**Replies:** 0\
**Last updated:** [July 10, 2008, 11:50pm UTC](https://www.ruby-forum.com/t/install-plugin-from-zip-file/142739 "2008-07-10T23:50:50Z")

</div>

i have been trying to install the geokit plugin. for some reason script/plugin install svn://rubyforge.org/var/svn/geokit/trunk isn’t working for me. i downloaded it as a zip file from http://rubyforge.org/frs/?group\_…

---

## [Need Browser to Not Cache Ajax Image](https://www.ruby-forum.com/t/need-browser-to-not-cache-ajax-image/142673)

<div class="topic-metadata">

**Author:** [@Joe\_K](https://www.ruby-forum.com/u/Joe_K)\
**Replies:** 2\
**Last updated:** [July 10, 2008, 11:30pm UTC](https://www.ruby-forum.com/t/need-browser-to-not-cache-ajax-image/142673 "2008-07-10T23:30:56Z")

</div>

I am banging my head against the wall here. I have a gd-generated image that keeps being changed via ajax on my page. Since the image is generated based on querystring parameters (which don’t change) but is based on …

---

## [Uppercase all row columns](https://www.ruby-forum.com/t/uppercase-all-row-columns/142719)

<div class="topic-metadata">

**Author:** [@pepe](https://www.ruby-forum.com/u/pepe)\
**Replies:** 6\
**Last updated:** [July 10, 2008, 11:24pm UTC](https://www.ruby-forum.com/t/uppercase-all-row-columns/142719 "2008-07-10T23:24:29Z")

</div>

Hi. I have to convert the contents of all columns to uppercase before creating a row. Is there an easy way to accomplish this so I don’t have to go one column at a time and upcase! it? Thanks. Pepe

---

## [What's the effort (time/costs) and a good approach to change from java ruby to rails?](https://www.ruby-forum.com/t/whats-the-effort-time-costs-and-a-good-approach-to-change-from-java-ruby-to-rails/142733)

<div class="topic-metadata">

**Author:** [@SIEGL\_Manfred](https://www.ruby-forum.com/u/SIEGL_Manfred)\
**Replies:** 0\
**Last updated:** [July 10, 2008, 11:02pm UTC](https://www.ruby-forum.com/t/whats-the-effort-time-costs-and-a-good-approach-to-change-from-java-ruby-to-rails/142733 "2008-07-10T23:02:12Z")

</div>

Dear All, I would be really happy to get some information about a good way and the related costs and timeframes to enhance from a java ruby developer to rails. Every person who answers will be included in night praye…

---

## [Tempfiles](https://www.ruby-forum.com/t/tempfiles/142732)

<div class="topic-metadata">

**Author:** [@crunch](https://www.ruby-forum.com/u/crunch)\
**Replies:** 0\
**Last updated:** [July 10, 2008, 11:01pm UTC](https://www.ruby-forum.com/t/tempfiles/142732 "2008-07-10T23:01:02Z")

</div>

I’m trying to get Tempfiles to work but they randomly disappear. It is very likely that I do not know how they work. This is what I want to do…if you think there’s a better and accepted approach please let me know. …

---

## [Auto scroll promos content box](https://www.ruby-forum.com/t/auto-scroll-promos-content-box/142731)

<div class="topic-metadata">

**Author:** [@proximal](https://www.ruby-forum.com/u/proximal)\
**Replies:** 0\
**Last updated:** [July 10, 2008, 11:01pm UTC](https://www.ruby-forum.com/t/auto-scroll-promos-content-box/142731 "2008-07-10T23:01:01Z")

</div>

Hi, I am searching for a solution to display in a div content box an auto- scrolling list of promotions (populated from a db). This can be a continuous scroll or a refresh of the box with a new item every 5s by examp…

---

## [Truncate and regex](https://www.ruby-forum.com/t/truncate-and-regex/142710)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 3\
**Last updated:** [July 10, 2008, 11:00pm UTC](https://www.ruby-forum.com/t/truncate-and-regex/142710 "2008-07-10T23:00:26Z")

</div>

Hey, New to ruby and unfamiliar with the function ‘truncate’ Also, what does this do: gsub(/\<.\*?\>/, ‘’) Particularly, the regex. Thanks!

---

## [Actionwebservice + Rails 2.1](https://www.ruby-forum.com/t/actionwebservice-rails-2-1/140944)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [July 10, 2008, 8:16pm UTC](https://www.ruby-forum.com/t/actionwebservice-rails-2-1/140944 "2008-07-10T20:16:09Z")

</div>

Does anyone have this working?

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

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