# Rails

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

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

---

## [GWT hosted mode (debug) and rails](https://www.ruby-forum.com/t/gwt-hosted-mode-debug-and-rails/122214)

<div class="topic-metadata">

**Author:** [@David\_Stubbs](https://www.ruby-forum.com/u/David_Stubbs)\
**Replies:** 0\
**Last updated:** [December 5, 2007, 5:00pm UTC](https://www.ruby-forum.com/t/gwt-hosted-mode-debug-and-rails/122214 "2007-12-05T17:00:05Z")

</div>

Hi all, First of all sorry about the double posting I thought it might be useful for both lists. We’ve have a project that’s moving on quite quickly now using GWT for display and Rails for the backend. Our applicatio…

---

## [Marshal data too short -- getting this all the time now](https://www.ruby-forum.com/t/marshal-data-too-short-getting-this-all-the-time-now/86722)

<div class="topic-metadata">

**Author:** [@jeffpritchard](https://www.ruby-forum.com/u/jeffpritchard)\
**Replies:** 9\
**Last updated:** [December 5, 2007, 4:51pm UTC](https://www.ruby-forum.com/t/marshal-data-too-short-getting-this-all-the-time-now/86722 "2007-12-05T16:51:07Z")

</div>

I’m getting this never before seen error quite a bit all of a sudden: marshal data too short It shows up as an application error just after a “stale\_session\_check” in the stack dump in the error log. Anybody know wha…

---

## [Newbie - One screen showing using three models](https://www.ruby-forum.com/t/newbie-one-screen-showing-using-three-models/122210)

<div class="topic-metadata">

**Author:** [@gorgeoussoul](https://www.ruby-forum.com/u/gorgeoussoul)\
**Replies:** 0\
**Last updated:** [December 5, 2007, 4:30pm UTC](https://www.ruby-forum.com/t/newbie-one-screen-showing-using-three-models/122210 "2007-12-05T16:30:41Z")

</div>

I have a screen for creating a Quote (new.rhtml in the views/quotes folder). That screen is based on the Quotes model (which holds all the general information about the quote ). I want to include tables of data from …

---

## [REST vs. legacy stuff with state in session?](https://www.ruby-forum.com/t/rest-vs-legacy-stuff-with-state-in-session/122205)

<div class="topic-metadata">

**Author:** [@Isak\_H](https://www.ruby-forum.com/u/Isak_H)\
**Replies:** 0\
**Last updated:** [December 5, 2007, 4:00pm UTC](https://www.ruby-forum.com/t/rest-vs-legacy-stuff-with-state-in-session/122205 "2007-12-05T16:00:39Z")

</div>

We currently use the session to keep track of which client is being worked on, but think our new rest interface should be stateless. Should I be redesigning our existing stuff to include client\_id in URLs where neces…

---

## [Split a class by extending it, with a condition](https://www.ruby-forum.com/t/split-a-class-by-extending-it-with-a-condition/122202)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 2\
**Last updated:** [December 5, 2007, 3:32pm UTC](https://www.ruby-forum.com/t/split-a-class-by-extending-it-with-a-condition/122202 "2007-12-05T15:32:11Z")

</div>

Let’s say i have a class with a lot of functionality, called Person. It happens that men and women are treated differently within my app and i’m sick of passing :condition =\> \["gender = ? ", F\] all the time for case…

---

## [Running php from RoR](https://www.ruby-forum.com/t/running-php-from-ror/122193)

<div class="topic-metadata">

**Author:** [@GPB](https://www.ruby-forum.com/u/GPB)\
**Replies:** 5\
**Last updated:** [December 5, 2007, 3:17pm UTC](https://www.ruby-forum.com/t/running-php-from-ror/122193 "2007-12-05T15:17:10Z")

</div>

Hello… I am trying to execute a php script from within rails. The action is triggered by a button. def load\_stock if result = system(‘php test.php’) flash\[:notice\] = result end end However, it keeps returning fal…

---

## [Web Service behind https](https://www.ruby-forum.com/t/web-service-behind-https/122162)

<div class="topic-metadata">

**Author:** [@paul](https://www.ruby-forum.com/u/paul)\
**Replies:** 1\
**Last updated:** [December 5, 2007, 2:55pm UTC](https://www.ruby-forum.com/t/web-service-behind-https/122162 "2007-12-05T14:55:25Z")

</div>

Hi, I’m trying to create a web service that runs on https (i.e ssl). I have install the ssl\_requirement plugin and in my webservice controller I have the lines ssl\_required :method\_name In development I had this co…

---

## [ReST PUT with multiple records](https://www.ruby-forum.com/t/rest-put-with-multiple-records/118584)

<div class="topic-metadata">

**Author:** [@magpie](https://www.ruby-forum.com/u/magpie)\
**Replies:** 5\
**Last updated:** [December 5, 2007, 2:43pm UTC](https://www.ruby-forum.com/t/rest-put-with-multiple-records/118584 "2007-12-05T14:43:37Z")

</div>

I’m writing a Flex/ReST/Rails app and I currently do a GET on /customers/123/licences.xml to get the licences for customer 123. This works fine. Now, after updating one or more licences, I wish to update (PUT) the lic…

---

## [Seeking Rails Developer](https://www.ruby-forum.com/t/seeking-rails-developer/122199)

<div class="topic-metadata">

**Author:** [@Azri\_Careers](https://www.ruby-forum.com/u/Azri_Careers)\
**Replies:** 0\
**Last updated:** [December 5, 2007, 2:03pm UTC](https://www.ruby-forum.com/t/seeking-rails-developer/122199 "2007-12-05T14:03:43Z")

</div>

Is your passion for Open Source software stronger than the evil organizational forces (aka workplace idiosyncrasies) which try to blunt your effectiveness? Do you yearn for the freedom to truly contribute as per your …

---

## [How to host Ruby On Rails on shared hosting](https://www.ruby-forum.com/t/how-to-host-ruby-on-rails-on-shared-hosting/122181)

<div class="topic-metadata">

**Author:** [@ror-user](https://www.ruby-forum.com/u/ror-user)\
**Replies:** 5\
**Last updated:** [December 5, 2007, 1:30pm UTC](https://www.ruby-forum.com/t/how-to-host-ruby-on-rails-on-shared-hosting/122181 "2007-12-05T13:30:09Z")

</div>

Hi all, I am not able to deploy my site on shared hosting. I have created a database there uploaded the files but not able to access them. I have also freeze the rails gems. Please tell me the steps to host a rails …

---

## [Where to put code for all methods in a Controller](https://www.ruby-forum.com/t/where-to-put-code-for-all-methods-in-a-controller/122187)

<div class="topic-metadata">

**Author:** [@raimon](https://www.ruby-forum.com/u/raimon)\
**Replies:** 4\
**Last updated:** [December 5, 2007, 1:15pm UTC](https://www.ruby-forum.com/t/where-to-put-code-for-all-methods-in-a-controller/122187 "2007-12-05T13:15:57Z")

</div>

Hello, I’m using this in almost all methods of my Customer Controler if params\[:type\]==‘in’ # handle incoming customers kind = ::KIND\_CUSTOMER else # handle outgoing customers kind = ::KIND\_SUPPLIER end I don’t …

---

## [Weird bug with date\_select](https://www.ruby-forum.com/t/weird-bug-with-date-select/121683)

<div class="topic-metadata">

**Author:** [@amitre](https://www.ruby-forum.com/u/amitre)\
**Replies:** 3\
**Last updated:** [December 5, 2007, 12:26pm UTC](https://www.ruby-forum.com/t/weird-bug-with-date-select/121683 "2007-12-05T12:26:43Z")

</div>

Hi Folks, I’m having such a weird problem with the DateHelper. Here is how I’m using it, from the view: Birth date \<%= x.date\_select(:birth\_date, :start\_year =\> 1900) %\> x is the variable that is being yield from a …

---

## [Encrypting application source code](https://www.ruby-forum.com/t/encrypting-application-source-code/122077)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 6\
**Last updated:** [December 5, 2007, 12:07pm UTC](https://www.ruby-forum.com/t/encrypting-application-source-code/122077 "2007-12-05T12:07:16Z")

</div>

Hi, I would like to secure my Rails app source code because we have a complex application and we install it on our customer sites. It is in our company’s best interest to keep the source code secure since we have inv…

---

## [Sytanx question](https://www.ruby-forum.com/t/sytanx-question/122179)

<div class="topic-metadata">

**Author:** [@wrb](https://www.ruby-forum.com/u/wrb)\
**Replies:** 3\
**Last updated:** [December 5, 2007, 11:55am UTC](https://www.ruby-forum.com/t/sytanx-question/122179 "2007-12-05T11:55:30Z")

</div>

in a template file login.rhtml: \<%= form.password\_field :password, :size =\> 40 %\> and i get this error: undefined method \`password’ for #\<User:0x47e5bcc what is this supposed to mean? and somebody please explain thi…

---

## [Date Issues + Oracle + RoR](https://www.ruby-forum.com/t/date-issues-oracle-ror/119032)

<div class="topic-metadata">

**Author:** [@Bala](https://www.ruby-forum.com/u/Bala)\
**Replies:** 3\
**Last updated:** [December 5, 2007, 10:55am UTC](https://www.ruby-forum.com/t/date-issues-oracle-ror/119032 "2007-12-05T10:55:49Z")

</div>

Hi Experts I’ve a product like this ID -\> 1 Name -\> Xyz Price -\> 30 Created\_at -\> 02-NOV-07 from\_date = Date.new(2, 10, 07) to\_date = Date.new(2, 10, 07) @product = Product.find\_by\_sql(“select \* from produc…

---

## [ActiveSupport::JSON::CircularReferenceError in InvoiceContro](https://www.ruby-forum.com/t/activesupport-circularreferenceerror-in-invoicecontro/122116)

<div class="topic-metadata">

**Author:** [@raimon](https://www.ruby-forum.com/u/raimon)\
**Replies:** 2\
**Last updated:** [December 5, 2007, 9:30am UTC](https://www.ruby-forum.com/t/activesupport-circularreferenceerror-in-invoicecontro/122116 "2007-12-05T09:30:57Z")

</div>

Hello again, I’m trying to use a grid control from EXTjs with RoR, and I’m following some exampe I found on the web, and adapting to my test database … I can’t see any row, the grid is only a poor line, I use other ex…

---

## [Strange problem on "xhr" and "xml\_http\_request"](https://www.ruby-forum.com/t/strange-problem-on-xhr-and-xml-http-request/122177)

<div class="topic-metadata">

**Author:** [@jan](https://www.ruby-forum.com/u/jan)\
**Replies:** 0\
**Last updated:** [December 5, 2007, 9:25am UTC](https://www.ruby-forum.com/t/strange-problem-on-xhr-and-xml-http-request/122177 "2007-12-05T09:25:34Z")

</div>

Hi, I’m learning the integration test framework of rails, it’s definitely great! But when I tried to use xml\_http\_request’s alias xhr, test broken … If I wrote xml\_http\_request :post, “/store/add\_to\_cart”, :id =\> ru…

---

## [Forum in Rail--Acts\_as\_Tree?](https://www.ruby-forum.com/t/forum-in-rail-acts-as-tree/122169)

<div class="topic-metadata">

**Author:** [@yachtman](https://www.ruby-forum.com/u/yachtman)\
**Replies:** 3\
**Last updated:** [December 5, 2007, 8:03am UTC](https://www.ruby-forum.com/t/forum-in-rail-acts-as-tree/122169 "2007-12-05T08:03:39Z")

</div>

Working on a forum in rails, but I am stumped on the storing/ retrieving of forum posts. Using Acts\_as\_Tree, but can’t figure out how to query my model to get a list of the most recent posts in every thread. Model Po…

---

## [How to fill select box with the names of the states corresponding to the country name selected in d](https://www.ruby-forum.com/t/how-to-fill-select-box-with-the-names-of-the-states-corresponding-to-the-country-name-selected-in-d/121972)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 6\
**Last updated:** [December 5, 2007, 7:57am UTC](https://www.ruby-forum.com/t/how-to-fill-select-box-with-the-names-of-the-states-corresponding-to-the-country-name-selected-in-d/121972 "2007-12-05T07:57:38Z")

</div>

hi all , can any body guide me, i have to fill the dropdown box with the name of the states of the country at run time which is dependent on the name of the country you selected. is their any helper exists for this. …

---

## [Help with nested resource](https://www.ruby-forum.com/t/help-with-nested-resource/77777)

<div class="topic-metadata">

**Author:** [@zanoni](https://www.ruby-forum.com/u/zanoni)\
**Replies:** 19\
**Last updated:** [December 5, 2007, 6:40am UTC](https://www.ruby-forum.com/t/help-with-nested-resource/77777 "2007-12-05T06:40:04Z")

</div>

I was talking about this problem on here about a week ago, and then had to break off from working on it. Returning again. I’m having an issue with a show action on a nested resource (REST based controllers). The ma…

---

## [Sessions](https://www.ruby-forum.com/t/sessions/122165)

<div class="topic-metadata">

**Author:** [@bernee](https://www.ruby-forum.com/u/bernee)\
**Replies:** 11\
**Last updated:** [December 5, 2007, 6:38am UTC](https://www.ruby-forum.com/t/sessions/122165 "2007-12-05T06:38:19Z")

</div>

I’m trying to make it so each user can only vote once. By making an if statement in the view that looks at the boolean of session\[:voted\] and then decides weather to display the content. However, the problem is the bo…

---

## [Error while running ruby script/server](https://www.ruby-forum.com/t/error-while-running-ruby-script-server/122168)

<div class="topic-metadata">

**Author:** [@syed](https://www.ruby-forum.com/u/syed)\
**Replies:** 2\
**Last updated:** [December 5, 2007, 6:28am UTC](https://www.ruby-forum.com/t/error-while-running-ruby-script-server/122168 "2007-12-05T06:28:23Z")

</div>

I ran the same command in my other project and the server started without any errors but when I created a new project, I am getting the following error. I would appreciate any pointers. Thanks Syed D:\\AddressBook\>ru…

---

## [Layouts](https://www.ruby-forum.com/t/layouts/122170)

<div class="topic-metadata">

**Author:** [@bernee](https://www.ruby-forum.com/u/bernee)\
**Replies:** 4\
**Last updated:** [December 5, 2007, 6:12am UTC](https://www.ruby-forum.com/t/layouts/122170 "2007-12-05T06:12:00Z")

</div>

I want to display the top three schools (in @top\_schools array) in my view which is in a column on the left on the site. This is the same for all views and all controllers so naturally it’s in the layout file in the p…

---

## [:through not working as I expected](https://www.ruby-forum.com/t/through-not-working-as-i-expected/122061)

<div class="topic-metadata">

**Author:** [@ayyanar](https://www.ruby-forum.com/u/ayyanar)\
**Replies:** 2\
**Last updated:** [December 5, 2007, 5:59am UTC](https://www.ruby-forum.com/t/through-not-working-as-i-expected/122061 "2007-12-05T05:59:03Z")

</div>

class Task \< ActiveRecord::Base belongs\_to :court has\_many :workflow\_tasks has\_many :task\_users, :dependent =\> :destroy has\_many :court\_users, :through =\> :task\_users has\_many :users, :through =\> :court…

---

## [Cannot get simple search by date to work with will\_paginate](https://www.ruby-forum.com/t/cannot-get-simple-search-by-date-to-work-with-will-paginate/111584)

<div class="topic-metadata">

**Author:** [@jko170](https://www.ruby-forum.com/u/jko170)\
**Replies:** 6\
**Last updated:** [December 5, 2007, 5:37am UTC](https://www.ruby-forum.com/t/cannot-get-simple-search-by-date-to-work-with-will-paginate/111584 "2007-12-05T05:37:07Z")

</div>

View: \<% form\_tag attendances\_path, :method =\> ‘get’ do %\> Search attendances by date: \<%= date\_select :search, params\[:search\], :use\_short\_month =\> true, :order =\> \[:month, :day, :year\] %\> \<%= submit\_tag 'Se…

---

## [Can RoR do everything that PHP can do?](https://www.ruby-forum.com/t/can-ror-do-everything-that-php-can-do/122091)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 17\
**Last updated:** [December 5, 2007, 5:21am UTC](https://www.ruby-forum.com/t/can-ror-do-everything-that-php-can-do/122091 "2007-12-05T05:21:57Z")

</div>

I have been wanting to learn PHP for a while and now that I am a RoR programmer I just wondering if it is worth it? Also, is there any thing that I can do in PHP that I can’t do (or do very well) in RoR? and vice-vers…

---

## [More Training Demo's](https://www.ruby-forum.com/t/more-training-demos/122171)

<div class="topic-metadata">

**Author:** [@gemblon](https://www.ruby-forum.com/u/gemblon)\
**Replies:** 0\
**Last updated:** [December 5, 2007, 5:20am UTC](https://www.ruby-forum.com/t/more-training-demos/122171 "2007-12-05T05:20:16Z")

</div>

I keep finding more and more ruby/rails training demo’s. it is pretty awesome. while a video is nice, it is hard if you have to take notes. and some are out-dated. but it is really cool there are so many. on NETBEA…

---

## [Extra SQL calls invoked using paginate](https://www.ruby-forum.com/t/extra-sql-calls-invoked-using-paginate/122153)

<div class="topic-metadata">

**Author:** [@mcarlson](https://www.ruby-forum.com/u/mcarlson)\
**Replies:** 1\
**Last updated:** [December 5, 2007, 1:13am UTC](https://www.ruby-forum.com/t/extra-sql-calls-invoked-using-paginate/122153 "2007-12-05T01:13:29Z")

</div>

I am using the paginate helper method to retrieve data from 2 tables. Here is a sample of what the call looks like: @paginator, @entries = paginate(:model\_name, :include =\> ‘another\_model\_name’, :conditions =\> conditi…

---

## [When to save, session reflect saves?](https://www.ruby-forum.com/t/when-to-save-session-reflect-saves/122136)

<div class="topic-metadata">

**Author:** [@tomn](https://www.ruby-forum.com/u/tomn)\
**Replies:** 5\
**Last updated:** [December 5, 2007, 1:10am UTC](https://www.ruby-forum.com/t/when-to-save-session-reflect-saves/122136 "2007-12-05T01:10:33Z")

</div>

I am trying to clean up unnecessary lines (even as I hack my way forward adding more garbage) I have two questions on lines I have trying to keep the database and session info reflecting changes: def associate\_pupil\_…

---

## [Multipart post/update without form view](https://www.ruby-forum.com/t/multipart-post-update-without-form-view/122159)

<div class="topic-metadata">

**Author:** [@nextpulse](https://www.ruby-forum.com/u/nextpulse)\
**Replies:** 0\
**Last updated:** [December 5, 2007, 1:00am UTC](https://www.ruby-forum.com/t/multipart-post-update-without-form-view/122159 "2007-12-05T01:00:00Z")

</div>

I am using attachment\_fu and want to do an update to an attachment. def update … attachment.update\_attributes(params\[:photo\]) … end this works fine for a form post to action update But I want to do this in the con…

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

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