# Rails

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

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

---

## [Change Localized Language Dynamically](https://www.ruby-forum.com/t/change-localized-language-dynamically/109210)

<div class="topic-metadata">

**Author:** [@stanly](https://www.ruby-forum.com/u/stanly)\
**Replies:** 0\
**Last updated:** [July 12, 2007, 12:53pm UTC](https://www.ruby-forum.com/t/change-localized-language-dynamically/109210 "2007-07-12T12:53:13Z")

</div>

Hi All, I am using Localization provided in the Salted Hash Login Plugin. I am running into a problem i want to change the language on the fly depending on say users profile settings after logging him in. How do i go…

---

## [Activerecord Realtionship question](https://www.ruby-forum.com/t/activerecord-realtionship-question/109101)

<div class="topic-metadata">

**Author:** [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Replies:** 7\
**Last updated:** [July 12, 2007, 12:47pm UTC](https://www.ruby-forum.com/t/activerecord-realtionship-question/109101 "2007-07-12T12:47:00Z")

</div>

Hi, I cant quite get my head around the best way to this, ive tried habtm and has\_many through but neither seem to work, probably because i dont understand them properly but here it goes. If i have a model called sam…

---

## [Replacing a "has many through" collection](https://www.ruby-forum.com/t/replacing-a-has-many-through-collection/109208)

<div class="topic-metadata">

**Author:** [@morten](https://www.ruby-forum.com/u/morten)\
**Replies:** 0\
**Last updated:** [July 12, 2007, 12:45pm UTC](https://www.ruby-forum.com/t/replacing-a-has-many-through-collection/109208 "2007-07-12T12:45:55Z")

</div>

Hi, given a data model like this: membership belongs\_to user membership belongs\_go group user has\_many memberships user has\_many groups through memberships group has\_many memberships group has\_many users through me…

---

## [Radio\_button](https://www.ruby-forum.com/t/radio-button/109153)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 2\
**Last updated:** [July 12, 2007, 12:30pm UTC](https://www.ruby-forum.com/t/radio-button/109153 "2007-07-12T12:30:09Z")

</div>

I want to create an onclick event for the radio button. Here is what I have: \<%= radio\_button\_tag ‘user’, ‘d\_home’, :id =\> ‘user\[d\_home\]’, :onclick =\> “new Effect.SwitchOff(‘apear-div’); new Effect.Fade( ‘apear-div’ )…

---

## [Read params](https://www.ruby-forum.com/t/read-params/109159)

<div class="topic-metadata">

**Author:** [@xinu](https://www.ruby-forum.com/u/xinu)\
**Replies:** 10\
**Last updated:** [July 12, 2007, 12:04pm UTC](https://www.ruby-forum.com/t/read-params/109159 "2007-07-12T12:04:50Z")

</div>

hi. I am a rails newbie. I have am Model user with name and email. How can I acces and modify the param email before user.save? \<% form\_for :user do |f| -%\> Username: \<%= f.text\_field :name %\> Email \<%= f…

---

## [Run ruby script.rb from rails](https://www.ruby-forum.com/t/run-ruby-script-rb-from-rails/109150)

<div class="topic-metadata">

**Author:** [@dkitchel](https://www.ruby-forum.com/u/dkitchel)\
**Replies:** 4\
**Last updated:** [July 12, 2007, 11:16am UTC](https://www.ruby-forum.com/t/run-ruby-script-rb-from-rails/109150 "2007-07-12T11:16:29Z")

</div>

I’ve spent way too long searching for a way to run a ruby script which parses and ingests an xml document as named by a parameter into mysql. on the console it works fine - script/myscript myxmlfile I just need to be…

---

## [ActionMailer and logging](https://www.ruby-forum.com/t/actionmailer-and-logging/109197)

<div class="topic-metadata">

**Author:** [@hleroy](https://www.ruby-forum.com/u/hleroy)\
**Replies:** 0\
**Last updated:** [July 12, 2007, 10:57am UTC](https://www.ruby-forum.com/t/actionmailer-and-logging/109197 "2007-07-12T10:57:27Z")

</div>

Hi, My web app is mailing a lot of PDF attachments (invoices), thru ActionMailer. Pb is, ActionMailer dumps the contents of each PDF into my log. I’d like to keep trace of mail sent â€” but silence the logger regardi…

---

## [What do u think of this cool technique? Can you see a flaw?](https://www.ruby-forum.com/t/what-do-u-think-of-this-cool-technique-can-you-see-a-flaw/109194)

<div class="topic-metadata">

**Author:** [@crenner](https://www.ruby-forum.com/u/crenner)\
**Replies:** 0\
**Last updated:** [July 12, 2007, 10:37am UTC](https://www.ruby-forum.com/t/what-do-u-think-of-this-cool-technique-can-you-see-a-flaw/109194 "2007-07-12T10:37:10Z")

</div>

I saw this somewhere and thought it looked damn nice : def new @user = User.new end def create @user = User.new(params\[:user\]) @user.save! self.current\_user = @user redirect\_back\_or\_default(’/’) flash\[:notice\] =…

---

## [Need help with ID-less legacy databases](https://www.ruby-forum.com/t/need-help-with-id-less-legacy-databases/108862)

<div class="topic-metadata">

**Author:** [@Jim\_Gagne](https://www.ruby-forum.com/u/Jim_Gagne)\
**Replies:** 2\
**Last updated:** [July 12, 2007, 10:14am UTC](https://www.ruby-forum.com/t/need-help-with-id-less-legacy-databases/108862 "2007-07-12T10:14:36Z")

</div>

I’m a newbie converting a large Foxpro database (188 MB) to Ruby on Rails (RoR) so we can get reports out of it. Our accounting service sends us weekly updates of the entire database. We don’t enter any data (that’s d…

---

## [Prototype / scriptaculous - 2 Questions, may a suggest for a](https://www.ruby-forum.com/t/prototype-scriptaculous-2-questions-may-a-suggest-for-a/109191)

<div class="topic-metadata">

**Author:** [@rafael](https://www.ruby-forum.com/u/rafael)\
**Replies:** 0\
**Last updated:** [July 12, 2007, 10:07am UTC](https://www.ruby-forum.com/t/prototype-scriptaculous-2-questions-may-a-suggest-for-a/109191 "2007-07-12T10:07:35Z")

</div>

Hi folx, as I was looking for solutions for some AJAX challenges, I thought, that other people are interested as well in this approach. May Ryan or Geoffrey are interested to make a little recipe / screencast out of …

---

## [How to call others programs?](https://www.ruby-forum.com/t/how-to-call-others-programs/109189)

<div class="topic-metadata">

**Author:** [@franz](https://www.ruby-forum.com/u/franz)\
**Replies:** 0\
**Last updated:** [July 12, 2007, 9:45am UTC](https://www.ruby-forum.com/t/how-to-call-others-programs/109189 "2007-07-12T09:45:41Z")

</div>

Hello everybody, I have found a method to call others programs in my controller with a pipe, like this : pipe=IO.popen “my command”,“r” result=pipe.read pipe.close But for some obscur reasons, now that I have insta…

---

## [Connecting store procedures](https://www.ruby-forum.com/t/connecting-store-procedures/109185)

<div class="topic-metadata">

**Author:** [@Arnold](https://www.ruby-forum.com/u/Arnold)\
**Replies:** 1\
**Last updated:** [July 12, 2007, 9:28am UTC](https://www.ruby-forum.com/t/connecting-store-procedures/109185 "2007-07-12T09:28:32Z")

</div>

Hello everybody, I am new to Ruby, I am a developer using .NET . I wanted to try ruby out, and till now I find it usefull. Though I have 3 questions, that I would require some assistance, I am using SQL-Server 2000 a…

---

## [Form\_tag doesn't accept a string anymore in edge rails?](https://www.ruby-forum.com/t/form-tag-doesnt-accept-a-string-anymore-in-edge-rails/109187)

<div class="topic-metadata">

**Author:** [@joe-dumoulin](https://www.ruby-forum.com/u/joe-dumoulin)\
**Replies:** 1\
**Last updated:** [July 12, 2007, 9:28am UTC](https://www.ruby-forum.com/t/form-tag-doesnt-accept-a-string-anymore-in-edge-rails/109187 "2007-07-12T09:28:32Z")

</div>

So, here’s the offending line. Note that I’m using edge rails. form\_tag verifications\_path(@user), :method =\> :post do verifications\_path(@user) returns a string like “/users/3/ verifications”. That eventually gets …

---

## [Mix between the autocomplete and drop down](https://www.ruby-forum.com/t/mix-between-the-autocomplete-and-drop-down/109181)

<div class="topic-metadata">

**Author:** [@dgm](https://www.ruby-forum.com/u/dgm)\
**Replies:** 1\
**Last updated:** [July 12, 2007, 9:10am UTC](https://www.ruby-forum.com/t/mix-between-the-autocomplete-and-drop-down/109181 "2007-07-12T09:10:30Z")

</div>

I’m trying to build a mix between the autocomplete and a normal drop down. A I’m trying to build a drop down that allows the user to type in desired selection. Normal drop downs simply go to the first occurrence of …

---

## [Live\_search observe\_form - manual call](https://www.ruby-forum.com/t/live-search-observe-form-manual-call/109183)

<div class="topic-metadata">

**Author:** [@dgm](https://www.ruby-forum.com/u/dgm)\
**Replies:** 0\
**Last updated:** [July 12, 2007, 7:45am UTC](https://www.ruby-forum.com/t/live-search-observe-form-manual-call/109183 "2007-07-12T07:45:27Z")

</div>

I am using the observe\_form to create a live search. The user types in the specified search phrase and the div below is populated with the matches. The user can click on a match below and go to a new page that shows…

---

## [Drag and drop in tables](https://www.ruby-forum.com/t/drag-and-drop-in-tables/109182)

<div class="topic-metadata">

**Author:** [@madhan](https://www.ruby-forum.com/u/madhan)\
**Replies:** 0\
**Last updated:** [July 12, 2007, 7:42am UTC](https://www.ruby-forum.com/t/drag-and-drop-in-tables/109182 "2007-07-12T07:42:25Z")

</div>

hi all, i have 2 tables for drag and drop in my rhtml, both displaying their name, and related records from the database table. If i drop the element of one table’s into another table’s , it should count number …

---

## [Upgrading an old rails project to the newest version](https://www.ruby-forum.com/t/upgrading-an-old-rails-project-to-the-newest-version/109176)

<div class="topic-metadata">

**Author:** [@smc7000](https://www.ruby-forum.com/u/smc7000)\
**Replies:** 1\
**Last updated:** [July 12, 2007, 7:11am UTC](https://www.ruby-forum.com/t/upgrading-an-old-rails-project-to-the-newest-version/109176 "2007-07-12T07:11:20Z")

</div>

Does anybody have any tips on upgrading an older rails project to a newer version of rails? I have a project that is still calling up WeBrick in dev mode and I’d like to bring it up to date. Short of creating a whole …

---

## [RJS & Variable Scopes](https://www.ruby-forum.com/t/rjs-variable-scopes/109174)

<div class="topic-metadata">

**Author:** [@d0t1q](https://www.ruby-forum.com/u/d0t1q)\
**Replies:** 0\
**Last updated:** [July 12, 2007, 5:37am UTC](https://www.ruby-forum.com/t/rjs-variable-scopes/109174 "2007-07-12T05:37:16Z")

</div>

I’m new to RJS and am trying to figure out how @params are passed/ available with my hierarchy. views/test/person.rhtml \<%= link\_to\_remote(‘GO’, {:url =\> “/test/show?name=walker&age=77”})%\> frank33 controllers/test\_co…

---

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

<div class="topic-metadata">

**Author:** [@sjf\_control](https://www.ruby-forum.com/u/sjf_control)\
**Replies:** 2\
**Last updated:** [July 12, 2007, 3:49am UTC](https://www.ruby-forum.com/t/render-functionality/109155 "2007-07-12T03:49:11Z")

</div>

I understand the difference between render and redirect (at least I think I do…) But there still seems to be some confusion in my mind between render :action =\> :some\_action and render :action =\> “some\_action” It w…

---

## [Map.resources, format and additional params](https://www.ruby-forum.com/t/map-resources-format-and-additional-params/109168)

<div class="topic-metadata">

**Author:** [@addywaddy](https://www.ruby-forum.com/u/addywaddy)\
**Replies:** 1\
**Last updated:** [July 12, 2007, 3:26am UTC](https://www.ruby-forum.com/t/map-resources-format-and-additional-params/109168 "2007-07-12T03:26:02Z")

</div>

Hi, I’ve hit an issue that has me a little surprised - basically, when I specify both a format and additional parameters in my URL, via something like: /jobs.txt?q=Up then params\[:format\] is set not to “txt” as I wo…

---

## [Update\_all for an AR instance](https://www.ruby-forum.com/t/update-all-for-an-ar-instance/109169)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 0\
**Last updated:** [July 12, 2007, 3:23am UTC](https://www.ruby-forum.com/t/update-all-for-an-ar-instance/109169 "2007-07-12T03:23:06Z")

</div>

Is there anyway to call “update\_attributes” where it updates only the attributes you specify with the update command. The only thing close to this is update\_all where you have to specify the condition. So essentially …

---

## [Error](https://www.ruby-forum.com/t/error/109135)

<div class="topic-metadata">

**Author:** [@cautionsaywhat](https://www.ruby-forum.com/u/cautionsaywhat)\
**Replies:** 1\
**Last updated:** [July 12, 2007, 3:10am UTC](https://www.ruby-forum.com/t/error/109135 "2007-07-12T03:10:06Z")

</div>

I am helping to write an event planning site, one part of which uses a live tree add-on. For some reason, instead of simply reloading the partial that contains the live tree, the site redirects to a NEW page with only…

---

## [RJS doesn't execute raw Javascript?](https://www.ruby-forum.com/t/rjs-doesnt-execute-raw-javascript/109046)

<div class="topic-metadata">

**Author:** [@stimpy](https://www.ruby-forum.com/u/stimpy)\
**Replies:** 12\
**Last updated:** [July 12, 2007, 1:16am UTC](https://www.ruby-forum.com/t/rjs-doesnt-execute-raw-javascript/109046 "2007-07-12T01:16:13Z")

</div>

I have an RJS script that renders a partial with some javacript that runs a calendar script. Basically: var cal\_#{id} = new CalendarPopup(); cal\_#{id}.setReturnFunction(“setMultipleCalDateValues\_#{id}”); But this do…

---

## [Filtering main 'list' page](https://www.ruby-forum.com/t/filtering-main-list-page/109143)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [July 12, 2007, 12:16am UTC](https://www.ruby-forum.com/t/filtering-main-list-page/109143 "2007-07-12T00:16:54Z")

</div>

Alright…I’m stuck again. I’d appreciate any help. I’m trying to ‘filter’ what is on my main page. I’m using Apache LDAP authentication and not the ror one…so my username is passed through using a variable. I’m tryi…

---

## [REST actions from e-mail links](https://www.ruby-forum.com/t/rest-actions-from-e-mail-links/108936)

<div class="topic-metadata">

**Author:** [@Brittain](https://www.ruby-forum.com/u/Brittain)\
**Replies:** 2\
**Last updated:** [July 12, 2007, 12:09am UTC](https://www.ruby-forum.com/t/rest-actions-from-e-mail-links/108936 "2007-07-12T00:09:53Z")

</div>

Simple question really, how do I invoke a non-GET REST action from a non-browser client, like an e-mail? In our rails 1.1.6 app, we have outbound e-mails that provide the reader several actions they can perform direct…

---

## [LiveTree in a partial error](https://www.ruby-forum.com/t/livetree-in-a-partial-error/109160)

<div class="topic-metadata">

**Author:** [@dustin](https://www.ruby-forum.com/u/dustin)\
**Replies:** 0\
**Last updated:** [July 11, 2007, 11:50pm UTC](https://www.ruby-forum.com/t/livetree-in-a-partial-error/109160 "2007-07-11T23:50:47Z")

</div>

Hello - I’m having a problem using the Live Tree plugin \[1\], which is designed to create an Ajax-based tree visualization of an acts\_as\_tree model. I am embedding the Live Tree in a partial \[id =‘goals’\], and it w…

---

## [Update\_attribute does an insert?](https://www.ruby-forum.com/t/update-attribute-does-an-insert/109152)

<div class="topic-metadata">

**Author:** [@mwalsh](https://www.ruby-forum.com/u/mwalsh)\
**Replies:** 2\
**Last updated:** [July 11, 2007, 11:43pm UTC](https://www.ruby-forum.com/t/update-attribute-does-an-insert/109152 "2007-07-11T23:43:46Z")

</div>

Hello, I am trying to update an integer value on a table using Rails, but it complains that I am violating a not-null constraint because I didn’t specify other attributes. My code is as follows: sup = Supplier.new su…

---

## [Windows development and Linux hosting](https://www.ruby-forum.com/t/windows-development-and-linux-hosting/109151)

<div class="topic-metadata">

**Author:** [@DBC\_User](https://www.ruby-forum.com/u/DBC_User)\
**Replies:** 2\
**Last updated:** [July 11, 2007, 11:40pm UTC](https://www.ruby-forum.com/t/windows-development-and-linux-hosting/109151 "2007-07-11T23:40:46Z")

</div>

Hi All, I am learning about the rails hosting in linux. My development environment is Windows, is there a way to convert the rails application from Windows to linux? I was unable to display my test rails page because…

---

## [RailsConf Europe Ticket for Sale](https://www.ruby-forum.com/t/railsconf-europe-ticket-for-sale/109157)

<div class="topic-metadata">

**Author:** [@jpigford](https://www.ruby-forum.com/u/jpigford)\
**Replies:** 0\
**Last updated:** [July 11, 2007, 11:32pm UTC](https://www.ruby-forum.com/t/railsconf-europe-ticket-for-sale/109157 "2007-07-11T23:32:45Z")

</div>

I recently won a free ticket to RailsConf Europe 2007 from the June Rails Hackfest (http://www.workingwithrails.com/hackfest/13-monthly- july-2-7/prizes). However, there is no way I am going to be able to get my passp…

---

## [How to detect RAILS\_ENV in pure js file?](https://www.ruby-forum.com/t/how-to-detect-rails-env-in-pure-js-file/109081)

<div class="topic-metadata">

**Author:** [@rainchen](https://www.ruby-forum.com/u/rainchen)\
**Replies:** 2\
**Last updated:** [July 11, 2007, 10:14pm UTC](https://www.ruby-forum.com/t/how-to-detect-rails-env-in-pure-js-file/109081 "2007-07-11T22:14:28Z")

</div>

I need to check Rails running environment type in a js file such as application.js. I can check that like " if RAILS\_ENV == ‘development’ …" in a .rb/.rhtml/.rjs,but I need to do the detection in a pure javascript f…

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

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