# Rails

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

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

---

## [How do I generate a page from a controller from inside a model](https://www.ruby-forum.com/t/how-do-i-generate-a-page-from-a-controller-from-inside-a-model/141353)

<div class="topic-metadata">

**Author:** [@srveit](https://www.ruby-forum.com/u/srveit)\
**Replies:** 0\
**Last updated:** [June 24, 2008, 10:54pm UTC](https://www.ruby-forum.com/t/how-do-i-generate-a-page-from-a-controller-from-inside-a-model/141353 "2008-06-24T22:54:38Z")

</div>

I have a model that I want to use for generating web pages. The pages will be what is rendered by a controller action. The generated pages will be FTP’ed to a hosting site where they will served up as static pages. O…

---

## [Solution to](https://www.ruby-forum.com/t/solution-to/141350)

<div class="topic-metadata">

**Author:** [@owen](https://www.ruby-forum.com/u/owen)\
**Replies:** 0\
**Last updated:** [June 24, 2008, 10:32pm UTC](https://www.ruby-forum.com/t/solution-to/141350 "2008-06-24T22:32:22Z")

</div>

Exact problem as chris, pentor and Vince – it was driving me crazy. Deleting the cache did not help – the gem magically reappears each time. I managed to install ActiveSupport 2.1.0 by downloading from its rubyforge …

---

## [Problem with passenger](https://www.ruby-forum.com/t/problem-with-passenger/141226)

<div class="topic-metadata">

**Author:** [@CSSSSssio\_Marques](https://www.ruby-forum.com/u/CSSSSssio_Marques)\
**Replies:** 1\
**Last updated:** [June 24, 2008, 10:26pm UTC](https://www.ruby-forum.com/t/problem-with-passenger/141226 "2008-06-24T22:26:29Z")

</div>

Hello everybody. I’m trying to run an app with passenger, but having some problems… In apache2.conf I’m using: ServerName 10.10.2.15 Include /etc/apache2/sites-enabled/\[^.#\] Then at /etc/apache2/sites-available/cada…

---

## [Best approach](https://www.ruby-forum.com/t/best-approach/141198)

<div class="topic-metadata">

**Author:** [@jason](https://www.ruby-forum.com/u/jason)\
**Replies:** 1\
**Last updated:** [June 24, 2008, 10:24pm UTC](https://www.ruby-forum.com/t/best-approach/141198 "2008-06-24T22:24:43Z")

</div>

i have two radio buttons (member/non-member), and would like to set the price of adding attendees to a meeting based on the selection of the radio button. A shopping cart seems like over-kill for this, but other than…

---

## [FCKEditor](https://www.ruby-forum.com/t/fckeditor/140225)

<div class="topic-metadata">

**Author:** [@heimdull](https://www.ruby-forum.com/u/heimdull)\
**Replies:** 3\
**Last updated:** [June 24, 2008, 10:24pm UTC](https://www.ruby-forum.com/t/fckeditor/140225 "2008-06-24T22:24:43Z")

</div>

Hi, I was using fckeditor in a rails app for editing some static pages (CMS Lite :slight\_smile: ) and now I wanted to upload images/pdfs and link to these using the built in functions in fckeditor… The upload works f…

---

## [Check if javascript is on](https://www.ruby-forum.com/t/check-if-javascript-is-on/141245)

<div class="topic-metadata">

**Author:** [@taro](https://www.ruby-forum.com/u/taro)\
**Replies:** 1\
**Last updated:** [June 24, 2008, 10:24pm UTC](https://www.ruby-forum.com/t/check-if-javascript-is-on/141245 "2008-06-24T22:24:07Z")

</div>

I know this is a dumb question, but is there a way to figure out whether javascript is on a browser or not before I generate the page? This is most important with my edit controllers which has a hidden form to edit a …

---

## [Attachment\_fu resizing images already uploaded](https://www.ruby-forum.com/t/attachment-fu-resizing-images-already-uploaded/139254)

<div class="topic-metadata">

**Author:** [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Replies:** 2\
**Last updated:** [June 24, 2008, 10:15pm UTC](https://www.ruby-forum.com/t/attachment-fu-resizing-images-already-uploaded/139254 "2008-06-24T22:15:34Z")

</div>

hi, got a query. i’m using the attachment\_fu plugin to handle photo storage and that’s working fine, however now i’ve come to realise the initial size i set the thumbnails and full photos isn’t right, so i’ve changed …

---

## [Request.new\_session?](https://www.ruby-forum.com/t/request-new-session/141259)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [June 24, 2008, 10:13pm UTC](https://www.ruby-forum.com/t/request-new-session/141259 "2008-06-24T22:13:34Z")

</div>

Okay, someone smarter than me needs to add this to the Rails framework. It would be great if whenever a new session\_id is created, the request object gets a “new\_session?” attribute. This is kind-of like the ActiveR…

---

## [Show Latest Notes Question](https://www.ruby-forum.com/t/show-latest-notes-question/141331)

<div class="topic-metadata">

**Author:** [@Marra](https://www.ruby-forum.com/u/Marra)\
**Replies:** 3\
**Last updated:** [June 24, 2008, 10:06pm UTC](https://www.ruby-forum.com/t/show-latest-notes-question/141331 "2008-06-24T22:06:31Z")

</div>

I’m working on this application where the user can add new notes to a specific article. I want to display the last note on the add new notes page for that article. I have a problem that if you try to visit the add a n…

---

## [LoadError (Expected model.rb to define Model)](https://www.ruby-forum.com/t/loaderror-expected-model-rb-to-define-model/139744)

<div class="topic-metadata">

**Author:** [@jonathan\_stegall](https://www.ruby-forum.com/u/jonathan_stegall)\
**Replies:** 3\
**Last updated:** [June 24, 2008, 10:01pm UTC](https://www.ruby-forum.com/t/loaderror-expected-model-rb-to-define-model/139744 "2008-06-24T22:01:36Z")

</div>

Hello, I’m having an error that occurs in production (on Dreamhost) but does not occur in development on my local machine. The situation is that there is a model (Article), and it uses act\_as\_ferret for search. The e…

---

## [RSS feeds with authentication](https://www.ruby-forum.com/t/rss-feeds-with-authentication/141347)

<div class="topic-metadata">

**Author:** [@silkcom](https://www.ruby-forum.com/u/silkcom)\
**Replies:** 0\
**Last updated:** [June 24, 2008, 9:59pm UTC](https://www.ruby-forum.com/t/rss-feeds-with-authentication/141347 "2008-06-24T21:59:29Z")

</div>

I have a site that requires people to login to see their personal notes. Others can share notes with them, and comments on their notes. I’ve created an rss that gives you all the changes that you haven’t yet seen. M…

---

## [Is there an equivalent delete method for association.build?](https://www.ruby-forum.com/t/is-there-an-equivalent-delete-method-for-association-build/141346)

<div class="topic-metadata">

**Author:** [@kap](https://www.ruby-forum.com/u/kap)\
**Replies:** 0\
**Last updated:** [June 24, 2008, 9:58pm UTC](https://www.ruby-forum.com/t/is-there-an-equivalent-delete-method-for-association-build/141346 "2008-06-24T21:58:54Z")

</div>

Hi, I prefer to build the new state in an instance before committing (after validate passes). For example, I have groups and users, and use memberships to associate them: class Membership \< AR::Base belongs\_to :user …

---

## [Session Experassion](https://www.ruby-forum.com/t/session-experassion/141343)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 1\
**Last updated:** [June 24, 2008, 9:57pm UTC](https://www.ruby-forum.com/t/session-experassion/141343 "2008-06-24T21:57:03Z")

</div>

I have been trying to figure out a way to get a session to expire after an hour. I did a search and came up with the following code: session\[:user\] = { :expires =\> 1.hour.from\_now } My app runs when I put this code in…

---

## [How to send format for respond\_to using post?](https://www.ruby-forum.com/t/how-to-send-format-for-respond-to-using-post/141290)

<div class="topic-metadata">

**Author:** [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Replies:** 3\
**Last updated:** [June 24, 2008, 9:31pm UTC](https://www.ruby-forum.com/t/how-to-send-format-for-respond-to-using-post/141290 "2008-06-24T21:31:20Z")

</div>

Hi, I’m generating reports in various format (html, text, pdf etc) and currently I’m using formatted\_foo\_path(@foo, :format) to get a report in specific format. However, I’d like to provide users a choice of format t…

---

## [Scoped\_access plugin and 2.0](https://www.ruby-forum.com/t/scoped-access-plugin-and-2-0/141340)

<div class="topic-metadata">

**Author:** [@ChrisS](https://www.ruby-forum.com/u/ChrisS)\
**Replies:** 0\
**Last updated:** [June 24, 2008, 9:23pm UTC](https://www.ruby-forum.com/t/scoped-access-plugin-and-2-0/141340 "2008-06-24T21:23:06Z")

</div>

Hi It would seem that the scoped\_access plugin from http://wota.jp/svn/rails/plugins/branches/stable/scoped\_access is incompatible with Rails 2.0.2. /home/httpd/rails/demoone/vendor/plugins/scoped\_access/init.rb:18:i…

---

## [Securing URL with Rails](https://www.ruby-forum.com/t/securing-url-with-rails/141294)

<div class="topic-metadata">

**Author:** [@Joshua\_Jackson](https://www.ruby-forum.com/u/Joshua_Jackson)\
**Replies:** 4\
**Last updated:** [June 24, 2008, 9:20pm UTC](https://www.ruby-forum.com/t/securing-url-with-rails/141294 "2008-06-24T21:20:11Z")

</div>

Dear all, How do we secure URL with rails? So only authenticated and authorized users allowed to view certain URL. Is there any configuration that I must set for this? Many thanks

---

## [Capistrano on media temple](https://www.ruby-forum.com/t/capistrano-on-media-temple/122502)

<div class="topic-metadata">

**Author:** [@jimmypalmer](https://www.ruby-forum.com/u/jimmypalmer)\
**Replies:** 9\
**Last updated:** [June 24, 2008, 7:24pm UTC](https://www.ruby-forum.com/t/capistrano-on-media-temple/122502 "2008-06-24T19:24:44Z")

</div>

I’m a windows user. I have svn setup and am trying to deploy my app with capistrano for the first time on to media temple. I ran cap deploy and a message box from TortisePlink pops up asking for a password. I’m cle…

---

## [Cookie vs db session store behavior](https://www.ruby-forum.com/t/cookie-vs-db-session-store-behavior/141310)

<div class="topic-metadata">

**Author:** [@blackflash](https://www.ruby-forum.com/u/blackflash)\
**Replies:** 6\
**Last updated:** [June 24, 2008, 7:13pm UTC](https://www.ruby-forum.com/t/cookie-vs-db-session-store-behavior/141310 "2008-06-24T19:13:03Z")

</div>

I’m wondering if this is normal way how rails handles sessions… When I login (create a session on server), application sets cookie value in the HTTP header. Key: Set-Cookie Value: \_my\_session\_id=BAe7CDoOcmV0dXJuX3Rv…

---

## [Install community engine on aptana radrails](https://www.ruby-forum.com/t/install-community-engine-on-aptana-radrails/140658)

<div class="topic-metadata">

**Author:** [@ksha70](https://www.ruby-forum.com/u/ksha70)\
**Replies:** 2\
**Last updated:** [June 24, 2008, 7:11pm UTC](https://www.ruby-forum.com/t/install-community-engine-on-aptana-radrails/140658 "2008-06-24T19:11:52Z")

</div>

I’ve been having some real frustrating install issues on getting community engine running on radrails. see my forum post on: http://forums.aptana.com/viewtopic.php?p=21619#21619 where I was referred over to this comm…

---

## [RubyGem version error: activesupport(2.1.0 not = 2.0.2) (Gem::LoadError)](https://www.ruby-forum.com/t/rubygem-version-error-activesupport-2-1-0-not-2-0-2-gem-loaderror/141333)

<div class="topic-metadata">

**Author:** [@steve](https://www.ruby-forum.com/u/steve)\
**Replies:** 0\
**Last updated:** [June 24, 2008, 6:55pm UTC](https://www.ruby-forum.com/t/rubygem-version-error-activesupport-2-1-0-not-2-0-2-gem-loaderror/141333 "2008-06-24T18:55:27Z")

</div>

need to change the hardcoded gem version in the environment and remove old gem then load the new gem check in config\\environment.rb for RAILS\_GEM\_VERSION RAILS\_GEM\_VERSION = ‘2.1.0’ unless defined? RAILS\_GEM\_VERSION …

---

## [Creating a list view in rails 2](https://www.ruby-forum.com/t/creating-a-list-view-in-rails-2/141332)

<div class="topic-metadata">

**Author:** [@pavel989](https://www.ruby-forum.com/u/pavel989)\
**Replies:** 0\
**Last updated:** [June 24, 2008, 6:55pm UTC](https://www.ruby-forum.com/t/creating-a-list-view-in-rails-2/141332 "2008-06-24T18:55:21Z")

</div>

just started learning ruby and RoR a few days ago. There aren’t many tutorials on Version 2 so I went with a version 1 one. I’m going through the ONLamp one, found here: I got the scafolding and db stuff sorted out (…

---

## [Importing bulk files using Attachment\_fu](https://www.ruby-forum.com/t/importing-bulk-files-using-attachment-fu/141300)

<div class="topic-metadata">

**Author:** [@MW\_Administrator](https://www.ruby-forum.com/u/MW_Administrator)\
**Replies:** 1\
**Last updated:** [June 24, 2008, 6:54pm UTC](https://www.ruby-forum.com/t/importing-bulk-files-using-attachment-fu/141300 "2008-06-24T18:54:52Z")

</div>

Hi - Around the corner I have a project to migrate thousands of images per user accounts. The existing structure is each user has a folder named after their account - in it is all of their pics. On the new setup I a…

---

## [Multiple file inputs on the same form](https://www.ruby-forum.com/t/multiple-file-inputs-on-the-same-form/141286)

<div class="topic-metadata">

**Author:** [@jeff](https://www.ruby-forum.com/u/jeff)\
**Replies:** 2\
**Last updated:** [June 24, 2008, 6:54pm UTC](https://www.ruby-forum.com/t/multiple-file-inputs-on-the-same-form/141286 "2008-06-24T18:54:17Z")

</div>

Hey all, I’m still sorting out some of the basics here, and I still can’t quite find an explanation of how the file\_data variable (object?) behaves if I’m going to be putting multiple file upload tags on the same page…

---

## [Get model from polymorphic association](https://www.ruby-forum.com/t/get-model-from-polymorphic-association/141322)

<div class="topic-metadata">

**Author:** [@johnlester](https://www.ruby-forum.com/u/johnlester)\
**Replies:** 1\
**Last updated:** [June 24, 2008, 6:50pm UTC](https://www.ruby-forum.com/t/get-model-from-polymorphic-association/141322 "2008-06-24T18:50:46Z")

</div>

Hi, If using a polymorphic belongs\_to, is it possible to access the “\_type” field that contains the name of the model ? Thanks!

---

## [Table called delegates](https://www.ruby-forum.com/t/table-called-delegates/141314)

<div class="topic-metadata">

**Author:** [@ChrisS](https://www.ruby-forum.com/u/ChrisS)\
**Replies:** 1\
**Last updated:** [June 24, 2008, 6:48pm UTC](https://www.ruby-forum.com/t/table-called-delegates/141314 "2008-06-24T18:48:25Z")

</div>

Hi I am working on moving my RoR applications to a new server running 2.0.2 (currently on 1.2.3). My databases (for a conference booking system) have a table called delegates which appears to be causing a problem and…

---

## [NewB questions](https://www.ruby-forum.com/t/newb-questions/141244)

<div class="topic-metadata">

**Author:** [@pruckelshaus](https://www.ruby-forum.com/u/pruckelshaus)\
**Replies:** 2\
**Last updated:** [June 24, 2008, 6:43pm UTC](https://www.ruby-forum.com/t/newb-questions/141244 "2008-06-24T18:43:08Z")

</div>

Hi, A project came up that has made me realize that it’s time to learn RoR. I’ve got everything up and running (Ruby 1.8.6, Rails 2.1, MySQL 5, Webrick) and am using Aptana with RadRails for development. I’ve instal…

---

## [Generating an older version Rails app, how?](https://www.ruby-forum.com/t/generating-an-older-version-rails-app-how/141325)

<div class="topic-metadata">

**Author:** [@Christopher\_JSBott](https://www.ruby-forum.com/u/Christopher_JSBott)\
**Replies:** 1\
**Last updated:** [June 24, 2008, 6:39pm UTC](https://www.ruby-forum.com/t/generating-an-older-version-rails-app-how/141325 "2008-06-24T18:39:35Z")

</div>

Hello, I have rails-2.0.2 and rails-2.1.0 installed via gem. I want to generate a rails 2.0.2 app, how do I do that? I tried the following command and got the following error… $ ruby /Library/Ruby/Gems/1.8/gems/rai…

---

## [\[ANN\] Lockdown 0.5.10](https://www.ruby-forum.com/t/ann-lockdown-0-5-10/141323)

<div class="topic-metadata">

**Author:** [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Replies:** 0\
**Last updated:** [June 24, 2008, 6:20pm UTC](https://www.ruby-forum.com/t/ann-lockdown-0-5-10/141323 "2008-06-24T18:20:15Z")

</div>

What: Lockdown http://stonean.com/projects/show/lockdown is an authorization/authentication gem for RubyOnRails 2.x This version bundles Classy Inheritancehttp://stonean.com/projects/show/classy-inheritanceto simpli…

---

## [HABTM relationship between 2 of the same class](https://www.ruby-forum.com/t/habtm-relationship-between-2-of-the-same-class/141320)

<div class="topic-metadata">

**Author:** [@Iain\_A](https://www.ruby-forum.com/u/Iain_A)\
**Replies:** 1\
**Last updated:** [June 24, 2008, 6:17pm UTC](https://www.ruby-forum.com/t/habtm-relationship-between-2-of-the-same-class/141320 "2008-06-24T18:17:19Z")

</div>

Hello. I am trying to figure out the neatest way to do this. So far I have a class called Member. Now I am trying to organise the relationship “Alliance”. This relationship means that 2 Members can become allies and …

---

## [Grouping recs by user, then averaging](https://www.ruby-forum.com/t/grouping-recs-by-user-then-averaging/141257)

<div class="topic-metadata">

**Author:** [@bob](https://www.ruby-forum.com/u/bob)\
**Replies:** 2\
**Last updated:** [June 24, 2008, 4:26pm UTC](https://www.ruby-forum.com/t/grouping-recs-by-user-then-averaging/141257 "2008-06-24T16:26:57Z")

</div>

I’m wondering if there’s a way in RoR other than going to raw SQL to take a table of scores, group and sum them by each user, then average those values? So far, I’ve got: @gpointsallcum = Gamepoint.average(:pointvalu…

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

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