# Rails

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

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

---

## [Secure session cookie](https://www.ruby-forum.com/t/secure-session-cookie/117772)

<div class="topic-metadata">

**Author:** [@nappin](https://www.ruby-forum.com/u/nappin)\
**Replies:** 1\
**Last updated:** [December 3, 2007, 6:11pm UTC](https://www.ruby-forum.com/t/secure-session-cookie/117772 "2007-12-03T18:11:22Z")

</div>

Is there a way to mark the cookie that Rails uses to store the session-id as a secure cookie? Thanks, Ray

---

## [Resource routes for acts\_as\_tree - help](https://www.ruby-forum.com/t/resource-routes-for-acts-as-tree-help/121988)

<div class="topic-metadata">

**Author:** [@goodieboy](https://www.ruby-forum.com/u/goodieboy)\
**Replies:** 1\
**Last updated:** [December 3, 2007, 6:09pm UTC](https://www.ruby-forum.com/t/resource-routes-for-acts-as-tree-help/121988 "2007-12-03T18:09:00Z")

</div>

Hi, I’d like to be able to define the children of a node as a resource like so: /content\_nodes/1/children /content\_nodes/1/children.js /content\_nodes/1/children.xml etc., but can’t figure this out. Usually, the nes…

---

## [Before\_filter application =\> exclude some other controllers](https://www.ruby-forum.com/t/before-filter-application-exclude-some-other-controllers/121970)

<div class="topic-metadata">

**Author:** [@raimon](https://www.ruby-forum.com/u/raimon)\
**Replies:** 2\
**Last updated:** [December 3, 2007, 5:16pm UTC](https://www.ruby-forum.com/t/before-filter-application-exclude-some-other-controllers/121970 "2007-12-03T17:16:18Z")

</div>

Hello again, It’s possible to use before\_filter in the application\_controller, and exclude for some methods from other controllers ? i have a before\_filter in application\_controller that checks if the user is logged,…

---

## [Problem to reading Cookies](https://www.ruby-forum.com/t/problem-to-reading-cookies/121977)

<div class="topic-metadata">

**Author:** [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Replies:** 0\
**Last updated:** [December 3, 2007, 4:13pm UTC](https://www.ruby-forum.com/t/problem-to-reading-cookies/121977 "2007-12-03T16:13:50Z")

</div>

I have a problem with rails and cookies. I have created a loginController. In this i have inserted these lines: cookies\[:uid\] = { :value =\> @user.id,:expires =\> 30.days.from\_now}; cookies\[:uhp\] = { :value =\> @user…

---

## [Routing is not working](https://www.ruby-forum.com/t/routing-is-not-working/121971)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [December 3, 2007, 3:20pm UTC](https://www.ruby-forum.com/t/routing-is-not-working/121971 "2007-12-03T15:20:11Z")

</div>

hi all , i want thats if i type http//localhost:3000 in my browser. it will redirect to controller account and action will be login i write this code in routes.rb file map.connect ‘\*anything’,:controller=\>‘account’,:…

---

## [Request param type of array](https://www.ruby-forum.com/t/request-param-type-of-array/121963)

<div class="topic-metadata">

**Author:** [@avanetix](https://www.ruby-forum.com/u/avanetix)\
**Replies:** 3\
**Last updated:** [December 3, 2007, 2:46pm UTC](https://www.ruby-forum.com/t/request-param-type-of-array/121963 "2007-12-03T14:46:04Z")

</div>

Hello. I have tested such form: ================ After submitting my form: \<% raise params.inspect %\> {“myfield”=\>“value1”, “action”=\>“index”, “\_submit”=\>“OK”, “controller”=\>“params”} \<% raise request.c…

---

## [Rails code in a Javascript function](https://www.ruby-forum.com/t/rails-code-in-a-javascript-function/121966)

<div class="topic-metadata">

**Author:** [@serkan](https://www.ruby-forum.com/u/serkan)\
**Replies:** 1\
**Last updated:** [December 3, 2007, 2:38pm UTC](https://www.ruby-forum.com/t/rails-code-in-a-javascript-function/121966 "2007-12-03T14:38:16Z")

</div>

Hi guys! In Rails, can you stick Rails code in a javascript function? An example, this code from the Geokit plugin on a view page which doesnt work for me: Any help would be appreciated! cheers!

---

## [Rails code in a Javascript function](https://www.ruby-forum.com/t/rails-code-in-a-javascript-function/121965)

<div class="topic-metadata">

**Author:** [@serkan](https://www.ruby-forum.com/u/serkan)\
**Replies:** 0\
**Last updated:** [December 3, 2007, 2:16pm UTC](https://www.ruby-forum.com/t/rails-code-in-a-javascript-function/121965 "2007-12-03T14:16:27Z")

</div>

Hi guys! In Rails, can you stick Rails code in a javascript function? An example, this code from the Geokit plugin on a view page which doesnt work for me: function initialize() { var map = new GMap(docum…

---

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

<div class="topic-metadata">

**Author:** [@Wim\_Ceulemans](https://www.ruby-forum.com/u/Wim_Ceulemans)\
**Replies:** 0\
**Last updated:** [December 3, 2007, 11:02am UTC](https://www.ruby-forum.com/t/unsubscribe/121956 "2007-12-03T11:02:39Z")

</div>

unsubscribe NEW on aXs GUARD: SSL VPN !! (contact your reseller for more info) aXs GUARD has completed security and anti-virus checks on this e-mail (http://www.axsguard.com) Able NV: ond.nr 0457.938.087 RPR Mechel…

---

## [Metric Converter, CM into INCHES](https://www.ruby-forum.com/t/metric-converter-cm-into-inches/121735)

<div class="topic-metadata">

**Author:** [@jmaenpaa](https://www.ruby-forum.com/u/jmaenpaa)\
**Replies:** 2\
**Last updated:** [December 3, 2007, 10:38am UTC](https://www.ruby-forum.com/t/metric-converter-cm-into-inches/121735 "2007-12-03T10:38:48Z")

</div>

Hi i am trying to figure out how to create something with rails that allows me to convert cm into inches and vice versa. I know the a cm has to be multiplied by 2.54 to make it into a inch, but i need to one field wit…

---

## [Select and passing some javascript](https://www.ruby-forum.com/t/select-and-passing-some-javascript/121924)

<div class="topic-metadata">

**Author:** [@raimon](https://www.ruby-forum.com/u/raimon)\
**Replies:** 4\
**Last updated:** [December 3, 2007, 10:29am UTC](https://www.ruby-forum.com/t/select-and-passing-some-javascript/121924 "2007-12-03T10:29:48Z")

</div>

Hello, After reading and reading the documentation, I can’t append some javascript function into a select. It’s not possible ? documentation: select(object, method, choices, options = {}, html\_options = {}) some cod…

---

## [Install and mysql issues](https://www.ruby-forum.com/t/install-and-mysql-issues/121947)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [December 3, 2007, 10:21am UTC](https://www.ruby-forum.com/t/install-and-mysql-issues/121947 "2007-12-03T10:21:44Z")

</div>

this is the versions i have installed: Microsoft Windows XP \[Version 5.1.2600\] (C) Copyright 1985-2001 Microsoft Corp. C:\\Documents and Settings\\Mark J.\>ruby -v ruby 1.8.6 (2007-03-13 patchlevel 0) \[i386-mswin32\] C:…

---

## [Asset packager for Rails 2](https://www.ruby-forum.com/t/asset-packager-for-rails-2/121827)

<div class="topic-metadata">

**Author:** [@helzer](https://www.ruby-forum.com/u/helzer)\
**Replies:** 5\
**Last updated:** [December 3, 2007, 9:28am UTC](https://www.ruby-forum.com/t/asset-packager-for-rails-2/121827 "2007-12-03T09:28:57Z")

</div>

I’ve tried to fix asset\_packager (Pages | Synthesis | Scott Becker asset\_packager) for Rails 2, but while doing this, it seems like I’m patching something that’s already built-in. Is asset\_packager actually built into…

---

## [How to make will\_paginate generated URL search engine friendly](https://www.ruby-forum.com/t/how-to-make-will-paginate-generated-url-search-engine-friendly/121820)

<div class="topic-metadata">

**Author:** [@infinit](https://www.ruby-forum.com/u/infinit)\
**Replies:** 3\
**Last updated:** [December 3, 2007, 5:51am UTC](https://www.ruby-forum.com/t/how-to-make-will-paginate-generated-url-search-engine-friendly/121820 "2007-12-03T05:51:21Z")

</div>

I m using will\_paginate plugin to do the pagination. And I find that the generated URL is like the following format: http://localhost:3000/site?page=2 http://localhost:3000/site?page=3 … how can I let it generate UR…

---

## [Routes.rb. what's diff map.connect and map.name?](https://www.ruby-forum.com/t/routes-rb-whats-diff-map-connect-and-map-name/121865)

<div class="topic-metadata">

**Author:** [@rubynuby](https://www.ruby-forum.com/u/rubynuby)\
**Replies:** 2\
**Last updated:** [December 3, 2007, 5:06am UTC](https://www.ruby-forum.com/t/routes-rb-whats-diff-map-connect-and-map-name/121865 "2007-12-03T05:06:57Z")

</div>

Hi as title says, what’s the difference between map.connect and map.somename ? thanks

---

## [Habtm & STI question](https://www.ruby-forum.com/t/habtm-sti-question/121939)

<div class="topic-metadata">

**Author:** [@BJ\_ClarkSthe\_scie](https://www.ruby-forum.com/u/BJ_ClarkSthe_scie)\
**Replies:** 0\
**Last updated:** [December 3, 2007, 4:43am UTC](https://www.ruby-forum.com/t/habtm-sti-question/121939 "2007-12-03T04:43:36Z")

</div>

Hello All, I have a model “Company” class Company \< ActiveRecord::Base has\_and\_belongs\_to\_many :types end And I also have MachineType and CompanyType that STI from the “Type” model. I have both a MachineType id an…

---

## [\[ADV\] Ruport Book Pre-orders now open](https://www.ruby-forum.com/t/adv-ruport-book-pre-orders-now-open/196530)

<div class="topic-metadata">

**Author:** [@naething](https://www.ruby-forum.com/u/naething)\
**Replies:** 0\
**Last updated:** [December 3, 2007, 4:43am UTC](https://www.ruby-forum.com/t/adv-ruport-book-pre-orders-now-open/196530 "2007-12-03T04:43:35Z")

</div>

Though we’ve not quite hit the finish line yet, we’re far enough along now to open up pre-orders for the Ruport Book (ruportbook.com). This will give us a chance to see how many folks are actively following the devel…

---

## [Anyone succeeded using AJAX patch view\_helpers.rb?](https://www.ruby-forum.com/t/anyone-succeeded-using-ajax-patch-view-helpers-rb/121812)

<div class="topic-metadata">

**Author:** [@ayyanar](https://www.ruby-forum.com/u/ayyanar)\
**Replies:** 2\
**Last updated:** [December 3, 2007, 4:36am UTC](https://www.ruby-forum.com/t/anyone-succeeded-using-ajax-patch-view-helpers-rb/121812 "2007-12-03T04:36:09Z")

</div>

Kindly upload the updated view\_helpers.rb if you people use the will\_pagination to post the AJAX request.

---

## [RC2 gem?](https://www.ruby-forum.com/t/rc2-gem/121911)

<div class="topic-metadata">

**Author:** [@student](https://www.ruby-forum.com/u/student)\
**Replies:** 1\
**Last updated:** [December 3, 2007, 3:13am UTC](https://www.ruby-forum.com/t/rc2-gem/121911 "2007-12-03T03:13:35Z")

</div>

Is there a way to get a gem for RC2? Sorry to be so lame.

---

## [Alias\_method error with 1.2.x?](https://www.ruby-forum.com/t/alias-method-error-with-1-2-x/87937)

<div class="topic-metadata">

**Author:** [@cwd](https://www.ruby-forum.com/u/cwd)\
**Replies:** 6\
**Last updated:** [December 3, 2007, 12:24am UTC](https://www.ruby-forum.com/t/alias-method-error-with-1-2-x/87937 "2007-12-03T00:24:40Z")

</div>

I’m running edge (6340) and installed a brand new copy of the engines plugin from svn. I start mongrel, and it immediately fails, complaining about alias\_method not being found. Known issue? Thanks

---

## [New Rails App: iZepto Timesheets](https://www.ruby-forum.com/t/new-rails-app-izepto-timesheets/121926)

<div class="topic-metadata">

**Author:** [@nbits](https://www.ruby-forum.com/u/nbits)\
**Replies:** 0\
**Last updated:** [December 2, 2007, 11:34pm UTC](https://www.ruby-forum.com/t/new-rails-app-izepto-timesheets/121926 "2007-12-02T23:34:54Z")

</div>

The software consultancy that I work for has recently released a timesheet/time tracking system written in Rails. It’s called iZepto and we are very keen to get your feedback. You’ll find it at: http://www.izepto.com …

---

## [Redirect question](https://www.ruby-forum.com/t/redirect-question/121846)

<div class="topic-metadata">

**Author:** [@cedarwood](https://www.ruby-forum.com/u/cedarwood)\
**Replies:** 8\
**Last updated:** [December 2, 2007, 11:34pm UTC](https://www.ruby-forum.com/t/redirect-question/121846 "2007-12-02T23:34:19Z")

</div>

Hi I’m hoping someone can help me with the following: I am trying to use a redirect to pass variables as a post request but may be having trouble with the syntax. redirect\_to(:controller =\> ‘individual’, :action =\> ‘…

---

## [Engines for Rails 2.0 test application](https://www.ruby-forum.com/t/engines-for-rails-2-0-test-application/121899)

<div class="topic-metadata">

**Author:** [@Sven\_F](https://www.ruby-forum.com/u/Sven_F)\
**Replies:** 7\
**Last updated:** [December 2, 2007, 11:17pm UTC](https://www.ruby-forum.com/t/engines-for-rails-2-0-test-application/121899 "2007-12-02T23:17:22Z")

</div>

Hi James, hi all, Like we agreed on #engines last week I’ve worked on Engines for Rails 2.0 (still using RC1) this weekend. I’ve commited my work here: http://svn.artweb-design.de/engines/tests/rails\_2\_0 Please crit…

---

## [Equality Problems](https://www.ruby-forum.com/t/equality-problems/121919)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [December 2, 2007, 11:14pm UTC](https://www.ruby-forum.com/t/equality-problems/121919 "2007-12-02T23:14:26Z")

</div>

Below is a snip of code that I’m having problems with the test in the .each method alway will return false and I don’t have a clue why. Could someone please help? @id=params\[:id\] @qty=params\[:qty\] print “ID=”, @id …

---

## [Can I initialize model attributes from SQL?](https://www.ruby-forum.com/t/can-i-initialize-model-attributes-from-sql/121868)

<div class="topic-metadata">

**Author:** [@tom\_302](https://www.ruby-forum.com/u/tom_302)\
**Replies:** 2\
**Last updated:** [December 2, 2007, 10:00pm UTC](https://www.ruby-forum.com/t/can-i-initialize-model-attributes-from-sql/121868 "2007-12-02T22:00:36Z")

</div>

Hello, Is it possible to initialize model attributes from a SQL select element that’s not backed by a real database column? For example: class A \<\< ActiveRecord::Base attr\_accessor :state\_info #Not a db column has\_…

---

## [Forms, Values, and Multiple Models question](https://www.ruby-forum.com/t/forms-values-and-multiple-models-question/121917)

<div class="topic-metadata">

**Author:** [@dmiller3](https://www.ruby-forum.com/u/dmiller3)\
**Replies:** 0\
**Last updated:** [December 2, 2007, 9:47pm UTC](https://www.ruby-forum.com/t/forms-values-and-multiple-models-question/121917 "2007-12-02T21:47:18Z")

</div>

Hi Everyone– First the details…I have two models at the moment, member and account, which have the following relationship: class Member \< ActiveRecord::Base Relationship between member and account has\_one :account e…

---

## [Map.resources routing question](https://www.ruby-forum.com/t/map-resources-routing-question/121916)

<div class="topic-metadata">

**Author:** [@RSElliott\_M](https://www.ruby-forum.com/u/RSElliott_M)\
**Replies:** 0\
**Last updated:** [December 2, 2007, 9:41pm UTC](https://www.ruby-forum.com/t/map-resources-routing-question/121916 "2007-12-02T21:41:42Z")

</div>

I am just learning RESTful design and trying to redesign my application to follow the paradigm, but I am still confused about how to tackle certain things. I have a model called Upload and naturally a controller calle…

---

## [Using :through and belongs\_to](https://www.ruby-forum.com/t/using-through-and-belongs-to/121587)

<div class="topic-metadata">

**Author:** [@Mozmonkey](https://www.ruby-forum.com/u/Mozmonkey)\
**Replies:** 1\
**Last updated:** [December 2, 2007, 9:37pm UTC](https://www.ruby-forum.com/t/using-through-and-belongs-to/121587 "2007-12-02T21:37:47Z")

</div>

I’m trying to reduce the mysql calls by using :include or :through and both methods don’t seem to work. Here’s the breakdown: users can have friends and an avatar (image), so my models are setup like this: User has…

---

## [AbstractRequest request methods outside of Application.rb](https://www.ruby-forum.com/t/abstractrequest-request-methods-outside-of-application-rb/121809)

<div class="topic-metadata">

**Author:** [@enchanter](https://www.ruby-forum.com/u/enchanter)\
**Replies:** 2\
**Last updated:** [December 2, 2007, 9:10pm UTC](https://www.ruby-forum.com/t/abstractrequest-request-methods-outside-of-application-rb/121809 "2007-12-02T21:10:07Z")

</div>

I’m trying to access methods like request.request\_uri and request.domain outside of the normal application and view code. How might one access these with code in /lib?

---

## [Attach a PDF File to an Email](https://www.ruby-forum.com/t/attach-a-pdf-file-to-an-email/59721)

<div class="topic-metadata">

**Author:** [@dabeeeenster](https://www.ruby-forum.com/u/dabeeeenster)\
**Replies:** 5\
**Last updated:** [December 2, 2007, 8:23pm UTC](https://www.ruby-forum.com/t/attach-a-pdf-file-to-an-email/59721 "2007-12-02T20:23:42Z")

</div>

Hello ~ I have an email that I need to attach a PDF to. The email is being sent, and a file is attached but it is not the original file. I am following the example: attachment :content\_type =\> “image/jpeg”, :body =\>…

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

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