# Rails

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

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

---

## [Some new projects](https://www.ruby-forum.com/t/some-new-projects/134980)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 2\
**Last updated:** [April 16, 2008, 9:11pm UTC](https://www.ruby-forum.com/t/some-new-projects/134980 "2008-04-16T21:11:15Z")

</div>

I am working on \[and will someday release\] a couple of plugins, in case anybody wanted to use them before release. So this is a pre-release notice :slight\_smile: a natural language query helper ex: School.where ‘…

---

## [Legacy DB table with double primary key](https://www.ruby-forum.com/t/legacy-db-table-with-double-primary-key/134912)

<div class="topic-metadata">

**Author:** [@Jeffrey\_LSTaylor](https://www.ruby-forum.com/u/Jeffrey_LSTaylor)\
**Replies:** 2\
**Last updated:** [April 16, 2008, 9:07pm UTC](https://www.ruby-forum.com/t/legacy-db-table-with-double-primary-key/134912 "2008-04-16T21:07:04Z")

</div>

I have a legacy MySQL table with a double key: describe amethyst\_development.dspam\_token\_data; ±--------------±---------------------±-----±----±-----------±------+ | Field | Type | Null | Key |…

---

## [Tutorial and Rails 2.0](https://www.ruby-forum.com/t/tutorial-and-rails-2-0/134970)

<div class="topic-metadata">

**Author:** [@kellygreer1](https://www.ruby-forum.com/u/kellygreer1)\
**Replies:** 1\
**Last updated:** [April 16, 2008, 6:58pm UTC](https://www.ruby-forum.com/t/tutorial-and-rails-2-0/134970 "2008-04-16T18:58:56Z")

</div>

Can someone help me over this last roadblock… I’m working through the tutorial above in Rails 2.0 http://www.netbeans.org/kb/60/ruby/model.html And when I make it to step: “Code Sample 5: post\_comment action” I can …

---

## [Urgent Need For Ruby on Rails Developer - Los Angeles, CA](https://www.ruby-forum.com/t/urgent-need-for-ruby-on-rails-developer-los-angeles-ca/134901)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 6\
**Last updated:** [April 16, 2008, 6:52pm UTC](https://www.ruby-forum.com/t/urgent-need-for-ruby-on-rails-developer-los-angeles-ca/134901 "2008-04-16T18:52:23Z")

</div>

Hello Team This is an urgent requirement for 3 Engineers with expertise on Ruby on Rails (Language) Developer. Location: Los A., CA Duration: 1 year No. of Positions: 3 Job Description Resource should be able to h…

---

## [QUICK QUESTION: Run a Ruby File inside of Model](https://www.ruby-forum.com/t/quick-question-run-a-ruby-file-inside-of-model/134960)

<div class="topic-metadata">

**Author:** [@joep](https://www.ruby-forum.com/u/joep)\
**Replies:** 2\
**Last updated:** [April 16, 2008, 6:20pm UTC](https://www.ruby-forum.com/t/quick-question-run-a-ruby-file-inside-of-model/134960 "2008-04-16T18:20:10Z")

</div>

Hi, I’m trying to run a ruby file in lib from inside of a model. How can I run a ruby file from inside of a model? In this example, Thing.rb is my model. I’m trying to run do\_update.rb. How can I call this from ins…

---

## [Instance variable in controller -\> views with RJS?](https://www.ruby-forum.com/t/instance-variable-in-controller-views-with-rjs/134919)

<div class="topic-metadata">

**Author:** [@alais](https://www.ruby-forum.com/u/alais)\
**Replies:** 9\
**Last updated:** [April 16, 2008, 6:06pm UTC](https://www.ruby-forum.com/t/instance-variable-in-controller-views-with-rjs/134919 "2008-04-16T18:06:34Z")

</div>

Hi everyone, This should be pretty simple… If you have an instance variable in a controller passed to its view, and you have \<% form\_remote\_tag :url =\> { :action =\> ‘other\_action’ } do -%\> etc \<% end %\>, can you acce…

---

## [Missing images cause routing errors?](https://www.ruby-forum.com/t/missing-images-cause-routing-errors/134953)

<div class="topic-metadata">

**Author:** [@Yuval](https://www.ruby-forum.com/u/Yuval)\
**Replies:** 1\
**Last updated:** [April 16, 2008, 6:04pm UTC](https://www.ruby-forum.com/t/missing-images-cause-routing-errors/134953 "2008-04-16T18:04:13Z")

</div>

Dear folks. I recently discovered that I get nasty RoutingError exceptions any time I refer to an image that doesn’t exist (whether I use an html img tag or an image\_tag helper). Now obviously, I shouldn’t be pointing…

---

## [Has\_two, has\_three, etc](https://www.ruby-forum.com/t/has-two-has-three-etc/134956)

<div class="topic-metadata">

**Author:** [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Replies:** 4\
**Last updated:** [April 16, 2008, 5:58pm UTC](https://www.ruby-forum.com/t/has-two-has-three-etc/134956 "2008-04-16T17:58:51Z")

</div>

I was wondering what the community thought about an extension to the associations mechanism which allowed declarations like: class Game \< AR::Base has\_two :referees end I have run across this situation fairly freque…

---

## [Rails Transactions](https://www.ruby-forum.com/t/rails-transactions/134405)

<div class="topic-metadata">

**Author:** [@MohsinHijazee](https://www.ruby-forum.com/u/MohsinHijazee)\
**Replies:** 5\
**Last updated:** [April 16, 2008, 5:56pm UTC](https://www.ruby-forum.com/t/rails-transactions/134405 "2008-04-16T17:56:48Z")

</div>

Hi! I am confused about Rails transactions… Look at the following code: CODE BEGINS def save\_instances(entity\_id, instance\_resources) # This contains the instance ids of the newly created instances instance\_ids = \[\] …

---

## [Hi,about session\_path variable](https://www.ruby-forum.com/t/hi-about-session-path-variable/131784)

<div class="topic-metadata">

**Author:** [@Vincent.Z](https://www.ruby-forum.com/u/Vincent.Z)\
**Replies:** 4\
**Last updated:** [April 16, 2008, 5:17pm UTC](https://www.ruby-forum.com/t/hi-about-session-path-variable/131784 "2008-04-16T17:17:55Z")

</div>

i use the restful\_authentication plugin,i found one line in new.html.erb file as following: \<% form\_for session\_path do -%\> the session\_path is a variable? i can not find anything definition about it. thanks a lot!

---

## [In-line editing support for a table of data? sample code?](https://www.ruby-forum.com/t/in-line-editing-support-for-a-table-of-data-sample-code/134952)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 1\
**Last updated:** [April 16, 2008, 4:40pm UTC](https://www.ruby-forum.com/t/in-line-editing-support-for-a-table-of-data-sample-code/134952 "2008-04-16T16:40:54Z")

</div>

Hi, Does anyone have some sample code for implementing in-line editing support for a table of data? I’m after a user experience for the editing of the data in the table like google spreadsheets, where there is no ad…

---

## [AR association question](https://www.ruby-forum.com/t/ar-association-question/134894)

<div class="topic-metadata">

**Author:** [@sjglazer](https://www.ruby-forum.com/u/sjglazer)\
**Replies:** 4\
**Last updated:** [April 16, 2008, 4:16pm UTC](https://www.ruby-forum.com/t/ar-association-question/134894 "2008-04-16T16:16:08Z")

</div>

Hi there, I have a favorites table in my DB that has a user\_id and restaurant\_id columns. In my restaurant controller I have a user ID and need to get all the restaurants that the user has marked as favorites. I woul…

---

## [In\_place\_editor & security](https://www.ruby-forum.com/t/in-place-editor-security/134954)

<div class="topic-metadata">

**Author:** [@thorsten](https://www.ruby-forum.com/u/thorsten)\
**Replies:** 1\
**Last updated:** [April 16, 2008, 4:05pm UTC](https://www.ruby-forum.com/t/in-place-editor-security/134954 "2008-04-16T16:05:18Z")

</div>

I’m refactoring an app that uses in\_place\_edit\_for the controller code looks like: Address.content\_columns.each do |column| in\_place\_edit\_for :address, column.name end new Ajax.InPlaceEditor(‘address\_street\_1234\_in\_…

---

## [Need to browse a DAG](https://www.ruby-forum.com/t/need-to-browse-a-dag/134939)

<div class="topic-metadata">

**Author:** [@Shashaxe](https://www.ruby-forum.com/u/Shashaxe)\
**Replies:** 2\
**Last updated:** [April 16, 2008, 4:04pm UTC](https://www.ruby-forum.com/t/need-to-browse-a-dag/134939 "2008-04-16T16:04:08Z")

</div>

Has anyone written a plugin to read a DAG (Directed Acyclic graph)? Basically, thinking of implementing a DAG for my project. This DAG would be tracking the life cycle of say a product through it’s versions. Would lik…

---

## [Top 3 Style](https://www.ruby-forum.com/t/top-3-style/134938)

<div class="topic-metadata">

**Author:** [@3quid](https://www.ruby-forum.com/u/3quid)\
**Replies:** 3\
**Last updated:** [April 16, 2008, 4:00pm UTC](https://www.ruby-forum.com/t/top-3-style/134938 "2008-04-16T16:00:02Z")

</div>

Hi, I’m using a bog standard .find(:all) in my controller which the \<% for %\> loop in my view then displays the results of. How can I apply a different css style (class or id) to the first result that my view returns…

---

## [Remove Gmap marker using YM4R](https://www.ruby-forum.com/t/remove-gmap-marker-using-ym4r/134950)

<div class="topic-metadata">

**Author:** [@kamhei82](https://www.ruby-forum.com/u/kamhei82)\
**Replies:** 0\
**Last updated:** [April 16, 2008, 3:24pm UTC](https://www.ruby-forum.com/t/remove-gmap-marker-using-ym4r/134950 "2008-04-16T15:24:30Z")

</div>

Hello, I’m using http://ym4r.rubyforge.org and I have a problem with removing existing marker. I tried this (.rjs file): if @params\[:gobject\] == "on" @gobject\_results.each {|marker| page \<\< @map.addOverlay(marker)} …

---

## [Trouble streaming images with send\_data](https://www.ruby-forum.com/t/trouble-streaming-images-with-send-data/134881)

<div class="topic-metadata">

**Author:** [@jlesleyball](https://www.ruby-forum.com/u/jlesleyball)\
**Replies:** 4\
**Last updated:** [April 16, 2008, 2:46pm UTC](https://www.ruby-forum.com/t/trouble-streaming-images-with-send-data/134881 "2008-04-16T14:46:46Z")

</div>

Hi I’m doing some server-side graphics with Java2D and I’m trying to stream the resulting image to the browser using send\_data. When I try to view the image that I streamed, the browser just shows the URL in the wind…

---

## [How to configure rails app on non default port 443](https://www.ruby-forum.com/t/how-to-configure-rails-app-on-non-default-port-443/134948)

<div class="topic-metadata">

**Author:** [@slonghurst](https://www.ruby-forum.com/u/slonghurst)\
**Replies:** 0\
**Last updated:** [April 16, 2008, 2:42pm UTC](https://www.ruby-forum.com/t/how-to-configure-rails-app-on-non-default-port-443/134948 "2008-04-16T14:42:47Z")

</div>

I have a situation where i need to run name based virtual hosts in apache as I only have one IP address, but have a couple of rails sites. I have configured both successfully apart from the ssl side of things. Now i k…

---

## [Google Calendar API](https://www.ruby-forum.com/t/google-calendar-api/134383)

<div class="topic-metadata">

**Author:** [@vanderkerkoff](https://www.ruby-forum.com/u/vanderkerkoff)\
**Replies:** 5\
**Last updated:** [April 16, 2008, 12:00pm UTC](https://www.ruby-forum.com/t/google-calendar-api/134383 "2008-04-16T12:00:42Z")

</div>

Hello everyone Does anyone have any experience of accessing the Google C. API with Rails? I’m using Ben’s page as a starting point. I’ve installed the libraries but I can get data, I can add data, good start. I’m…

---

## [About getting webservice from other website](https://www.ruby-forum.com/t/about-getting-webservice-from-other-website/134929)

<div class="topic-metadata">

**Author:** [@daociyiyou](https://www.ruby-forum.com/u/daociyiyou)\
**Replies:** 2\
**Last updated:** [April 16, 2008, 11:20am UTC](https://www.ruby-forum.com/t/about-getting-webservice-from-other-website/134929 "2008-04-16T11:20:29Z")

</div>

I have a webservice offered by a website to be integrated for my website.They ask me to follow three steps to finish integrating.These steps are: Create an HTTP connection. Send request parameters via POST method. Pa…

---

## [.htaccess to pass/ignore directory](https://www.ruby-forum.com/t/htaccess-to-pass-ignore-directory/134903)

<div class="topic-metadata">

**Author:** [@karlshea](https://www.ruby-forum.com/u/karlshea)\
**Replies:** 4\
**Last updated:** [April 16, 2008, 10:00am UTC](https://www.ruby-forum.com/t/htaccess-to-pass-ignore-directory/134903 "2008-04-16T10:00:45Z")

</div>

I have a subdomain, blog.mysite.com, that points to /home/myname/ public\_html/blog My rails app sits at /home/myname/myrailsapp I have a symlink from /home/myname/public\_html → /home/myname/ myrailsapp/public And an…

---

## [AR - Delete m:n Associations when deleting Record](https://www.ruby-forum.com/t/ar-delete-m-n-associations-when-deleting-record/134927)

<div class="topic-metadata">

**Author:** [@sealedsun](https://www.ruby-forum.com/u/sealedsun)\
**Replies:** 1\
**Last updated:** [April 16, 2008, 9:52am UTC](https://www.ruby-forum.com/t/ar-delete-m-n-associations-when-deleting-record/134927 "2008-04-16T09:52:32Z")

</div>

Hey! I have three tables in my DB users \<–\> users\_courses \<–\> courses users and courses are m:n related: User: has\_many :courses, :through =\> :user\_courses Course has\_many :users, :through =\> :user\_courses I want…

---

## [Help - Script this?](https://www.ruby-forum.com/t/help-script-this/134884)

<div class="topic-metadata">

**Author:** [@JhanaWeb](https://www.ruby-forum.com/u/JhanaWeb)\
**Replies:** 2\
**Last updated:** [April 16, 2008, 8:29am UTC](https://www.ruby-forum.com/t/help-script-this/134884 "2008-04-16T08:29:24Z")

</div>

Hi all, Ruby N. here… I am working on my first problem space with ruby and I am trying to write a script that will automate this task, I also use workspace macro pro, but it is finicky sometimes. If anyone thinks th…

---

## [Tough modeling problem](https://www.ruby-forum.com/t/tough-modeling-problem/134888)

<div class="topic-metadata">

**Author:** [@Jables](https://www.ruby-forum.com/u/Jables)\
**Replies:** 5\
**Last updated:** [April 16, 2008, 7:31am UTC](https://www.ruby-forum.com/t/tough-modeling-problem/134888 "2008-04-16T07:31:35Z")

</div>

I have what I think is a fairly complex modeling problem for you guys. So I have a user class. There are three link type classes: picture, video, and story. A user can vote, bookmark, and add any of those types. Es…

---

## [Value as variable](https://www.ruby-forum.com/t/value-as-variable/134924)

<div class="topic-metadata">

**Author:** [@rushnosh](https://www.ruby-forum.com/u/rushnosh)\
**Replies:** 1\
**Last updated:** [April 16, 2008, 7:28am UTC](https://www.ruby-forum.com/t/value-as-variable/134924 "2008-04-16T07:28:04Z")

</div>

a = “first” b = “last” i want to do my\_array.a or my\_array.b how would i do this? instead of doing but to get the same result my\_array.frist my\_array.last

---

## [Polymorphic associations on models with many names](https://www.ruby-forum.com/t/polymorphic-associations-on-models-with-many-names/134926)

<div class="topic-metadata">

**Author:** [@harry](https://www.ruby-forum.com/u/harry)\
**Replies:** 0\
**Last updated:** [April 16, 2008, 7:21am UTC](https://www.ruby-forum.com/t/polymorphic-associations-on-models-with-many-names/134926 "2008-04-16T07:21:38Z")

</div>

Hi, I’ve got Itineraries, Stops (join model), and Locations. I’d like to be able to do Itinerary.locations.find\_by\_name(:name) but Locations can have one of several types (Museum, Restaurant, Bar, Train Station, etc)…

---

## [Help me create primary\_key with ActiveRecord::Migration](https://www.ruby-forum.com/t/help-me-create-primary-key-with-activerecord-migration/134812)

<div class="topic-metadata">

**Author:** [@sumo](https://www.ruby-forum.com/u/sumo)\
**Replies:** 3\
**Last updated:** [April 16, 2008, 7:08am UTC](https://www.ruby-forum.com/t/help-me-create-primary-key-with-activerecord-migration/134812 "2008-04-16T07:08:11Z")

</div>

I have two tables books and categories. I create a join table books\_categories. Now how to create couple primary key(book\_id,category\_id) class BooksCategories \< ActiveRecord::Migration def self.up create\_table :boo…

---

## [Determining is a Partial is Rendering](https://www.ruby-forum.com/t/determining-is-a-partial-is-rendering/134857)

<div class="topic-metadata">

**Author:** [@andrew4ta](https://www.ruby-forum.com/u/andrew4ta)\
**Replies:** 1\
**Last updated:** [April 16, 2008, 6:48am UTC](https://www.ruby-forum.com/t/determining-is-a-partial-is-rendering/134857 "2008-04-16T06:48:50Z")

</div>

Is there a way to determine if the current render cycle is for a partial? I have an exception handler setup, but I’d like to re-throw the exception if it is thrown while rendering a partial. Thanks for any advice, A…

---

## [Version Control (and gems)](https://www.ruby-forum.com/t/version-control-and-gems/134864)

<div class="topic-metadata">

**Author:** [@namealreadytaken](https://www.ruby-forum.com/u/namealreadytaken)\
**Replies:** 4\
**Last updated:** [April 16, 2008, 6:43am UTC](https://www.ruby-forum.com/t/version-control-and-gems/134864 "2008-04-16T06:43:59Z")

</div>

Full version control of a web app would include the constellation of gems actually used. I can do ‘gem list’ and put that into a file in version control but that could include unused gems. That is, it could include…

---

## [\[ANN\] Just-remind.us](https://www.ruby-forum.com/t/ann-just-remind-us/134916)

<div class="topic-metadata">

**Author:** [@Vinicius\_Manhaes\_Te](https://www.ruby-forum.com/u/Vinicius_Manhaes_Te)\
**Replies:** 0\
**Last updated:** [April 16, 2008, 5:39am UTC](https://www.ruby-forum.com/t/ann-just-remind-us/134916 "2008-04-16T05:39:50Z")

</div>

A couple of weeks ago I asked for help to find a word to represent “group” in a Rails app I was developing with some friends. The application was released today: http://just-remind.us Just-remind.us is a free app tha…

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

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