# Rails

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

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

---

## [Restful\_authentication plugin + session timeout + single login session?](https://www.ruby-forum.com/t/restful-authentication-plugin-session-timeout-single-login-session/124577)

<div class="topic-metadata">

**Author:** [@Kei\_Simone](https://www.ruby-forum.com/u/Kei_Simone)\
**Replies:** 1\
**Last updated:** [December 30, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/restful-authentication-plugin-session-timeout-single-login-session/124577 "2007-12-30T16:31:39Z")

</div>

Hi, I am using restful authentication plugin I was wondering if there is a way to do a session timeout using the restful\_authentication. How do I hack it to get the behaviour I need? On top of that, I may need to …

---

## [Organize application constants in header files](https://www.ruby-forum.com/t/organize-application-constants-in-header-files/124568)

<div class="topic-metadata">

**Author:** [@gsampathkumar](https://www.ruby-forum.com/u/gsampathkumar)\
**Replies:** 1\
**Last updated:** [December 30, 2007, 3:34pm UTC](https://www.ruby-forum.com/t/organize-application-constants-in-header-files/124568 "2007-12-30T15:34:47Z")

</div>

Hi, Is there a way in RoR to add common string and integer constants to a central location (like a C++ header file) that can then be included in your application code as needed. Looked around for a bit but didn’t re…

---

## [Why are some methods of library accessible, while others are not? (by the example of restful\_authen](https://www.ruby-forum.com/t/why-are-some-methods-of-library-accessible-while-others-are-not-by-the-example-of-restful-authen/124578)

<div class="topic-metadata">

**Author:** [@truetype](https://www.ruby-forum.com/u/truetype)\
**Replies:** 2\
**Last updated:** [December 30, 2007, 3:26pm UTC](https://www.ruby-forum.com/t/why-are-some-methods-of-library-accessible-while-others-are-not-by-the-example-of-restful-authen/124578 "2007-12-30T15:26:01Z")

</div>

If you have a model ‘user’ generated through restful\_authentication generator, then you should have an accessor def current\_user @current\_user ||= … end inside the file authenticated\_system.rb in lib folder. If you …

---

## [Reusing trhe same form as partial for add and update](https://www.ruby-forum.com/t/reusing-trhe-same-form-as-partial-for-add-and-update/124576)

<div class="topic-metadata">

**Author:** [@adam](https://www.ruby-forum.com/u/adam)\
**Replies:** 1\
**Last updated:** [December 30, 2007, 2:05pm UTC](https://www.ruby-forum.com/t/reusing-trhe-same-form-as-partial-for-add-and-update/124576 "2007-12-30T14:05:06Z")

</div>

HI! I have a form which I want to reuse for adding and updating a user. The thing is I have 3 models in it user, address, phone in the manage view I have \<% if params\[:id\].blank? -%\> \<%form\_for :user, :url=\>{:actio…

---

## [Extra quote in cached html filename](https://www.ruby-forum.com/t/extra-quote-in-cached-html-filename/196556)

<div class="topic-metadata">

**Author:** [@noham](https://www.ruby-forum.com/u/noham)\
**Replies:** 0\
**Last updated:** [December 30, 2007, 1:33pm UTC](https://www.ruby-forum.com/t/extra-quote-in-cached-html-filename/196556 "2007-12-30T13:33:38Z")

</div>

Hi all, m having a problem when caching pages with parameters, although static pages went fine and I had an x.html in the folder /public/controllername/x.html. Now if this X accepts any parameters, let’s say 1, i was…

---

## [Kludge for drop-down list](https://www.ruby-forum.com/t/kludge-for-drop-down-list/124197)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 13\
**Last updated:** [December 30, 2007, 1:01pm UTC](https://www.ruby-forum.com/t/kludge-for-drop-down-list/124197 "2007-12-30T13:01:16Z")

</div>

The following is a kludge to generate a drop down list of the rows for the “categories” table (from the “Category” model). thufir@arrakis ~/Desktop/strawr $ thufir@arrakis ~/Desktop/strawr $ tail app/views/feeds/show.…

---

## [Quoting Table Names ActiveRecord adapter](https://www.ruby-forum.com/t/quoting-table-names-activerecord-adapter/124570)

<div class="topic-metadata">

**Author:** [@sushant](https://www.ruby-forum.com/u/sushant)\
**Replies:** 1\
**Last updated:** [December 30, 2007, 11:58am UTC](https://www.ruby-forum.com/t/quoting-table-names-activerecord-adapter/124570 "2007-12-30T11:58:42Z")

</div>

Hi all I am using mySQL server 5.0 Using Rails, when I am generating scaffolds, the query that it hits to view fields is like: show fields from ‘table’ The problem is it single-quotes the table name When I run the …

---

## [Simple text\_area problem](https://www.ruby-forum.com/t/simple-text-area-problem/124561)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 1\
**Last updated:** [December 30, 2007, 11:23am UTC](https://www.ruby-forum.com/t/simple-text-area-problem/124561 "2007-12-30T11:23:39Z")

</div>

Hello, I have a table called templates and have three columns in it id of type int template\_name of type varchar template\_text of type text I am getting the following error undefined method \`template\_tex…

---

## [Search with multiple tables](https://www.ruby-forum.com/t/search-with-multiple-tables/124565)

<div class="topic-metadata">

**Author:** [@katsuo](https://www.ruby-forum.com/u/katsuo)\
**Replies:** 0\
**Last updated:** [December 30, 2007, 9:56am UTC](https://www.ruby-forum.com/t/search-with-multiple-tables/124565 "2007-12-30T09:56:44Z")

</div>

Hi, can anyone help me with the following action so that I can search from not only one but two tables and fields. I would like to search from name field in author table as well as name field in title table. def sear…

---

## [Specify older Rails when 2.x is installed...?](https://www.ruby-forum.com/t/specify-older-rails-when-2-x-is-installed/124559)

<div class="topic-metadata">

**Author:** [@davido](https://www.ruby-forum.com/u/davido)\
**Replies:** 2\
**Last updated:** [December 30, 2007, 9:11am UTC](https://www.ruby-forum.com/t/specify-older-rails-when-2-x-is-installed/124559 "2007-12-30T09:11:20Z")

</div>

I have multiple Rails gems installed on my system… gem list | grep rails rails (2.0.2, 2.0.1, 1.2.6, 1.2.5) Now, I want to make a new application based on Rails 1.2.6. I’m guessing that what I should have to do is s…

---

## [BackgroundRB - Confused](https://www.ruby-forum.com/t/backgroundrb-confused/124516)

<div class="topic-metadata">

**Author:** [@jnicholson](https://www.ruby-forum.com/u/jnicholson)\
**Replies:** 1\
**Last updated:** [December 30, 2007, 8:49am UTC](https://www.ruby-forum.com/t/backgroundrb-confused/124516 "2007-12-30T08:49:20Z")

</div>

Hi guys, I’ve been following this article but it seems that the version of backgroundrb being used is out of date. So I’ve updated to the newer version. Can anyone tell me what is wrong with the following: === clas…

---

## [Problems with calendar\_date\_select](https://www.ruby-forum.com/t/problems-with-calendar-date-select/124539)

<div class="topic-metadata">

**Author:** [@jawosis](https://www.ruby-forum.com/u/jawosis)\
**Replies:** 2\
**Last updated:** [December 30, 2007, 8:09am UTC](https://www.ruby-forum.com/t/problems-with-calendar-date-select/124539 "2007-12-30T08:09:37Z")

</div>

\<% form\_for @booking do |f| %\> … \<%= calendar\_date\_select\_tag “datecome”, “#{Date.today}”, :popup =\> “force”,:year\_range =\> \[0.years.ago, 1.years.from\_now\] %\> I just updated to Revision 333 (calendar\_date\_select) and…

---

## [Text\_field\_with\_auto\_complete undefined method error](https://www.ruby-forum.com/t/text-field-with-auto-complete-undefined-method-error/124552)

<div class="topic-metadata">

**Author:** [@Chubbs](https://www.ruby-forum.com/u/Chubbs)\
**Replies:** 2\
**Last updated:** [December 30, 2007, 7:02am UTC](https://www.ruby-forum.com/t/text-field-with-auto-complete-undefined-method-error/124552 "2007-12-30T07:02:26Z")

</div>

Can anyone help me out why im getting this error: “undefined method \`text\_field\_with\_auto\_complete’ for #ActionView::Base:0x2472460” I been trying to follow a tutorial here =\> http://ricardo.pacheco.name/blog/article…

---

## [Attachment fu corrupting .doc on windows?](https://www.ruby-forum.com/t/attachment-fu-corrupting-doc-on-windows/124554)

<div class="topic-metadata">

**Author:** [@retcheto](https://www.ruby-forum.com/u/retcheto)\
**Replies:** 0\
**Last updated:** [December 30, 2007, 6:26am UTC](https://www.ruby-forum.com/t/attachment-fu-corrupting-doc-on-windows/124554 "2007-12-30T06:26:35Z")

</div>

I implemented a file upload/download using attachment\_fu, storing files in the DB. I’m running Vista, I can get files in and out, but it looks like I’m somehow ruining the formatting of Word .doc files. If I upload a …

---

## [A weird question](https://www.ruby-forum.com/t/a-weird-question/124543)

<div class="topic-metadata">

**Author:** [@kxl](https://www.ruby-forum.com/u/kxl)\
**Replies:** 1\
**Last updated:** [December 30, 2007, 3:00am UTC](https://www.ruby-forum.com/t/a-weird-question/124543 "2007-12-30T03:00:18Z")

</div>

Just wanted to ask something about images…because I was trying out on doing a live search…it works but the indicator picture has some pictures showing up~ for example when i go to the index page and use the live searc…

---

## [Needs to have method \`\_load'](https://www.ruby-forum.com/t/needs-to-have-method-load/124525)

<div class="topic-metadata">

**Author:** [@dnstevenson](https://www.ruby-forum.com/u/dnstevenson)\
**Replies:** 2\
**Last updated:** [December 30, 2007, 2:23am UTC](https://www.ruby-forum.com/t/needs-to-have-method-load/124525 "2007-12-30T02:23:44Z")

</div>

I’m getting an exception that I’m fairless clueless about. It occurs when I run a “create” action but neither my action or before filters are hit before this exception. I’m hoping someone can give me a clue. I suspect…

---

## [Valentina Database Now Supports Ruby on Rails on Mac OS X](https://www.ruby-forum.com/t/valentina-database-now-supports-ruby-on-rails-on-mac-os-x/123211)

<div class="topic-metadata">

**Author:** [@Lynn](https://www.ruby-forum.com/u/Lynn)\
**Replies:** 6\
**Last updated:** [December 30, 2007, 2:21am UTC](https://www.ruby-forum.com/t/valentina-database-now-supports-ruby-on-rails-on-mac-os-x/123211 "2007-12-30T02:21:58Z")

</div>

Valentina 3.5.1 technology release now includes support for building RoR applications on Mac OS X. They have previously released support on the Windows platform. There is also a component for building local Ruby app…

---

## [DRY up help using #method](https://www.ruby-forum.com/t/dry-up-help-using-method/124537)

<div class="topic-metadata">

**Author:** [@donkeytastic](https://www.ruby-forum.com/u/donkeytastic)\
**Replies:** 2\
**Last updated:** [December 30, 2007, 1:02am UTC](https://www.ruby-forum.com/t/dry-up-help-using-method/124537 "2007-12-30T01:02:41Z")

</div>

I am a newbie trying to DRY up my first application. Going well accept this annoying item (simplified down to problematic code) … Original code: business\_attributes = params\[…\] # values from a form in a view business…

---

## [Empty classes not found](https://www.ruby-forum.com/t/empty-classes-not-found/124484)

<div class="topic-metadata">

**Author:** [@pedz](https://www.ruby-forum.com/u/pedz)\
**Replies:** 2\
**Last updated:** [December 30, 2007, 12:27am UTC](https://www.ruby-forum.com/t/empty-classes-not-found/124484 "2007-12-30T00:27:11Z")

</div>

I have a module called Retain. That module has pieces in app/controller/retain, app/model/retain, and lib/retain. If I have to, I can rename them but, for now, that is what I have. In lib/retain I have a file called…

---

## [Will\_paginate wont\_paginate for me!](https://www.ruby-forum.com/t/will-paginate-wont-paginate-for-me/124021)

<div class="topic-metadata">

**Author:** [@agorilla](https://www.ruby-forum.com/u/agorilla)\
**Replies:** 8\
**Last updated:** [December 29, 2007, 11:41pm UTC](https://www.ruby-forum.com/t/will-paginate-wont-paginate-for-me/124021 "2007-12-29T23:41:16Z")

</div>

Sorry for the cheesy topic name couldn’t resist. B4 I go into details I’m rocking Rails 1.2.6. I’m hosting on MediaTemple and they seem to working on some issue between their grid servers and 2.0. I’m struggling with…

---

## [Q: How can I create a Friends Badge using the rfacebook gem?](https://www.ruby-forum.com/t/q-how-can-i-create-a-friends-badge-using-the-rfacebook-gem/124532)

<div class="topic-metadata">

**Author:** [@gerald\_b](https://www.ruby-forum.com/u/gerald_b)\
**Replies:** 0\
**Last updated:** [December 29, 2007, 10:46pm UTC](https://www.ruby-forum.com/t/q-how-can-i-create-a-friends-badge-using-the-rfacebook-gem/124532 "2007-12-29T22:46:06Z")

</div>

Hello, I’ve published a new rfacebook titled “How can I create a Friends Badge using the Facebook API?” that show you how you can create a friends badge in two easy steps. First, get your friends’ ids (calling the fr…

---

## [Docs / Help for upgrading to Rails 2.0 / Engines 2.0](https://www.ruby-forum.com/t/docs-help-for-upgrading-to-rails-2-0-engines-2-0/124529)

<div class="topic-metadata">

**Author:** [@nshb](https://www.ruby-forum.com/u/nshb)\
**Replies:** 0\
**Last updated:** [December 29, 2007, 9:34pm UTC](https://www.ruby-forum.com/t/docs-help-for-upgrading-to-rails-2-0-engines-2-0/124529 "2007-12-29T21:34:02Z")

</div>

Just posted my gotchas for upgrading a couple projects to Rails 2.0… http://nshb.net/engines-2-0-and-rails-2-0-upgrade-gotchas

---

## [Trouble with routes in Rails 2.0](https://www.ruby-forum.com/t/trouble-with-routes-in-rails-2-0/124526)

<div class="topic-metadata">

**Author:** [@KIR](https://www.ruby-forum.com/u/KIR)\
**Replies:** 1\
**Last updated:** [December 29, 2007, 9:06pm UTC](https://www.ruby-forum.com/t/trouble-with-routes-in-rails-2-0/124526 "2007-12-29T21:06:33Z")

</div>

Hi, I has a nested restful route in routes.rb, which works nicely with 1.2.6: map.resources :checklists, :member =\> { :invite =\> :post, :accept =\> :any, } do |checklists| checklists.resources :tasks, :member =\> { …

---

## [Merging params into another hash](https://www.ruby-forum.com/t/merging-params-into-another-hash/124453)

<div class="topic-metadata">

**Author:** [@pkoebbe](https://www.ruby-forum.com/u/pkoebbe)\
**Replies:** 5\
**Last updated:** [December 29, 2007, 8:40pm UTC](https://www.ruby-forum.com/t/merging-params-into-another-hash/124453 "2007-12-29T20:40:06Z")

</div>

I have a search form that submits three parameters via an xhr request. The three parameters are full\_name, email, and postal\_code. In the controller action, I want to stuff those values into the session so they can b…

---

## [Whitespace added while editing record](https://www.ruby-forum.com/t/whitespace-added-while-editing-record/124522)

<div class="topic-metadata">

**Author:** [@giuseb](https://www.ruby-forum.com/u/giuseb)\
**Replies:** 2\
**Last updated:** [December 29, 2007, 8:25pm UTC](https://www.ruby-forum.com/t/whitespace-added-while-editing-record/124522 "2007-12-29T20:25:43Z")

</div>

Hello there and happy holidays. I’m not sure if the surprise for what I’m seeing in my forms is justified, but I am very surprised, so here’s the thing. I have a simple model with a single text field named ‘content’…

---

## [Best practices with templating](https://www.ruby-forum.com/t/best-practices-with-templating/124445)

<div class="topic-metadata">

**Author:** [@pnomolos](https://www.ruby-forum.com/u/pnomolos)\
**Replies:** 12\
**Last updated:** [December 29, 2007, 6:29pm UTC](https://www.ruby-forum.com/t/best-practices-with-templating/124445 "2007-12-29T18:29:51Z")

</div>

I’ve come up with two ways of breaking the rendering of my actions out into a form of templates, and am wondering which (if either) is considered “standard practice” by the rails community. Right now the layout is fa…

---

## [Sending methods after classifying](https://www.ruby-forum.com/t/sending-methods-after-classifying/124511)

<div class="topic-metadata">

**Author:** [@Love\_AJAX](https://www.ruby-forum.com/u/Love_AJAX)\
**Replies:** 2\
**Last updated:** [December 29, 2007, 3:18pm UTC](https://www.ruby-forum.com/t/sending-methods-after-classifying/124511 "2007-12-29T15:18:54Z")

</div>

The following code gives me an error: class\_vars = \[‘fruit’,‘cow’,‘coffee’\].each do |class\_var| “#{class\_var}”.classify.send(:find, 1 + rand(10)) end The error message stack: LocalJumpError: no block given from (ir…

---

## [Belongs\_to has\_many listing](https://www.ruby-forum.com/t/belongs-to-has-many-listing/124438)

<div class="topic-metadata">

**Author:** [@hiddenhippo](https://www.ruby-forum.com/u/hiddenhippo)\
**Replies:** 4\
**Last updated:** [December 29, 2007, 3:15pm UTC](https://www.ruby-forum.com/t/belongs-to-has-many-listing/124438 "2007-12-29T15:15:23Z")

</div>

Wasn’t sure what to call the subject, but here’s my issue. I’ve got two models, and for arguments sake they’re called model1 and model2. model1 has many models2 and therefore I use the following within the ‘model’ fi…

---

## [Rails mytest error](https://www.ruby-forum.com/t/rails-mytest-error/124499)

<div class="topic-metadata">

**Author:** [@liyu](https://www.ruby-forum.com/u/liyu)\
**Replies:** 1\
**Last updated:** [December 29, 2007, 2:48pm UTC](https://www.ruby-forum.com/t/rails-mytest-error/124499 "2007-12-29T14:48:26Z")

</div>

\#rails mytest can’t convert Enumerable::Enumerator into Array

---

## [Url\_for\_file\_column not works](https://www.ruby-forum.com/t/url-for-file-column-not-works/124478)

<div class="topic-metadata">

**Author:** [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Replies:** 1\
**Last updated:** [December 29, 2007, 11:25am UTC](https://www.ruby-forum.com/t/url-for-file-column-not-works/124478 "2007-12-29T11:25:41Z")

</div>

I am using the file column plugin. If i upload an image it works correctly but if i want to show an image it not works. in my template i insert url\_for\_file\_column(@core, “image”, “thumb”) but return “” i tried to …

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

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