# Rails

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

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

---

## [Use date\_select to show only Saturdays?](https://www.ruby-forum.com/t/use-date-select-to-show-only-saturdays/148319)

<div class="topic-metadata">

**Author:** [@Mike\_Whitman](https://www.ruby-forum.com/u/Mike_Whitman)\
**Replies:** 1\
**Last updated:** [September 12, 2008, 6:24pm UTC](https://www.ruby-forum.com/t/use-date-select-to-show-only-saturdays/148319 "2008-09-12T18:24:47Z")

</div>

I would like a form that only allows users to pick Saturdays. Anyway to do this with the date\_select helper? Or any idea of an easy way to do this? Thanks, Mike

---

## [Conditional RJS partial rendering based on request source](https://www.ruby-forum.com/t/conditional-rjs-partial-rendering-based-on-request-source/148420)

<div class="topic-metadata">

**Author:** [@reynar](https://www.ruby-forum.com/u/reynar)\
**Replies:** 0\
**Last updated:** [September 12, 2008, 5:25pm UTC](https://www.ruby-forum.com/t/conditional-rjs-partial-rendering-based-on-request-source/148420 "2008-09-12T17:25:28Z")

</div>

Hi, I’m not sure if this is a problem or just part of doing business with an AJAX based interface. I have a create actions that renders a partial via RJS. page.insert\_html :top, ‘addresses’, { :partial =\> ‘addresses/ …

---

## [Locale model to store language value not working](https://www.ruby-forum.com/t/locale-model-to-store-language-value-not-working/148409)

<div class="topic-metadata">

**Author:** [@jalb](https://www.ruby-forum.com/u/jalb)\
**Replies:** 2\
**Last updated:** [September 12, 2008, 4:17pm UTC](https://www.ruby-forum.com/t/locale-model-to-store-language-value-not-working/148409 "2008-09-12T16:17:23Z")

</div>

hi I have a problem to store the current locale (language) used by a user . I have this model that represent the locale: class LocaleModel \< ActiveRecord::Base @@global\_locale = nil def self.global @@global\_locale …

---

## [Locale model to store language value not working](https://www.ruby-forum.com/t/locale-model-to-store-language-value-not-working/148411)

<div class="topic-metadata">

**Author:** [@jalb](https://www.ruby-forum.com/u/jalb)\
**Replies:** 0\
**Last updated:** [September 12, 2008, 4:15pm UTC](https://www.ruby-forum.com/t/locale-model-to-store-language-value-not-working/148411 "2008-09-12T16:15:37Z")

</div>

hi I have a problem to store the current locale (language) used by a user . I have this model that represent the locale: class LocaleModel \< ActiveRecord::Base @@global\_locale = nil def self.global @@global\_locale …

---

## [Nested observe\_field and IE](https://www.ruby-forum.com/t/nested-observe-field-and-ie/148405)

<div class="topic-metadata">

**Author:** [@1w4n](https://www.ruby-forum.com/u/1w4n)\
**Replies:** 0\
**Last updated:** [September 12, 2008, 3:40pm UTC](https://www.ruby-forum.com/t/nested-observe-field-and-ie/148405 "2008-09-12T15:40:47Z")

</div>

Hello, Inside a view i have a list of nations, the drop-down is “observed” and at any modification of this list an other nested list (with a regions list) will be updated, that is itself observed and that update an ot…

---

## [Thank you](https://www.ruby-forum.com/t/thank-you/148402)

<div class="topic-metadata">

**Author:** [@drlelon](https://www.ruby-forum.com/u/drlelon)\
**Replies:** 0\
**Last updated:** [September 12, 2008, 3:23pm UTC](https://www.ruby-forum.com/t/thank-you/148402 "2008-09-12T15:23:27Z")

</div>

Thank you allot people. Currently i’ve disabled the integration of mobile vs email field checking. They just can’t login without the correct format at the time beeing. And they’ll never recieve a password if they didn…

---

## [Dealing with nil relation](https://www.ruby-forum.com/t/dealing-with-nil-relation/148400)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 1\
**Last updated:** [September 12, 2008, 3:14pm UTC](https://www.ruby-forum.com/t/dealing-with-nil-relation/148400 "2008-09-12T15:14:04Z")

</div>

I have a person table and a relation to a table for absents. When listing absents I get the name by the relationship and the person\_id. But now I get an error because the person is deleted. How do I check if a relatio…

---

## [Jquery slider](https://www.ruby-forum.com/t/jquery-slider/148246)

<div class="topic-metadata">

**Author:** [@pipex](https://www.ruby-forum.com/u/pipex)\
**Replies:** 1\
**Last updated:** [September 12, 2008, 3:14pm UTC](https://www.ruby-forum.com/t/jquery-slider/148246 "2008-09-12T15:14:04Z")

</div>

a have a jquery slider a save the final values of the selection in javascript variables rank\_1, rank\_2, rank\_3 I need to give this values to a controller how can i do that?? some help please!! thank you! Felipe V. Co…

---

## [How to retain fckeditor's value](https://www.ruby-forum.com/t/how-to-retain-fckeditors-value/148392)

<div class="topic-metadata">

**Author:** [@babar](https://www.ruby-forum.com/u/babar)\
**Replies:** 0\
**Last updated:** [September 12, 2008, 1:49pm UTC](https://www.ruby-forum.com/t/how-to-retain-fckeditors-value/148392 "2008-09-12T13:49:37Z")

</div>

Hi im using fckeditor. i have two fields on form. 1.Title 2. Description ,where im using fckeditor. if i left empty field of title but putting some text in fckeditor. It empty field of title is not allowed. But the…

---

## [File extension changes xlc to doc](https://www.ruby-forum.com/t/file-extension-changes-xlc-to-doc/148391)

<div class="topic-metadata">

**Author:** [@babar](https://www.ruby-forum.com/u/babar)\
**Replies:** 0\
**Last updated:** [September 12, 2008, 1:49pm UTC](https://www.ruby-forum.com/t/file-extension-changes-xlc-to-doc/148391 "2008-09-12T13:49:02Z")

</div>

Hi, Im using file\_column for upload files. When i upload xlc file .After upload its extension chaged to doc… for example before upload file abc.xlc after uploading abc.xlc.doc important thing is,locally its extensi…

---

## [Bypassing Paypal Integration](https://www.ruby-forum.com/t/bypassing-paypal-integration/148389)

<div class="topic-metadata">

**Author:** [@prionko](https://www.ruby-forum.com/u/prionko)\
**Replies:** 0\
**Last updated:** [September 12, 2008, 1:35pm UTC](https://www.ruby-forum.com/t/bypassing-paypal-integration/148389 "2008-09-12T13:35:41Z")

</div>

Hi all, I have implemented Paypal integration \[Express checkout \] in our project,using Ruby PayPal SDK. Now for some reason, I want to by pass the Paypal Integration, without removing the codes for paypal integration…

---

## [Session data is not saved in the session file although file created (using :p\_store)](https://www.ruby-forum.com/t/session-data-is-not-saved-in-the-session-file-although-file-created-using-p-store/196805)

<div class="topic-metadata">

**Author:** [@gabriel](https://www.ruby-forum.com/u/gabriel)\
**Replies:** 0\
**Last updated:** [September 12, 2008, 1:30pm UTC](https://www.ruby-forum.com/t/session-data-is-not-saved-in-the-session-file-although-file-created-using-p-store/196805 "2008-09-12T13:30:17Z")

</div>

Hi all, I am new to Rails. I want to test some things with sessions. But I simply cannot make them work. I am using this in the environment.rb file: config.action\_controller.session\_store = :p\_store config.action\_co…

---

## [Routes: has\_many vs. nested](https://www.ruby-forum.com/t/routes-has-many-vs-nested/148387)

<div class="topic-metadata">

**Author:** [@Gerold\_BSSSShler](https://www.ruby-forum.com/u/Gerold_BSSSShler)\
**Replies:** 0\
**Last updated:** [September 12, 2008, 1:03pm UTC](https://www.ruby-forum.com/t/routes-has-many-vs-nested/148387 "2008-09-12T13:03:15Z")

</div>

hello i was just wondering what the diference between map.resources :posts, :has\_one =\> :author, :has\_many =\> \[:comments, :trackbacks\] and map.resources :posts do |posts| posts.resource :author posts.resources :co…

---

## [Get an attribute's value without calling the AR get method](https://www.ruby-forum.com/t/get-an-attributes-value-without-calling-the-ar-get-method/148386)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 2\
**Last updated:** [September 12, 2008, 12:46pm UTC](https://www.ruby-forum.com/t/get-an-attributes-value-without-calling-the-ar-get-method/148386 "2008-09-12T12:46:50Z")

</div>

I want to override a get method to try to get a value from an associated object first, and then get the object’s own value if the associated object returned nil. But, this requires me to avoid calling a get method fr…

---

## [Polymorphism with created\_at and modified\_at](https://www.ruby-forum.com/t/polymorphism-with-created-at-and-modified-at/148385)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [September 12, 2008, 12:41pm UTC](https://www.ruby-forum.com/t/polymorphism-with-created-at-and-modified-at/148385 "2008-09-12T12:41:54Z")

</div>

Hi, I was wondering what happens, if I use polymorphism in combination with created\_at and modified\_at? Lets say I have 3 models, which all have the attributes created\_at and modified\_at, then how will they updated? …

---

## [Time value won't come back from UTC](https://www.ruby-forum.com/t/time-value-wont-come-back-from-utc/148331)

<div class="topic-metadata">

**Author:** [@sclarke](https://www.ruby-forum.com/u/sclarke)\
**Replies:** 2\
**Last updated:** [September 12, 2008, 12:00pm UTC](https://www.ruby-forum.com/t/time-value-wont-come-back-from-utc/148331 "2008-09-12T12:00:50Z")

</div>

Hi there, I’m fairly new to RoR, and I seem to be having a problem with :time types. I save my times with a time\_select on my form, to a time type field on MySQL. Rails automatically pulls it back to UTC from my tim…

---

## [Edge rails - wrong number of arguments in validations.rb](https://www.ruby-forum.com/t/edge-rails-wrong-number-of-arguments-in-validations-rb/148258)

<div class="topic-metadata">

**Author:** [@Drogomir](https://www.ruby-forum.com/u/Drogomir)\
**Replies:** 1\
**Last updated:** [September 12, 2008, 11:55am UTC](https://www.ruby-forum.com/t/edge-rails-wrong-number-of-arguments-in-validations-rb/148258 "2008-09-12T11:55:34Z")

</div>

Hi, I have strange error on edge rails while doing validates\_uniqueness\_of or some other validates\_\* methods. basically it looks like that: http://pastie.org/269935 it’s weird cause ActiveRecord::Errors#add has 3 ar…

---

## [Undefined method](https://www.ruby-forum.com/t/undefined-method/148381)

<div class="topic-metadata">

**Author:** [@redster](https://www.ruby-forum.com/u/redster)\
**Replies:** 1\
**Last updated:** [September 12, 2008, 11:43am UTC](https://www.ruby-forum.com/t/undefined-method/148381 "2008-09-12T11:43:17Z")

</div>

undefined method \`username’ for 1:Fixnum Extracted source (around line #3): 1: \<% form\_tag (:action =\> ‘update\_password’, :id =\> @user) do %\> 2: enter old password 3: \<%= password\_field ‘user’, ‘username’ %\> 4: 5…

---

## [Rails 2.1 Timezone Support](https://www.ruby-forum.com/t/rails-2-1-timezone-support/148330)

<div class="topic-metadata">

**Author:** [@xgamerx](https://www.ruby-forum.com/u/xgamerx)\
**Replies:** 1\
**Last updated:** [September 12, 2008, 11:25am UTC](https://www.ruby-forum.com/t/rails-2-1-timezone-support/148330 "2008-09-12T11:25:39Z")

</div>

I understand the basics of timezone support: Essentially, I just have to do this: controllers/application.rb before\_filter :set\_time\_zone def set\_time\_zone Time.zone = @current\_user.time\_zone if @current\_user end …

---

## [Referencing exactly two models of the same kind](https://www.ruby-forum.com/t/referencing-exactly-two-models-of-the-same-kind/148377)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [September 12, 2008, 10:42am UTC](https://www.ruby-forum.com/t/referencing-exactly-two-models-of-the-same-kind/148377 "2008-09-12T10:42:15Z")

</div>

Hi, how do I solve this in Rails: Lets say I have a User and a Message. Now, a Message is sent from one User to another User, which means that in the Message I have to reference a User twice! This seems to be a probl…

---

## [Params hash in rails](https://www.ruby-forum.com/t/params-hash-in-rails/196806)

<div class="topic-metadata">

**Author:** [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Replies:** 3\
**Last updated:** [September 12, 2008, 10:41am UTC](https://www.ruby-forum.com/t/params-hash-in-rails/196806 "2008-09-12T10:41:04Z")

</div>

Hi, I want to know that how ‘params’ get created in rails? when http: request comes we have get all parameter using hash params e.g:- params\[:id\] But in ActionController how params get created and how it is initiali…

---

## [Does any one know of this plugin "Acts As Emailable"](https://www.ruby-forum.com/t/does-any-one-know-of-this-plugin-acts-as-emailable/148372)

<div class="topic-metadata">

**Author:** [@stephen](https://www.ruby-forum.com/u/stephen)\
**Replies:** 0\
**Last updated:** [September 12, 2008, 9:53am UTC](https://www.ruby-forum.com/t/does-any-one-know-of-this-plugin-acts-as-emailable/148372 "2008-09-12T09:53:36Z")

</div>

I have found this plugins website “http://www.railslodge.com/plugins/ 96-acts-as-emailable” and would like to download and use the plugin. But apparently the SVN repository listed “svn://matt-beedle.com:3396/ acts\_as\_…

---

## [Rails deployment](https://www.ruby-forum.com/t/rails-deployment/148367)

<div class="topic-metadata">

**Author:** [@boblmartens](https://www.ruby-forum.com/u/boblmartens)\
**Replies:** 0\
**Last updated:** [September 12, 2008, 6:12am UTC](https://www.ruby-forum.com/t/rails-deployment/148367 "2008-09-12T06:12:09Z")

</div>

Crommelin is the first ship of that name in the United States Navy. Crommelin was assigned to Destroyer Squadron 9 and reached its homeport of Long Beach, California in August 1983. Crommelin was awarded every depart…

---

## [Ruby](https://www.ruby-forum.com/t/ruby/148306)

<div class="topic-metadata">

**Author:** [@krishna](https://www.ruby-forum.com/u/krishna)\
**Replies:** 1\
**Last updated:** [September 12, 2008, 5:28am UTC](https://www.ruby-forum.com/t/ruby/148306 "2008-09-12T05:28:31Z")

</div>

how to install and run ruby appllication. I am new to ruby.

---

## [Problem with links in rails app - appending path after the text?](https://www.ruby-forum.com/t/problem-with-links-in-rails-app-appending-path-after-the-text/148364)

<div class="topic-metadata">

**Author:** [@arachnd](https://www.ruby-forum.com/u/arachnd)\
**Replies:** 1\
**Last updated:** [September 12, 2008, 4:43am UTC](https://www.ruby-forum.com/t/problem-with-links-in-rails-app-appending-path-after-the-text/148364 "2008-09-12T04:43:31Z")

</div>

anyone have any idea on why my links are rendering the path after the actual links text? e.g: Sign Up NOW shows up in (safari/firefox) as =\> Sign Up NOW (/register) The (/register) part shouldn’t be there. Not to m…

---

## [How to turn an account page to pdf format?](https://www.ruby-forum.com/t/how-to-turn-an-account-page-to-pdf-format/148312)

<div class="topic-metadata">

**Author:** [@Murray](https://www.ruby-forum.com/u/Murray)\
**Replies:** 1\
**Last updated:** [September 12, 2008, 4:14am UTC](https://www.ruby-forum.com/t/how-to-turn-an-account-page-to-pdf-format/148312 "2008-09-12T04:14:47Z")

</div>

In my site, I want to make some account page in pdf format. Is there a good way to turn html view into pdf view?

---

## [Sending a file to a user](https://www.ruby-forum.com/t/sending-a-file-to-a-user/148326)

<div class="topic-metadata">

**Author:** [@dreamwave](https://www.ruby-forum.com/u/dreamwave)\
**Replies:** 1\
**Last updated:** [September 12, 2008, 4:01am UTC](https://www.ruby-forum.com/t/sending-a-file-to-a-user/148326 "2008-09-12T04:01:20Z")

</div>

Hello, In my application I would like the user to download a file that is dynamically created from the database. Currently, I have rails put all the text into one variable and then save that to a temporary file with a …

---

## [Version of rails app](https://www.ruby-forum.com/t/version-of-rails-app/148332)

<div class="topic-metadata">

**Author:** [@Kodak](https://www.ruby-forum.com/u/Kodak)\
**Replies:** 1\
**Last updated:** [September 12, 2008, 3:45am UTC](https://www.ruby-forum.com/t/version-of-rails-app/148332 "2008-09-12T03:45:33Z")

</div>

Hi all, I want to ask about ideas of rails app versioning. I got app in development and want to know version that client is running. I can write some version string in application.html to show version… Other idea is …

---

## [Route segment ":controller" cannot be optional because it precedes a required segment](https://www.ruby-forum.com/t/route-segment-controller-cannot-be-optional-because-it-precedes-a-required-segment/146629)

<div class="topic-metadata">

**Author:** [@David\_Bird](https://www.ruby-forum.com/u/David_Bird)\
**Replies:** 1\
**Last updated:** [September 12, 2008, 3:40am UTC](https://www.ruby-forum.com/t/route-segment-controller-cannot-be-optional-because-it-precedes-a-required-segment/146629 "2008-09-12T03:40:51Z")

</div>

Hi, With this route… map.namespace :admin do |admin| admin.sort ‘/:controller/sort/:sort\_by/:sort\_dir’, :action =\> ‘sort’ end …I get this message… Route segment “:controller” cannot be optional because it precedes …

---

## [Page does not display](https://www.ruby-forum.com/t/page-does-not-display/148344)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 5\
**Last updated:** [September 12, 2008, 3:11am UTC](https://www.ruby-forum.com/t/page-does-not-display/148344 "2008-09-12T03:11:31Z")

</div>

I have these profiles for over a thousand users, and these profiles hold addresses, phone numbers, etc, etc. Every profile works just fine except for one that when the appropriate link is clicked I get a blank page. W…

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

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