# Rails

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

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

---

## [Before\_filter for a specific controller/action](https://www.ruby-forum.com/t/before-filter-for-a-specific-controller-action/156055)

<div class="topic-metadata">

**Author:** [@dark-omen](https://www.ruby-forum.com/u/dark-omen)\
**Replies:** 2\
**Last updated:** [December 19, 2008, 10:52pm UTC](https://www.ruby-forum.com/t/before-filter-for-a-specific-controller-action/156055 "2008-12-19T22:52:53Z")

</div>

I’m learning about before\_filter, implementing a simple “you must be logged on” thing. It works great, but I need to allow people to create a player as well. By writing the except as attached, that works, but then eve…

---

## [Link\_to helper in an Array.each](https://www.ruby-forum.com/t/link-to-helper-in-an-array-each/155969)

<div class="topic-metadata">

**Author:** [@indigoi](https://www.ruby-forum.com/u/indigoi)\
**Replies:** 2\
**Last updated:** [December 19, 2008, 10:23pm UTC](https://www.ruby-forum.com/t/link-to-helper-in-an-array-each/155969 "2008-12-19T22:23:25Z")

</div>

Is it possible to render a link\_to element on a webpage using a .each from an array? Such as \<% Alphabet = \[‘A’,‘B’,‘C’,‘D’…,‘Z’\] %\> \<%= Alphabet.each{|letter| link\_to '#{letter}, :action =\> 'alphabet, :letter =\> let…

---

## [Recommended way of restricting action permissions?](https://www.ruby-forum.com/t/recommended-way-of-restricting-action-permissions/156058)

<div class="topic-metadata">

**Author:** [@Lisa\_Klein](https://www.ruby-forum.com/u/Lisa_Klein)\
**Replies:** 3\
**Last updated:** [December 19, 2008, 9:38pm UTC](https://www.ruby-forum.com/t/recommended-way-of-restricting-action-permissions/156058 "2008-12-19T21:38:30Z")

</div>

Hi, I just have a “best practices” question. I’d like to block users that don’t own a particular resource from performing edit/update/ destroy actions on it. Here’s how I currently do it: User has many resources, of…

---

## [Using postgresql in InstantRails](https://www.ruby-forum.com/t/using-postgresql-in-instantrails/120159)

<div class="topic-metadata">

**Author:** [@elmoe01](https://www.ruby-forum.com/u/elmoe01)\
**Replies:** 1\
**Last updated:** [December 19, 2008, 9:23pm UTC](https://www.ruby-forum.com/t/using-postgresql-in-instantrails/120159 "2008-12-19T21:23:14Z")

</div>

Is there a way to connect to my postgresql database in InstantRails? Any help is greatly appreciated. Thanks!

---

## [Sending a file, FTP protocol](https://www.ruby-forum.com/t/sending-a-file-ftp-protocol/156050)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 6\
**Last updated:** [December 19, 2008, 8:38pm UTC](https://www.ruby-forum.com/t/sending-a-file-ftp-protocol/156050 "2008-12-19T20:38:02Z")

</div>

Hello, I was using the method send\_file from an action on one of my controllers to send a file to the users. The thing is that now the file will be stored in an FTP and send\_file only works with the HTTP protocol. Wh…

---

## [About copyright position](https://www.ruby-forum.com/t/about-copyright-position/156005)

<div class="topic-metadata">

**Author:** [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Replies:** 3\
**Last updated:** [December 19, 2008, 7:23pm UTC](https://www.ruby-forum.com/t/about-copyright-position/156005 "2008-12-19T19:23:33Z")

</div>

css class ############## .about-copyright2{ border-top:#6a6a6a 1px solid; width:72%; text-align:center; font-size:x-small; position:absolute; bottom:-50px; left:11%; } ########### The view using this class #…

---

## [Alternative solution to session and global variables](https://www.ruby-forum.com/t/alternative-solution-to-session-and-global-variables/155767)

<div class="topic-metadata">

**Author:** [@The\_N](https://www.ruby-forum.com/u/The_N)\
**Replies:** 8\
**Last updated:** [December 19, 2008, 7:12pm UTC](https://www.ruby-forum.com/t/alternative-solution-to-session-and-global-variables/155767 "2008-12-19T19:12:24Z")

</div>

Hello, guys. I’m using session variables (session\[:example\]) in my app to do all the user session tasks. Additionally I’m also using them to save the data from a 3-page sata submission, so when when you click “Submit”…

---

## [Is rails for me?](https://www.ruby-forum.com/t/is-rails-for-me/155991)

<div class="topic-metadata">

**Author:** [@walterbyrd](https://www.ruby-forum.com/u/walterbyrd)\
**Replies:** 3\
**Last updated:** [December 19, 2008, 6:49pm UTC](https://www.ruby-forum.com/t/is-rails-for-me/155991 "2008-12-19T18:49:37Z")

</div>

I am a casual user of php, perl, and python. I am trying to learn more about those languages. I would like to build some data driven web-apps. I don’t much care for perl or php. I consider perl and php to be difficult…

---

## [Render partial](https://www.ruby-forum.com/t/render-partial/155494)

<div class="topic-metadata">

**Author:** [@petan](https://www.ruby-forum.com/u/petan)\
**Replies:** 2\
**Last updated:** [December 19, 2008, 6:43pm UTC](https://www.ruby-forum.com/t/render-partial/155494 "2008-12-19T18:43:39Z")

</div>

Hi, I am trying to use paperclip plugin to add images to the posts. \<%= render :partial =\> ‘recent\_posts’, :collection =\> @posts %\> @posts = Post.find(:all, …, :limit =\> 5) #\_recent\_posts.rhtml \<%= image\_tag recent\_…

---

## [Anyone know a good way to do a caption popup on mouseover?](https://www.ruby-forum.com/t/anyone-know-a-good-way-to-do-a-caption-popup-on-mouseover/155916)

<div class="topic-metadata">

**Author:** [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Replies:** 6\
**Last updated:** [December 19, 2008, 6:15pm UTC](https://www.ruby-forum.com/t/anyone-know-a-good-way-to-do-a-caption-popup-on-mouseover/155916 "2008-12-19T18:15:26Z")

</div>

I have been using overlib (javascript library) to create popups on mouseover but it has issues with some browsers. I just need something simple and was wondering if any had any suggestions.

---

## [Legacy database: help needed](https://www.ruby-forum.com/t/legacy-database-help-needed/156042)

<div class="topic-metadata">

**Author:** [@mslagell](https://www.ruby-forum.com/u/mslagell)\
**Replies:** 0\
**Last updated:** [December 19, 2008, 6:08pm UTC](https://www.ruby-forum.com/t/legacy-database-help-needed/156042 "2008-12-19T18:08:24Z")

</div>

I am “new” to Ruby and Rails and jumping right in. That’s for me the best way to learn quickly. I am trying to do a simple project on a legacy database. I performed the following steps: Created a new project, then wit…

---

## [MySpace.com clone - is it possible with Ruby on Rails?](https://www.ruby-forum.com/t/myspace-com-clone-is-it-possible-with-ruby-on-rails/156040)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [December 19, 2008, 6:06pm UTC](https://www.ruby-forum.com/t/myspace-com-clone-is-it-possible-with-ruby-on-rails/156040 "2008-12-19T18:06:38Z")

</div>

Hi, I wanna know wich of the well known frameworks is the best choice for myspace-clone community website. CakePHP ? Zend Framework? Symfony? Ruby on Rails :slight\_smile: ? Django? or maybe Kohana? Prado? or someth…

---

## [I'm trying to prepend a parameter to all of my routes](https://www.ruby-forum.com/t/im-trying-to-prepend-a-parameter-to-all-of-my-routes/156032)

<div class="topic-metadata">

**Author:** [@Jon\_Hinson](https://www.ruby-forum.com/u/Jon_Hinson)\
**Replies:** 1\
**Last updated:** [December 19, 2008, 6:04pm UTC](https://www.ruby-forum.com/t/im-trying-to-prepend-a-parameter-to-all-of-my-routes/156032 "2008-12-19T18:04:17Z")

</div>

I’m developing a facebook app and all of my routes go something like this :org\_id/:controller/:action/:id , where all of my urls will be prepended by this org\_id. Is there a way to have all routes recognize this org\_i…

---

## [Going back doesn't always go, well, back](https://www.ruby-forum.com/t/going-back-doesnt-always-go-well-back/156013)

<div class="topic-metadata">

**Author:** [@kenwei](https://www.ruby-forum.com/u/kenwei)\
**Replies:** 1\
**Last updated:** [December 19, 2008, 5:21pm UTC](https://www.ruby-forum.com/t/going-back-doesnt-always-go-well-back/156013 "2008-12-19T17:21:26Z")

</div>

Addendum to my prior entry. Rails scaffold creates the index, show, edit, update, destroy, create views. But Rails does not provide a correct “back” method to get to the right spot in the index listing. Example: Inde…

---

## [Elementary Question on Variables](https://www.ruby-forum.com/t/elementary-question-on-variables/156011)

<div class="topic-metadata">

**Author:** [@jordantheous](https://www.ruby-forum.com/u/jordantheous)\
**Replies:** 2\
**Last updated:** [December 19, 2008, 4:40pm UTC](https://www.ruby-forum.com/t/elementary-question-on-variables/156011 "2008-12-19T16:40:17Z")

</div>

hey all, this is a great community and I’m glad I found it…also, this is my first post. In the code example below taken from Chris P. Learn to Program RoR book, I’m curious why there is (what looks like to me) a hang…

---

## [Active resource and binary data for sqlite3](https://www.ruby-forum.com/t/active-resource-and-binary-data-for-sqlite3/156033)

<div class="topic-metadata">

**Author:** [@Laurence](https://www.ruby-forum.com/u/Laurence)\
**Replies:** 0\
**Last updated:** [December 19, 2008, 4:37pm UTC](https://www.ruby-forum.com/t/active-resource-and-binary-data-for-sqlite3/156033 "2008-12-19T16:37:56Z")

</div>

I posted some data to a webserver using ActiveResource, it seemed I needed to encode the binary data to Base64 for it to work. When I tried to read the data back and decode it from Base64 it seemed like I had to decod…

---

## [Textarea clear in RJS stopped working with 2.1.1](https://www.ruby-forum.com/t/textarea-clear-in-rjs-stopped-working-with-2-1-1/156026)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 0\
**Last updated:** [December 19, 2008, 1:17pm UTC](https://www.ruby-forum.com/t/textarea-clear-in-rjs-stopped-working-with-2-1-1/156026 "2008-12-19T13:17:59Z")

</div>

Hi - I have an RJS that says page\[“textarea\_id”\].clear that works fine with rails 2.0.2 but is broken with 2.1.1 - I get an error message: ActionView::TemplateError (undefined method \`\[\]’ for #Enumerable::Enumerator…

---

## [Breaking rails' module naming convention](https://www.ruby-forum.com/t/breaking-rails-module-naming-convention/156023)

<div class="topic-metadata">

**Author:** [@liseki](https://www.ruby-forum.com/u/liseki)\
**Replies:** 2\
**Last updated:** [December 19, 2008, 1:02pm UTC](https://www.ruby-forum.com/t/breaking-rails-module-naming-convention/156023 "2008-12-19T13:02:02Z")

</div>

Hey people, The module ActiveRecord::ConnectionAdapters::PostgreSQLAdapter lives in the file ‘…/connection\_adapters/postgresql\_adapter.rb’. As such it breaks the module naming convention. I would like to do something …

---

## [The usage of datetime\_select](https://www.ruby-forum.com/t/the-usage-of-datetime-select/156025)

<div class="topic-metadata">

**Author:** [@on9west](https://www.ruby-forum.com/u/on9west)\
**Replies:** 2\
**Last updated:** [December 19, 2008, 12:42pm UTC](https://www.ruby-forum.com/t/the-usage-of-datetime-select/156025 "2008-12-19T12:42:46Z")

</div>

Dear all I am a rails beginner, I would like to know how can I manipulate the params in controller, when the datetime\_select is used in form. Please give me some advices. Thank you very much. view/test/index.html.erb …

---

## [Map.root](https://www.ruby-forum.com/t/map-root/156020)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 1\
**Last updated:** [December 19, 2008, 11:55am UTC](https://www.ruby-forum.com/t/map-root/156020 "2008-12-19T11:55:17Z")

</div>

Hi Is there any difference saying map.root :controller =\> ‘home’ and map.root :controller =\> ‘home’,:action=\>‘index’ Thanks in advance Sijo

---

## [Remember that checkbox has been checked!](https://www.ruby-forum.com/t/remember-that-checkbox-has-been-checked/155997)

<div class="topic-metadata">

**Author:** [@ukarick](https://www.ruby-forum.com/u/ukarick)\
**Replies:** 2\
**Last updated:** [December 19, 2008, 11:39am UTC](https://www.ruby-forum.com/t/remember-that-checkbox-has-been-checked/155997 "2008-12-19T11:39:25Z")

</div>

Gdday everyone today I come up with this question. 1.I’ve a check box on my page. 2.I checked on this box. 3.I need to click on (link\_to) to redirect on this page again. 4.I found that my check box’s uncheck. How ca…

---

## [Conditions and joins and paginate, oh my!](https://www.ruby-forum.com/t/conditions-and-joins-and-paginate-oh-my/155996)

<div class="topic-metadata">

**Author:** [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Replies:** 4\
**Last updated:** [December 19, 2008, 11:35am UTC](https://www.ruby-forum.com/t/conditions-and-joins-and-paginate-oh-my/155996 "2008-12-19T11:35:18Z")

</div>

I’m starting off with something that already works, and trying to add another condition to it. I just can’t seem to find an example of the proper syntax to make this happen. In this case, I have users, and users have…

---

## [Form\_tag - howto call with self.send?](https://www.ruby-forum.com/t/form-tag-howto-call-with-self-send/155933)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [December 19, 2008, 11:20am UTC](https://www.ruby-forum.com/t/form-tag-howto-call-with-self-send/155933 "2008-12-19T11:20:40Z")

</div>

I have the following code in a form helper Module: def form\_tag\_helper(options = {}) url = url\_for(:action =\> “#{@controller.action\_name}”) “#{self.send(:form\_tag, url, options)}” end which I call from several views…

---

## [Rails2.2.2, is it a bug?](https://www.ruby-forum.com/t/rails2-2-2-is-it-a-bug/155752)

<div class="topic-metadata">

**Author:** [@SSSB9SfFSSB](https://www.ruby-forum.com/u/SSSB9SfFSSB)\
**Replies:** 8\
**Last updated:** [December 19, 2008, 10:20am UTC](https://www.ruby-forum.com/t/rails2-2-2-is-it-a-bug/155752 "2008-12-19T10:20:19Z")

</div>

yesterday, i make a demo with Rails2.2.2. model : Movie class Movie \< ActiveRecord::Base has\_many :releases, :dependent =\> :destroy validates\_presence\_of :title end model: Release class Release \< ActiveRecord::B…

---

## [Session In the model](https://www.ruby-forum.com/t/session-in-the-model/155548)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 3\
**Last updated:** [December 19, 2008, 10:11am UTC](https://www.ruby-forum.com/t/session-in-the-model/155548 "2008-12-19T10:11:50Z")

</div>

Hi i have the model SDTicket which has a field modified\_by\_id and it has to take data from session\[:id\] Now this SDTicket model has many associated models like Activity one of them So when ever an activity happens t…

---

## [Uninitialized constant error](https://www.ruby-forum.com/t/uninitialized-constant-error/155919)

<div class="topic-metadata">

**Author:** [@wudntme](https://www.ruby-forum.com/u/wudntme)\
**Replies:** 1\
**Last updated:** [December 19, 2008, 9:27am UTC](https://www.ruby-forum.com/t/uninitialized-constant-error/155919 "2008-12-19T09:27:49Z")

</div>

Hi, all. Hoping someone can help me with an error I can’t figure out. FILE: quote.rb module BUYER class Quote … end end FILE: quotes\_controller.rb require ‘quote’ … class QuotesController … def this\_method q =…

---

## [About rubricks code](https://www.ruby-forum.com/t/about-rubricks-code/156018)

<div class="topic-metadata">

**Author:** [@xuning\_cn](https://www.ruby-forum.com/u/xuning_cn)\
**Replies:** 0\
**Last updated:** [December 19, 2008, 9:23am UTC](https://www.ruby-forum.com/t/about-rubricks-code/156018 "2008-12-19T09:23:50Z")

</div>

I’m very like rubricks style it’s so cool! who can give me a instruct of this project about it’s code. and I want know how to develop rails components. rubricks :How Much Does It Cost to Develop an App? | AppMaster

---

## [Unicode problem with mb\_chars.index](https://www.ruby-forum.com/t/unicode-problem-with-mb-chars-index/155671)

<div class="topic-metadata">

**Author:** [@peter](https://www.ruby-forum.com/u/peter)\
**Replies:** 1\
**Last updated:** [December 19, 2008, 9:17am UTC](https://www.ruby-forum.com/t/unicode-problem-with-mb-chars-index/155671 "2008-12-19T09:17:00Z")

</div>

Hello, I tried the following str =“ÄÄa\_\_” assert str.mb\_chars.is\_utf8? assert str.is\_utf8? this is logical assert\_equal 4, str.index(“a”, 4) this is not logical. shouldn’t this be nil !? assert\_equal 2, str.mb\_char…

---

## [First page](https://www.ruby-forum.com/t/first-page/155931)

<div class="topic-metadata">

**Author:** [@rohith](https://www.ruby-forum.com/u/rohith)\
**Replies:** 3\
**Last updated:** [December 19, 2008, 8:17am UTC](https://www.ruby-forum.com/t/first-page/155931 "2008-12-19T08:17:15Z")

</div>

Hello all… I am new to ruby development… I have completed the connection to Mysql and installation and i got the welcome page. Next i want to make a page with some user details and i need to save the data in to tabl…

---

## [How to update the table data with the dropdown box fields?](https://www.ruby-forum.com/t/how-to-update-the-table-data-with-the-dropdown-box-fields/156009)

<div class="topic-metadata">

**Author:** [@srikanth](https://www.ruby-forum.com/u/srikanth)\
**Replies:** 0\
**Last updated:** [December 19, 2008, 6:51am UTC](https://www.ruby-forum.com/t/how-to-update-the-table-data-with-the-dropdown-box-fields/156009 "2008-12-19T06:51:14Z")

</div>

Hi i have a table called “streams” with columns “name” and “interlace”. Using below code : Yes No using above code am creating dropdown box with fields “yes” and “no”. Here what i want to …

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

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