# Rails

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

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

---

## [Sql count if user\_id exists in 2 tables](https://www.ruby-forum.com/t/sql-count-if-user-id-exists-in-2-tables/145039)

<div class="topic-metadata">

**Author:** [@srinathbtech](https://www.ruby-forum.com/u/srinathbtech)\
**Replies:** 0\
**Last updated:** [August 5, 2008, 3:09pm UTC](https://www.ruby-forum.com/t/sql-count-if-user-id-exists-in-2-tables/145039 "2008-08-05T15:09:11Z")

</div>

Hi, i want a query where there were two tables called nutrition\_trackers fitness\_trackers id user\_id updated\_at id user\_id workout\_day 1 2 2008-02-20 1 …

---

## [Passing arguments to your own generator](https://www.ruby-forum.com/t/passing-arguments-to-your-own-generator/145037)

<div class="topic-metadata">

**Author:** [@kirankinuforu](https://www.ruby-forum.com/u/kirankinuforu)\
**Replies:** 0\
**Last updated:** [August 5, 2008, 3:05pm UTC](https://www.ruby-forum.com/t/passing-arguments-to-your-own-generator/145037 "2008-08-05T15:05:20Z")

</div>

Hi, I want to create my own generator, I know how to pass the file\_name at command prompt for the generator. I need help for passing and receiving other arguments to the generator. For example ruby script/generate g…

---

## [Another newbie - how to save related data?](https://www.ruby-forum.com/t/another-newbie-how-to-save-related-data/144660)

<div class="topic-metadata">

**Author:** [@gwendydd](https://www.ruby-forum.com/u/gwendydd)\
**Replies:** 19\
**Last updated:** [August 5, 2008, 2:56pm UTC](https://www.ruby-forum.com/t/another-newbie-how-to-save-related-data/144660 "2008-08-05T14:56:03Z")

</div>

Hello! This has got to be one of those easy and obvious things, but I’ve been beating my head against it for two days now, and can’t figure it out. I’m following the tutorial at Ruby on Rails 2.1 Tutorial | Tutorial…

---

## [Link\_to problem](https://www.ruby-forum.com/t/link-to-problem/144990)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 5\
**Last updated:** [August 5, 2008, 2:16pm UTC](https://www.ruby-forum.com/t/link-to-problem/144990 "2008-08-05T14:16:47Z")

</div>

\<%= link\_to “New”, { :controller =\> :threads, :action=\>:new\_requirement } %\> When I click on the link it displays the error page: Unknown action No action responded to show Why is this? Thanks!

---

## [Export](https://www.ruby-forum.com/t/export/145030)

<div class="topic-metadata">

**Author:** [@sumitha](https://www.ruby-forum.com/u/sumitha)\
**Replies:** 1\
**Last updated:** [August 5, 2008, 1:14pm UTC](https://www.ruby-forum.com/t/export/145030 "2008-08-05T13:14:09Z")

</div>

Hi all, how to export the database values into xls sheet

---

## [How to configure](https://www.ruby-forum.com/t/how-to-configure/145028)

<div class="topic-metadata">

**Author:** [@bond](https://www.ruby-forum.com/u/bond)\
**Replies:** 0\
**Last updated:** [August 5, 2008, 12:30pm UTC](https://www.ruby-forum.com/t/how-to-configure/145028 "2008-08-05T12:30:50Z")

</div>

please help me How to configure rubyon rails in nginx web server on windows xp machine.any body tell me how to configure or any links.

---

## [Updates to an ActiveResource model](https://www.ruby-forum.com/t/updates-to-an-activeresource-model/145025)

<div class="topic-metadata">

**Author:** [@stevel](https://www.ruby-forum.com/u/stevel)\
**Replies:** 0\
**Last updated:** [August 5, 2008, 11:46am UTC](https://www.ruby-forum.com/t/updates-to-an-activeresource-model/145025 "2008-08-05T11:46:20Z")

</div>

I have a front end Rails 2.1 app which makes ActiveResource model calls to an ActiveRecord back end. When I edit a record, and save - the backend is calling create rather than update. Any thoughts on where I should in…

---

## [Conditionally adding hash values in one array](https://www.ruby-forum.com/t/conditionally-adding-hash-values-in-one-array/145021)

<div class="topic-metadata">

**Author:** [@russel](https://www.ruby-forum.com/u/russel)\
**Replies:** 0\
**Last updated:** [August 5, 2008, 10:49am UTC](https://www.ruby-forum.com/t/conditionally-adding-hash-values-in-one-array/145021 "2008-08-05T10:49:36Z")

</div>

Hi there, Can anyone help me with this. I’m still new to ruby on rails and I’m really stuck on it. I have an array containing hashes. e.g. a =\> \[{:key1=\>value, key2=\>value,key3=\>value},{:key1=\>value, key2=\>value,ke…

---

## [Automatically filling values in a form](https://www.ruby-forum.com/t/automatically-filling-values-in-a-form/145010)

<div class="topic-metadata">

**Author:** [@mike](https://www.ruby-forum.com/u/mike)\
**Replies:** 1\
**Last updated:** [August 5, 2008, 10:44am UTC](https://www.ruby-forum.com/t/automatically-filling-values-in-a-form/145010 "2008-08-05T10:44:53Z")

</div>

I have 2 models: parent & child parent has\_many children and child belongs\_to parent When a parent is created, the user has the chance to click on parent and add a new child. I want to automatically pass back the par…

---

## [Rendering a partial collection with a layout](https://www.ruby-forum.com/t/rendering-a-partial-collection-with-a-layout/145003)

<div class="topic-metadata">

**Author:** [@zach](https://www.ruby-forum.com/u/zach)\
**Replies:** 1\
**Last updated:** [August 5, 2008, 9:46am UTC](https://www.ruby-forum.com/t/rendering-a-partial-collection-with-a-layout/145003 "2008-08-05T09:46:54Z")

</div>

First I tried \<%= render :partial =\> “affiliations/affiliation”, :layout =\> ‘affiliations/list’, :collection =\> @affiliations %\> But the layout doesn’t receive the affiliation instance variable as the partial does, s…

---

## [Download link video](https://www.ruby-forum.com/t/download-link-video/145004)

<div class="topic-metadata">

**Author:** [@joel](https://www.ruby-forum.com/u/joel)\
**Replies:** 1\
**Last updated:** [August 5, 2008, 8:43am UTC](https://www.ruby-forum.com/t/download-link-video/145004 "2008-08-05T08:43:42Z")

</div>

Hello All, while trying to implement the number of downloads on a particular video I added a num\_downloads column on my video table. And I tried this below : \<%=link\_to “Download”, @video.public\_filename, :onClick…

---

## [Ruby-debug failure in rails2.1](https://www.ruby-forum.com/t/ruby-debug-failure-in-rails2-1/145016)

<div class="topic-metadata">

**Author:** [@rociiu](https://www.ruby-forum.com/u/rociiu)\
**Replies:** 0\
**Last updated:** [August 5, 2008, 7:59am UTC](https://www.ruby-forum.com/t/ruby-debug-failure-in-rails2-1/145016 "2008-08-05T07:59:34Z")

</div>

when i use debugger in the spec , after type irb , it raise error below INTERNAL ERROR!!! wrong number of arguments (2 for 1) /System/Library/Frameworks/Ruby.framework/Versions/1.8/usr/lib/ruby/1.8/irb/extend-command.r…

---

## [SMTP errror handling](https://www.ruby-forum.com/t/smtp-errror-handling/144922)

<div class="topic-metadata">

**Author:** [@mrbless](https://www.ruby-forum.com/u/mrbless)\
**Replies:** 2\
**Last updated:** [August 5, 2008, 7:52am UTC](https://www.ruby-forum.com/t/smtp-errror-handling/144922 "2008-08-05T07:52:49Z")

</div>

When I try to send the email with invalid recipient like removed\_email\_address@domain.invalid I get following error 550 unknown recipient. I try to catch the error with begin and catch but error is not caught. Any ide…

---

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

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 5\
**Last updated:** [August 5, 2008, 7:50am UTC](https://www.ruby-forum.com/t/map-resources/144934 "2008-08-05T07:50:32Z")

</div>

Hi From a rails 2.0 tutorial i read when I do ruby script/generate scaffold Album then in routes.rb file an entry like map.resources :albums be there…I am using rails 1.2.5 but did not see any such entry after scaf…

---

## [Adding data from the model](https://www.ruby-forum.com/t/adding-data-from-the-model/145013)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [August 5, 2008, 7:49am UTC](https://www.ruby-forum.com/t/adding-data-from-the-model/145013 "2008-08-05T07:49:54Z")

</div>

Hi, I have a form that I need to add default data when is passed into the DB… for example I have a create post, were the user can add tittle, text etc… but I need to add who created so is on record etc I will like t…

---

## [How to connect to existing db?](https://www.ruby-forum.com/t/how-to-connect-to-existing-db/144906)

<div class="topic-metadata">

**Author:** [@jalopy55](https://www.ruby-forum.com/u/jalopy55)\
**Replies:** 2\
**Last updated:** [August 5, 2008, 6:38am UTC](https://www.ruby-forum.com/t/how-to-connect-to-existing-db/144906 "2008-08-05T06:38:28Z")

</div>

this is what i’m putting into putty to create the db. \]$ mysqladmin create bean\_development mysqladmin: connect to server at ‘localhost’ failed I’m using ruby through a shared server from hostmonster. i have a db &us…

---

## [MySQL and loading dates for timestamp columns from CSV](https://www.ruby-forum.com/t/mysql-and-loading-dates-for-timestamp-columns-from-csv/144076)

<div class="topic-metadata">

**Author:** [@andy](https://www.ruby-forum.com/u/andy)\
**Replies:** 1\
**Last updated:** [August 5, 2008, 5:56am UTC](https://www.ruby-forum.com/t/mysql-and-loading-dates-for-timestamp-columns-from-csv/144076 "2008-08-05T05:56:29Z")

</div>

Hello, using MySQL, FasterCSV and have a CSV dump of blog posts to be imported as production data, except the created\_at and updated\_at columns are always populated for me and not read from the CSV! I tried renaming t…

---

## [Database error](https://www.ruby-forum.com/t/database-error/144908)

<div class="topic-metadata">

**Author:** [@wawa88](https://www.ruby-forum.com/u/wawa88)\
**Replies:** 5\
**Last updated:** [August 5, 2008, 4:15am UTC](https://www.ruby-forum.com/t/database-error/144908 "2008-08-05T04:15:18Z")

</div>

Hi i am new to ruby on rails. I am using RMail which is ruby mail to read the email that i fetch from. When the rmail read the email it will insert the data inside the email to the database which i have created in the…

---

## [Help with Complex Sign-Up Process](https://www.ruby-forum.com/t/help-with-complex-sign-up-process/145005)

<div class="topic-metadata">

**Author:** [@Decker](https://www.ruby-forum.com/u/Decker)\
**Replies:** 0\
**Last updated:** [August 5, 2008, 4:00am UTC](https://www.ruby-forum.com/t/help-with-complex-sign-up-process/145005 "2008-08-05T04:00:08Z")

</div>

I have a sign-up (new user) process that is – by convention – split between a new and create action. The problem is that the the new view has several hidden divs that are conditionally shown during the process of some…

---

## [Params colllection\_select observe\_field](https://www.ruby-forum.com/t/params-colllection-select-observe-field/144973)

<div class="topic-metadata">

**Author:** [@tomtt](https://www.ruby-forum.com/u/tomtt)\
**Replies:** 1\
**Last updated:** [August 5, 2008, 3:31am UTC](https://www.ruby-forum.com/t/params-colllection-select-observe-field/144973 "2008-08-05T03:31:25Z")

</div>

Hi, i have 2 dropdowns which are dependent from each other: ItemCategory has many ItemGroups /Item/New.html \<%= javascript\_include\_tag “prototype” %\> \<%= collection\_select(:x, :id, ItemCategory.find(:all, :condit…

---

## [Accessing a table whose name is singular](https://www.ruby-forum.com/t/accessing-a-table-whose-name-is-singular/144999)

<div class="topic-metadata">

**Author:** [@robert](https://www.ruby-forum.com/u/robert)\
**Replies:** 2\
**Last updated:** [August 5, 2008, 3:04am UTC](https://www.ruby-forum.com/t/accessing-a-table-whose-name-is-singular/144999 "2008-08-05T03:04:30Z")

</div>

Hello list, I’m new to ActiveRecord. Actually, I’m using it outside of a rails application (crazy I know). I have the following simple test code: ============================================= require ‘rubygems’ re…

---

## [Find\_by\_sql not working](https://www.ruby-forum.com/t/find-by-sql-not-working/144989)

<div class="topic-metadata">

**Author:** [@hangingclowns](https://www.ruby-forum.com/u/hangingclowns)\
**Replies:** 2\
**Last updated:** [August 5, 2008, 3:00am UTC](https://www.ruby-forum.com/t/find-by-sql-not-working/144989 "2008-08-05T03:00:24Z")

</div>

I have the following complex query: locations = Location.find\_by\_sql(“SELECT \* FROM locations join mediaGeography on locations.zip = mediaGeography.geoZip WHERE (((acos(sin(( #{coords\[“geoLAT”\]} \* pi()/180)) \* sin(( …

---

## [Download video using link\_to](https://www.ruby-forum.com/t/download-video-using-link-to/144573)

<div class="topic-metadata">

**Author:** [@joel](https://www.ruby-forum.com/u/joel)\
**Replies:** 3\
**Last updated:** [August 5, 2008, 2:44am UTC](https://www.ruby-forum.com/t/download-video-using-link-to/144573 "2008-08-05T02:44:03Z")

</div>

Hello All, I need to add a download video functionality to my website. Currently my link looks like that : \<%=link\_to “Download”, @video.public\_filename %\> But I want to increment a column value (num\_downloads) in my…

---

## [Has\_many :through doesn't work with .new()?](https://www.ruby-forum.com/t/has-many-through-doesnt-work-with-new/144998)

<div class="topic-metadata">

**Author:** [@morgan](https://www.ruby-forum.com/u/morgan)\
**Replies:** 1\
**Last updated:** [August 5, 2008, 2:33am UTC](https://www.ruby-forum.com/t/has-many-through-doesnt-work-with-new/144998 "2008-08-05T02:33:31Z")

</div>

so thingys is related to middles which is related to users @wamp = Thingy.new @wamp.wonko = 13 @wamp.save this is the has many relationship in the thingy model. has\_many :wonko, :through =\> :middles, :source =\> :user …

---

## [Installing in place editor plugin](https://www.ruby-forum.com/t/installing-in-place-editor-plugin/144995)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 1\
**Last updated:** [August 5, 2008, 1:25am UTC](https://www.ruby-forum.com/t/installing-in-place-editor-plugin/144995 "2008-08-05T01:25:05Z")

</div>

how do I go about installing the in place editor plugin? Thanks

---

## [How to view a list of currently installed gem versions?](https://www.ruby-forum.com/t/how-to-view-a-list-of-currently-installed-gem-versions/144948)

<div class="topic-metadata">

**Author:** [@CPerry](https://www.ruby-forum.com/u/CPerry)\
**Replies:** 3\
**Last updated:** [August 5, 2008, 1:12am UTC](https://www.ruby-forum.com/t/how-to-view-a-list-of-currently-installed-gem-versions/144948 "2008-08-05T01:12:23Z")

</div>

Hey all, I am new to Rails so sorry if this is such an elementary question… From a command line, how can I list out all of my currently installed gems and their version numbers? I am pretty sure that I have a few tha…

---

## [Dynamic associations](https://www.ruby-forum.com/t/dynamic-associations/144890)

<div class="topic-metadata">

**Author:** [@deadinplastic](https://www.ruby-forum.com/u/deadinplastic)\
**Replies:** 4\
**Last updated:** [August 5, 2008, 1:06am UTC](https://www.ruby-forum.com/t/dynamic-associations/144890 "2008-08-05T01:06:00Z")

</div>

Hi, This is my first post to this forum, glad to meet you all! I have a question about dynamic associations. Say I have an application that creates tables after installation (via a user action). Say an extra table ge…

---

## [Hidden fields on complex forms](https://www.ruby-forum.com/t/hidden-fields-on-complex-forms/144993)

<div class="topic-metadata">

**Author:** [@sheepfunk](https://www.ruby-forum.com/u/sheepfunk)\
**Replies:** 1\
**Last updated:** [August 5, 2008, 1:02am UTC](https://www.ruby-forum.com/t/hidden-fields-on-complex-forms/144993 "2008-08-05T01:02:20Z")

</div>

I’m trying to pass the id of an object in a hidden field in a complex form and I while I’ve googled a bunch on this I can’t seem to figure out the problem My form looks like this: \<% fields\_for “recipe\[ingredient\_att…

---

## [Question about effective way of using rails.vim](https://www.ruby-forum.com/t/question-about-effective-way-of-using-rails-vim/144991)

<div class="topic-metadata">

**Author:** [@ssk](https://www.ruby-forum.com/u/ssk)\
**Replies:** 0\
**Last updated:** [August 5, 2008, 12:38am UTC](https://www.ruby-forum.com/t/question-about-effective-way-of-using-rails-vim/144991 "2008-08-05T00:38:07Z")

</div>

Hi, I use vim with rails.vim plugin. I am not familiar with bash or vim script. Every time I use rails.vim, I do: In rails\_app directory: $vim README (just any rails file will do. I open README) In vim: :Rcd :Rpr…

---

## [Can I create web services using RoR?](https://www.ruby-forum.com/t/can-i-create-web-services-using-ror/144982)

<div class="topic-metadata">

**Author:** [@Pedro\_Carneiro\_Jr](https://www.ruby-forum.com/u/Pedro_Carneiro_Jr)\
**Replies:** 1\
**Last updated:** [August 4, 2008, 11:47pm UTC](https://www.ruby-forum.com/t/can-i-create-web-services-using-ror/144982 "2008-08-04T23:47:26Z")

</div>

Can I create web services using RoR? \[\]s, Pedro.

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

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