# Rails

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

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

---

## [REST doubt](https://www.ruby-forum.com/t/rest-doubt/144490)

<div class="topic-metadata">

**Author:** [@srijith](https://www.ruby-forum.com/u/srijith)\
**Replies:** 2\
**Last updated:** [July 30, 2008, 7:36am UTC](https://www.ruby-forum.com/t/rest-doubt/144490 "2008-07-30T07:36:31Z")

</div>

Hi Can any one help is RESTful architecture is only for default functions like (index,create,update,delete) or we can do for own functions like def department end def user\_list end like these functions also is it…

---

## [Soft-coding model names?](https://www.ruby-forum.com/t/soft-coding-model-names/144419)

<div class="topic-metadata">

**Author:** [@pepe](https://www.ruby-forum.com/u/pepe)\
**Replies:** 4\
**Last updated:** [July 30, 2008, 5:29am UTC](https://www.ruby-forum.com/t/soft-coding-model-names/144419 "2008-07-30T05:29:02Z")

</div>

Hello. I am trying to “soft-code” the model names in my app so I can use a generic method call to achieve some results. Many of my modules have the the following method: def ModelName.get\_array same code goes here f…

---

## [Polymorphisme and single table inheritance](https://www.ruby-forum.com/t/polymorphisme-and-single-table-inheritance/141663)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 1\
**Last updated:** [July 30, 2008, 5:09am UTC](https://www.ruby-forum.com/t/polymorphisme-and-single-table-inheritance/141663 "2008-07-30T05:09:10Z")

</div>

Hi I use STI and polymorphisme as following : class Franchise \< Company … has\_one :notebook, :as =\> :notebookable, :dependent =\> :destroy … def after\_create … self.create\_notebook end class Notebook \< Active…

---

## [Can't crop images using ImageMagick](https://www.ruby-forum.com/t/cant-crop-images-using-imagemagick/144481)

<div class="topic-metadata">

**Author:** [@andy](https://www.ruby-forum.com/u/andy)\
**Replies:** 1\
**Last updated:** [July 30, 2008, 1:52am UTC](https://www.ruby-forum.com/t/cant-crop-images-using-imagemagick/144481 "2008-07-30T01:52:42Z")

</div>

I’m using Attachment\_Fu to save several thumbnails of a photo (resizing with ImageMagick) But when I try to crop them, nothing seems to happen to the file I want to drop and no error messages. I check the file timest…

---

## [How to parse a .erb string and store the result on another string](https://www.ruby-forum.com/t/how-to-parse-a-erb-string-and-store-the-result-on-another-string/144478)

<div class="topic-metadata">

**Author:** [@andres](https://www.ruby-forum.com/u/andres)\
**Replies:** 1\
**Last updated:** [July 30, 2008, 1:18am UTC](https://www.ruby-forum.com/t/how-to-parse-a-erb-string-and-store-the-result-on-another-string/144478 "2008-07-30T01:18:13Z")

</div>

Hi Before diving on the seas of find-out-your-self I though I’d venture a post. given a string with valid .erb syntax such as string=’\<% who=world %\> hello \<%= who %\>’ is there a way to parse it and obtain the resul…

---

## [Unsubscribe](https://www.ruby-forum.com/t/unsubscribe/144480)

<div class="topic-metadata">

**Author:** [@Mikey\_P](https://www.ruby-forum.com/u/Mikey_P)\
**Replies:** 0\
**Last updated:** [July 30, 2008, 12:58am UTC](https://www.ruby-forum.com/t/unsubscribe/144480 "2008-07-30T00:58:54Z")

</div>

unsubscribe

---

## [Reading a file from my application (silently)](https://www.ruby-forum.com/t/reading-a-file-from-my-application-silently/144445)

<div class="topic-metadata">

**Author:** [@traceyz](https://www.ruby-forum.com/u/traceyz)\
**Replies:** 2\
**Last updated:** [July 29, 2008, 11:25pm UTC](https://www.ruby-forum.com/t/reading-a-file-from-my-application-silently/144445 "2008-07-29T23:25:56Z")

</div>

I have an rails application that needs to read a file from its own directories. Say I put in in the config folder, and call it sometext.txt. In a controller I have f = File.new(File.join(RAILS\_ROOT, ‘config’, ‘sometex…

---

## [Sudo root, to make a chown](https://www.ruby-forum.com/t/sudo-root-to-make-a-chown/144433)

<div class="topic-metadata">

**Author:** [@vanight](https://www.ruby-forum.com/u/vanight)\
**Replies:** 3\
**Last updated:** [July 29, 2008, 10:40pm UTC](https://www.ruby-forum.com/t/sudo-root-to-make-a-chown/144433 "2008-07-29T22:40:52Z")

</div>

Hello, I’m trying to do a rsync on a folder generated by ruby on Rails. But the main problem is that every generated stuff is nobody nobody. So I’m trying to chown, but the ruby service through apache is not root. So…

---

## [Paginating](https://www.ruby-forum.com/t/paginating/144447)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 2\
**Last updated:** [July 29, 2008, 10:17pm UTC](https://www.ruby-forum.com/t/paginating/144447 "2008-07-29T22:17:34Z")

</div>

Hi, I’ve just stumbled across ‘will\_paginate’, and I was wondering if anyone knows if I could use a ‘find\_by\_sql’. The problem I’m facing is: I want to paginate, but I only want to list the maximum row in each group. …

---

## [Handling multiple lookup tables in rails](https://www.ruby-forum.com/t/handling-multiple-lookup-tables-in-rails/144467)

<div class="topic-metadata">

**Author:** [@marlow](https://www.ruby-forum.com/u/marlow)\
**Replies:** 0\
**Last updated:** [July 29, 2008, 9:28pm UTC](https://www.ruby-forum.com/t/handling-multiple-lookup-tables-in-rails/144467 "2008-07-29T21:28:07Z")

</div>

I’ve got an application that will have a handful of lookup tables. To be clear by this I mean tables that only have two attributes, id, name and are used to provide drop-down lists for other tables/forms so that these…

---

## [Model attribute types](https://www.ruby-forum.com/t/model-attribute-types/144407)

<div class="topic-metadata">

**Author:** [@Ibon\_Castilla](https://www.ruby-forum.com/u/Ibon_Castilla)\
**Replies:** 2\
**Last updated:** [July 29, 2008, 9:28pm UTC](https://www.ruby-forum.com/t/model-attribute-types/144407 "2008-07-29T21:28:07Z")

</div>

Hi there: I was just looking for documentation (official if possible) about attribute types when generating a model, but I haven’t found it :S May anyone tell me in what place of the documentation can I found info ab…

---

## [Rails Site Indexed by Google and Other Search Engines?](https://www.ruby-forum.com/t/rails-site-indexed-by-google-and-other-search-engines/144444)

<div class="topic-metadata">

**Author:** [@jeremy](https://www.ruby-forum.com/u/jeremy)\
**Replies:** 2\
**Last updated:** [July 29, 2008, 9:28pm UTC](https://www.ruby-forum.com/t/rails-site-indexed-by-google-and-other-search-engines/144444 "2008-07-29T21:28:07Z")

</div>

Greetings, I’m very much brand-new to Rails and have inherited a site created with Rails that I’m trying to become familiar with. I’ve discovered how to change my rhtml files with no problems, but have noticed that, …

---

## [Help tracking user statistics with Rails](https://www.ruby-forum.com/t/help-tracking-user-statistics-with-rails/144438)

<div class="topic-metadata">

**Author:** [@pipex](https://www.ruby-forum.com/u/pipex)\
**Replies:** 1\
**Last updated:** [July 29, 2008, 8:52pm UTC](https://www.ruby-forum.com/t/help-tracking-user-statistics-with-rails/144438 "2008-07-29T20:52:06Z")

</div>

SOS!! I need some help. I need to know if somebody has heard about any plugin that can do the track of the statistics of a user in a web page, like time , where did they do click or things like that. Maybe with javas…

---

## [Can I use BackgroundRB to send mailer messages?](https://www.ruby-forum.com/t/can-i-use-backgroundrb-to-send-mailer-messages/144456)

<div class="topic-metadata">

**Author:** [@andy](https://www.ruby-forum.com/u/andy)\
**Replies:** 1\
**Last updated:** [July 29, 2008, 8:43pm UTC](https://www.ruby-forum.com/t/can-i-use-backgroundrb-to-send-mailer-messages/144456 "2008-07-29T20:43:14Z")

</div>

In my worker, I have code that looks like this: PostOffice.deliver\_application\_rejected(profile\_rejection.user\_id) But it doesn’t look like the email is being sent. Any ideas? Thanks, Andy

---

## [Updating the page dynamically](https://www.ruby-forum.com/t/updating-the-page-dynamically/143875)

<div class="topic-metadata">

**Author:** [@ddtm](https://www.ruby-forum.com/u/ddtm)\
**Replies:** 7\
**Last updated:** [July 29, 2008, 8:38pm UTC](https://www.ruby-forum.com/t/updating-the-page-dynamically/143875 "2008-07-29T20:38:53Z")

</div>

Hi, I’m developing a Rails application that displays data from MySQL database table. I have an external python script that adds new rows to the table. My goal is to dynamically add new rows to the html table which is …

---

## [Getting value from collection\_select](https://www.ruby-forum.com/t/getting-value-from-collection-select/144457)

<div class="topic-metadata">

**Author:** [@jdrietz](https://www.ruby-forum.com/u/jdrietz)\
**Replies:** 0\
**Last updated:** [July 29, 2008, 8:28pm UTC](https://www.ruby-forum.com/t/getting-value-from-collection-select/144457 "2008-07-29T20:28:15Z")

</div>

Hi, I have this: \<%= collection\_select(:post, :id, @posts, :id, :title, options ={:prompt =\> “-Select categories-”}, :class=\>“category\_dropdown\_list”) %\> How do I get the value of the list? In my observe\_field, :wit…

---

## [Strategy Help -- Moving from Development to Production](https://www.ruby-forum.com/t/strategy-help-moving-from-development-to-production/144442)

<div class="topic-metadata">

**Author:** [@Daniel\_Hirsch](https://www.ruby-forum.com/u/Daniel_Hirsch)\
**Replies:** 1\
**Last updated:** [July 29, 2008, 8:27pm UTC](https://www.ruby-forum.com/t/strategy-help-moving-from-development-to-production/144442 "2008-07-29T20:27:10Z")

</div>

Hello everyone, I apologize if I’m missing a really obvious resource for this – I’ve looked and haven’t found anything. I’m working my way through my first real Rails application, and so far, have spent all of my tim…

---

## [Undefined method referer on ActionController::TestRequest](https://www.ruby-forum.com/t/undefined-method-referer-on-actioncontroller-testrequest/144455)

<div class="topic-metadata">

**Author:** [@win.raguini](https://www.ruby-forum.com/u/win.raguini)\
**Replies:** 0\
**Last updated:** [July 29, 2008, 8:12pm UTC](https://www.ruby-forum.com/t/undefined-method-referer-on-actioncontroller-testrequest/144455 "2008-07-29T20:12:32Z")

</div>

I am getting a NoMethodError: undefined method \`referer’ for #ActionController::TestRequest:0x438f2e4 when running a test on a controller including a request.referer call. When tested via script/server it works perfec…

---

## [Html tags problem in truncated text](https://www.ruby-forum.com/t/html-tags-problem-in-truncated-text/144423)

<div class="topic-metadata">

**Author:** [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Replies:** 2\
**Last updated:** [July 29, 2008, 7:22pm UTC](https://www.ruby-forum.com/t/html-tags-problem-in-truncated-text/144423 "2008-07-29T19:22:46Z")

</div>

I have problem with truncation of text. My text includes html tags also. On main page I display only 100 characters of it, and give read more link to user. Now if within these 100 characters, if there is any html tag …

---

## [El dorado](https://www.ruby-forum.com/t/el-dorado/141729)

<div class="topic-metadata">

**Author:** [@paradise](https://www.ruby-forum.com/u/paradise)\
**Replies:** 2\
**Last updated:** [July 29, 2008, 7:18pm UTC](https://www.ruby-forum.com/t/el-dorado/141729 "2008-07-29T19:18:46Z")

</div>

anyone with any el dorado experience know where the css stylesheet is for the calendar. It is marked but I cannot find the css for this anywhere in the code. thanks dave

---

## [Redirect for ssl](https://www.ruby-forum.com/t/redirect-for-ssl/144369)

<div class="topic-metadata">

**Author:** [@tbobker](https://www.ruby-forum.com/u/tbobker)\
**Replies:** 5\
**Last updated:** [July 29, 2008, 7:05pm UTC](https://www.ruby-forum.com/t/redirect-for-ssl/144369 "2008-07-29T19:05:32Z")

</div>

I have two sites: foo.com and bar.com which dns points to the same ip and whose contents reside on the same folder. The problem is that i purchased a site certificate for only foo.com. If ssl\_required redirects a user…

---

## [Detecting IE for my style sheet](https://www.ruby-forum.com/t/detecting-ie-for-my-style-sheet/144422)

<div class="topic-metadata">

**Author:** [@mitch\_newbie](https://www.ruby-forum.com/u/mitch_newbie)\
**Replies:** 6\
**Last updated:** [July 29, 2008, 6:12pm UTC](https://www.ruby-forum.com/t/detecting-ie-for-my-style-sheet/144422 "2008-07-29T18:12:22Z")

</div>

I have a two style sheets. One for IE and one for all the other browsers. Now I need browser detection so I know which style sheet to load. I understand that there is request.user\_agent. My question is what is the st…

---

## [Cannot destroy child records](https://www.ruby-forum.com/t/cannot-destroy-child-records/144437)

<div class="topic-metadata">

**Author:** [@remcoh](https://www.ruby-forum.com/u/remcoh)\
**Replies:** 0\
**Last updated:** [July 29, 2008, 5:50pm UTC](https://www.ruby-forum.com/t/cannot-destroy-child-records/144437 "2008-07-29T17:50:59Z")

</div>

Hi, i am lost here, i have these models: class Shift \< ActiveRecord::Base has\_many :transactions,:dependent =\> :destroy has\_one :exchangeproposal class Transaction \< ActiveRecord::Base belongs\_to :shift has\_many :…

---

## [This Rails Hosting Rate at $1 is too good to trust](https://www.ruby-forum.com/t/this-rails-hosting-rate-at-1-is-too-good-to-trust/144384)

<div class="topic-metadata">

**Author:** [@webreservoir](https://www.ruby-forum.com/u/webreservoir)\
**Replies:** 1\
**Last updated:** [July 29, 2008, 5:26pm UTC](https://www.ruby-forum.com/t/this-rails-hosting-rate-at-1-is-too-good-to-trust/144384 "2008-07-29T17:26:34Z")

</div>

Hi, I was surprised to see this Rails Hosting Rates, without any setup charges. Its $1 for 1 month. http://fernohosting.net/index.php/home I dont think, this can be true. Its too good to trust such rates. Just expe…

---

## [\[ANN\] Radiant CMS 0.6.8 "Incise" Release](https://www.ruby-forum.com/t/ann-radiant-cms-0-6-8-incise-release/144267)

<div class="topic-metadata">

**Author:** [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Replies:** 10\
**Last updated:** [July 29, 2008, 5:20pm UTC](https://www.ruby-forum.com/t/ann-radiant-cms-0-6-8-incise-release/144267 "2008-07-29T17:20:49Z")

</div>

Looks like it’s time for another release of Radiant: http://radiantcms.org/download/ Radiant 0.6.8 “Incise” adds a number of new features that enhance support for extensions and completes the project’s move to github…

---

## [Routes, default\_url\_options and languages](https://www.ruby-forum.com/t/routes-default-url-options-and-languages/113957)

<div class="topic-metadata">

**Author:** [@tbaustert](https://www.ruby-forum.com/u/tbaustert)\
**Replies:** 3\
**Last updated:** [July 29, 2008, 5:11pm UTC](https://www.ruby-forum.com/t/routes-default-url-options-and-languages/113957 "2008-07-29T17:11:56Z")

</div>

Hello, My app is available in 2 languages, English (en) and French (fr). I would like all my URLs to look like this : /fr/companies /en/companies I’ve setup this route : map.connect ‘:lg/:controller/:action/:id’ I…

---

## [How to validations while updating a model?](https://www.ruby-forum.com/t/how-to-validations-while-updating-a-model/144387)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 2\
**Last updated:** [July 29, 2008, 4:33pm UTC](https://www.ruby-forum.com/t/how-to-validations-while-updating-a-model/144387 "2008-07-29T16:33:36Z")

</div>

Dear all, How to do validations while updating a model using method update\_attributes()? Thanks in advance. Regards, Jose Martin

---

## [The Recently Revised page of rails wiki was broken](https://www.ruby-forum.com/t/the-recently-revised-page-of-rails-wiki-was-broken/144371)

<div class="topic-metadata">

**Author:** [@phoenix520](https://www.ruby-forum.com/u/phoenix520)\
**Replies:** 7\
**Last updated:** [July 29, 2008, 4:28pm UTC](https://www.ruby-forum.com/t/the-recently-revised-page-of-rails-wiki-was-broken/144371 "2008-07-29T16:28:37Z")

</div>

I like to read http://wiki.rubyonrails.org/rails/recent everyday to learn rails,because I can find some new tips and knowledge from there everyday.However,the page was broken a few weeks ago,and still can’t be visited…

---

## [Uploading file inruby on rails](https://www.ruby-forum.com/t/uploading-file-inruby-on-rails/144414)

<div class="topic-metadata">

**Author:** [@sujith](https://www.ruby-forum.com/u/sujith)\
**Replies:** 1\
**Last updated:** [July 29, 2008, 4:27pm UTC](https://www.ruby-forum.com/t/uploading-file-inruby-on-rails/144414 "2008-07-29T16:27:17Z")

</div>

I am uploading on html file and saving in public folder for this i am writing this code def self.save(upload) name = upload\[‘datafile’\].original\_filename directory = “public/uploads” path = File.join(directory, nam…

---

## [RESTful routes and adding/removing associations](https://www.ruby-forum.com/t/restful-routes-and-adding-removing-associations/144406)

<div class="topic-metadata">

**Author:** [@gudleik](https://www.ruby-forum.com/u/gudleik)\
**Replies:** 2\
**Last updated:** [July 29, 2008, 3:24pm UTC](https://www.ruby-forum.com/t/restful-routes-and-adding-removing-associations/144406 "2008-07-29T15:24:03Z")

</div>

Hi, I’m trying to make a restful route to Add and Remove relationships between a Contact and a Customer. I have a Contact and a Customer model that looks like def Contact \< ActiveRecord::Base has\_many :customer\_mapp…

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

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