# Rails

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

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

---

## [REST Web Service Security](https://www.ruby-forum.com/t/rest-web-service-security/143265)

<div class="topic-metadata">

**Author:** [@Mark\_ASRichman](https://www.ruby-forum.com/u/Mark_ASRichman)\
**Replies:** 5\
**Last updated:** [July 18, 2008, 9:33am UTC](https://www.ruby-forum.com/t/rest-web-service-security/143265 "2008-07-18T09:33:59Z")

</div>

I am new to REST web services in Rails, but I do have a strong SOAP background. I’d like someone to explain the various security mechanisms used in REST web services (authentication and authorization). I doubt there i…

---

## [Plugins within plugins](https://www.ruby-forum.com/t/plugins-within-plugins/143396)

<div class="topic-metadata">

**Author:** [@Miles\_G](https://www.ruby-forum.com/u/Miles_G)\
**Replies:** 2\
**Last updated:** [July 18, 2008, 9:22am UTC](https://www.ruby-forum.com/t/plugins-within-plugins/143396 "2008-07-18T09:22:10Z")

</div>

can a plugin have a vendor/plugins directory within it and have that automatically used? I’m wondering if I have plugin A that depends on plugin B/C if I have to install B/C in every project that uses A or if I can ju…

---

## [How to make REST web client](https://www.ruby-forum.com/t/how-to-make-rest-web-client/143399)

<div class="topic-metadata">

**Author:** [@bishal](https://www.ruby-forum.com/u/bishal)\
**Replies:** 2\
**Last updated:** [July 18, 2008, 9:16am UTC](https://www.ruby-forum.com/t/how-to-make-rest-web-client/143399 "2008-07-18T09:16:45Z")

</div>

I have to make a REST client, making use of Activeresource, The problem is I have to make a custom web interface to make calls to the server resources. How should I do it ? I have been able to make REST calls via comm…

---

## [Attachment\_fu and polymorphism. Two models in one form](https://www.ruby-forum.com/t/attachment-fu-and-polymorphism-two-models-in-one-form/143327)

<div class="topic-metadata">

**Author:** [@chil](https://www.ruby-forum.com/u/chil)\
**Replies:** 1\
**Last updated:** [July 18, 2008, 9:12am UTC](https://www.ruby-forum.com/t/attachment-fu-and-polymorphism-two-models-in-one-form/143327 "2008-07-18T09:12:48Z")

</div>

Hi! I just discover attachment\_fu a few days ago. I made it work in a simple form. Now I want to use a polymorphic relation. I want to attach a picture to a ‘association’ in the ‘association’ form. Models: class Ass…

---

## [Need explanation for this](https://www.ruby-forum.com/t/need-explanation-for-this/143409)

<div class="topic-metadata">

**Author:** [@lostwarrior](https://www.ruby-forum.com/u/lostwarrior)\
**Replies:** 1\
**Last updated:** [July 18, 2008, 8:32am UTC](https://www.ruby-forum.com/t/need-explanation-for-this/143409 "2008-07-18T08:32:26Z")

</div>

hi please gice explanation for this 1: def json\_attributes\_for(model, \*attrs) 2: attrs = \[attrs\].flatten.map(&:to\_s) 3: model.attributes.delete\_if{|k,v| !attrs.include?(k) }.to\_json 4: end

---

## [Rails rjs event](https://www.ruby-forum.com/t/rails-rjs-event/143415)

<div class="topic-metadata">

**Author:** [@skilled\_dreamer](https://www.ruby-forum.com/u/skilled_dreamer)\
**Replies:** 1\
**Last updated:** [July 18, 2008, 8:30am UTC](https://www.ruby-forum.com/t/rails-rjs-event/143415 "2008-07-18T08:30:05Z")

</div>

Good day, Is it possible to use other javascript events in rails instead of using just onsubmit and onclick? Like i want to use onLoad or onBlur how will i do that in rails? Thank you

---

## [RESTful Question -- Extra Member Routes](https://www.ruby-forum.com/t/restful-question-extra-member-routes/143404)

<div class="topic-metadata">

**Author:** [@hirodusk](https://www.ruby-forum.com/u/hirodusk)\
**Replies:** 1\
**Last updated:** [July 18, 2008, 7:50am UTC](https://www.ruby-forum.com/t/restful-question-extra-member-routes/143404 "2008-07-18T07:50:53Z")

</div>

Hello, Still getting my feet wet with Rails, and especially RESTful Rails and am looking for some help tackling an issue In routes.rb i have: map.resources :houses do |house| house.resources :chores, :member =\> {:co…

---

## [Question about handling 'new items' per user](https://www.ruby-forum.com/t/question-about-handling-new-items-per-user/143366)

<div class="topic-metadata">

**Author:** [@shenry](https://www.ruby-forum.com/u/shenry)\
**Replies:** 1\
**Last updated:** [July 18, 2008, 6:22am UTC](https://www.ruby-forum.com/t/question-about-handling-new-items-per-user/143366 "2008-07-18T06:22:01Z")

</div>

Hi, I’m building a little app that tracks shipments - each user is associated with a role and that role has\_many shipments. I’d like to add a feature that displays new shipments since the user’s last login. Here is m…

---

## [Are there any tutorials on creating a client in Ruby for RESTful Rails app?](https://www.ruby-forum.com/t/are-there-any-tutorials-on-creating-a-client-in-ruby-for-restful-rails-app/143376)

<div class="topic-metadata">

**Author:** [@g0nzo](https://www.ruby-forum.com/u/g0nzo)\
**Replies:** 1\
**Last updated:** [July 18, 2008, 3:39am UTC](https://www.ruby-forum.com/t/are-there-any-tutorials-on-creating-a-client-in-ruby-for-restful-rails-app/143376 "2008-07-18T03:39:23Z")

</div>

Hi, I got a REStful Rails app and would like to create a simple command line app (probably later with a GUI) to display/manage data from the Rails app. There are bilions of tutorials/presentation on writing RESTful R…

---

## [What is the MySQL app used in the 15 minute weblog video?](https://www.ruby-forum.com/t/what-is-the-mysql-app-used-in-the-15-minute-weblog-video/143401)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 1\
**Last updated:** [July 18, 2008, 3:34am UTC](https://www.ruby-forum.com/t/what-is-the-mysql-app-used-in-the-15-minute-weblog-video/143401 "2008-07-18T03:34:05Z")

</div>

On the “Create a Weblog in 15 Minutes” screencast on the Ruby On Rails site http://media.rubyonrails.org/video/rails\_take2\_with\_sound.mov There is a really nice looking MySQL gui interface app. Can anybody tell me wh…

---

## [Javascript character counting in a form](https://www.ruby-forum.com/t/javascript-character-counting-in-a-form/143394)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 1\
**Last updated:** [July 18, 2008, 1:58am UTC](https://www.ruby-forum.com/t/javascript-character-counting-in-a-form/143394 "2008-07-18T01:58:12Z")

</div>

Hi - I’ve seen a few websites that show you how many characters you have left while you’re typing. Does anyone know of a plugin to accomplish automatically? Thanks, Dino

---

## [Bulk Emailers](https://www.ruby-forum.com/t/bulk-emailers/143380)

<div class="topic-metadata">

**Author:** [@Stegg](https://www.ruby-forum.com/u/Stegg)\
**Replies:** 2\
**Last updated:** [July 17, 2008, 11:07pm UTC](https://www.ruby-forum.com/t/bulk-emailers/143380 "2008-07-17T23:07:55Z")

</div>

I’m looking to create a bulk emailer in an existing RoR application and I’m having a hard time finding resources out there on how to accomplish this. It will be for a mailing list of 12k+. Any advice or guidance wou…

---

## [Controller test - setting session values not working](https://www.ruby-forum.com/t/controller-test-setting-session-values-not-working/131733)

<div class="topic-metadata">

**Author:** [@syg6](https://www.ruby-forum.com/u/syg6)\
**Replies:** 4\
**Last updated:** [July 17, 2008, 10:59pm UTC](https://www.ruby-forum.com/t/controller-test-setting-session-values-not-working/131733 "2008-07-17T22:59:35Z")

</div>

I have a functional test and am trying to set a session value … def test\_should\_check\_number\_of\_jobs session\[:employee\_id\] = 1 #@fred.id post :index assert\_equal 1, assigns(:jobs).size end … when I try to run thi…

---

## [Firefox 3 + prototype 1.6.2 + shortcut = failed](https://www.ruby-forum.com/t/firefox-3-prototype-1-6-2-shortcut-failed/143322)

<div class="topic-metadata">

**Author:** [@mrdamien](https://www.ruby-forum.com/u/mrdamien)\
**Replies:** 3\
**Last updated:** [July 17, 2008, 10:32pm UTC](https://www.ruby-forum.com/t/firefox-3-prototype-1-6-2-shortcut-failed/143322 "2008-07-17T22:32:45Z")

</div>

Hi all, On firefox 3, the following code always return an error: var account\_id = $(account\_request\_id).value; —\> account\_request\_id is not defined But the DOM account\_request\_id is present in the page and this code …

---

## [Form for 2 models?](https://www.ruby-forum.com/t/form-for-2-models/143377)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 2\
**Last updated:** [July 17, 2008, 10:09pm UTC](https://www.ruby-forum.com/t/form-for-2-models/143377 "2008-07-17T22:09:19Z")

</div>

Is it possible to have a form\_for :model\_1, :model\_2 ? Thanks

---

## [Getting access to request.env in a model observer?](https://www.ruby-forum.com/t/getting-access-to-request-env-in-a-model-observer/143372)

<div class="topic-metadata">

**Author:** [@HSWade\_M](https://www.ruby-forum.com/u/HSWade_M)\
**Replies:** 2\
**Last updated:** [July 17, 2008, 9:13pm UTC](https://www.ruby-forum.com/t/getting-access-to-request-env-in-a-model-observer/143372 "2008-07-17T21:13:04Z")

</div>

Does anyone know how I would get access to the request.env object within a model observer? I’m using restful\_authentication to send email, and need to include some of that request data in there. I have it working wit…

---

## [Selenium docs or tutorial?](https://www.ruby-forum.com/t/selenium-docs-or-tutorial/143371)

<div class="topic-metadata">

**Author:** [@djconcepcion](https://www.ruby-forum.com/u/djconcepcion)\
**Replies:** 2\
**Last updated:** [July 17, 2008, 9:00pm UTC](https://www.ruby-forum.com/t/selenium-docs-or-tutorial/143371 "2008-07-17T21:00:58Z")

</div>

Does anyone have links to any complete Selenium docs or tutorial? I have Selenium 1.0.9 installed (OS X, Leopard), the proxy server appears to launch ok, and got the test to reach: @browser = Selenium::SeleniumDriver.…

---

## [Better to use ruby to send email instead of rails context?](https://www.ruby-forum.com/t/better-to-use-ruby-to-send-email-instead-of-rails-context/143375)

<div class="topic-metadata">

**Author:** [@naijaguy](https://www.ruby-forum.com/u/naijaguy)\
**Replies:** 1\
**Last updated:** [July 17, 2008, 8:54pm UTC](https://www.ruby-forum.com/t/better-to-use-ruby-to-send-email-instead-of-rails-context/143375 "2008-07-17T20:54:53Z")

</div>

If my web app needs to send email notifications that are not time sensitive (e.g. they can wait a few minutes), do you think it’s better for my web app to put the message on a queue or in the db for another program (e…

---

## [RJS Problem..Now Whats incrorect here](https://www.ruby-forum.com/t/rjs-problem-now-whats-incrorect-here/143345)

<div class="topic-metadata">

**Author:** [@ankit2584](https://www.ruby-forum.com/u/ankit2584)\
**Replies:** 2\
**Last updated:** [July 17, 2008, 8:38pm UTC](https://www.ruby-forum.com/t/rjs-problem-now-whats-incrorect-here/143345 "2008-07-17T20:38:10Z")

</div>

I am trying to Update a field on my search result page through in\_place\_edit and then render a partial to display the updated contents. I am receving the following instead of the real value which is “John Wright” try…

---

## [Error prevention by empty DB's request](https://www.ruby-forum.com/t/error-prevention-by-empty-dbs-request/143243)

<div class="topic-metadata">

**Author:** [@chaosbanane](https://www.ruby-forum.com/u/chaosbanane)\
**Replies:** 2\
**Last updated:** [July 17, 2008, 8:36pm UTC](https://www.ruby-forum.com/t/error-prevention-by-empty-dbs-request/143243 "2008-07-17T20:36:59Z")

</div>

Hi I have often the problem that rails outputs an error because of requests from an empty database. I will check, before showing features on the page, if a flag is set in the database. The problem is, that the DB is …

---

## [ActiveRecord keeps returning 1 as the Model's id](https://www.ruby-forum.com/t/activerecord-keeps-returning-1-as-the-models-id/143361)

<div class="topic-metadata">

**Author:** [@ice5nake](https://www.ruby-forum.com/u/ice5nake)\
**Replies:** 10\
**Last updated:** [July 17, 2008, 8:32pm UTC](https://www.ruby-forum.com/t/activerecord-keeps-returning-1-as-the-models-id/143361 "2008-07-17T20:32:59Z")

</div>

I am doing a find: merchant = Merchant.find(:first, :conditions =\> c, :readonly =\> false) I keep getting “id”=\>“1” for every single model that is returned. Since the id is always 1 I can’t do merchant.save without get…

---

## [Which controller called my helper method?](https://www.ruby-forum.com/t/which-controller-called-my-helper-method/143370)

<div class="topic-metadata">

**Author:** [@rpardee](https://www.ruby-forum.com/u/rpardee)\
**Replies:** 2\
**Last updated:** [July 17, 2008, 8:14pm UTC](https://www.ruby-forum.com/t/which-controller-called-my-helper-method/143370 "2008-07-17T20:14:13Z")

</div>

Hey All, Is there a global var or something that holds the name of the controller that called a given helper? I’m trying to re-use a partial, which calls a helper, and need to do something slightly different dependin…

---

## [\[ADV/ANN\] Easy recurring billing with Authorize.net](https://www.ruby-forum.com/t/adv-ann-easy-recurring-billing-with-authorize-net/143369)

<div class="topic-metadata">

**Author:** [@Benjamin\_C](https://www.ruby-forum.com/u/Benjamin_C)\
**Replies:** 0\
**Last updated:** [July 17, 2008, 7:34pm UTC](https://www.ruby-forum.com/t/adv-ann-easy-recurring-billing-with-authorize-net/143369 "2008-07-17T19:34:54Z")

</div>

I have just put out an update to the SaaS Rails Kit, a sample Rails application that implements recurring billing. This update adds support for the Authorize.net payment gateway. With the Rails Kit and Authorize.net …

---

## [Create a work folder and a Rails project in Windows](https://www.ruby-forum.com/t/create-a-work-folder-and-a-rails-project-in-windows/143365)

<div class="topic-metadata">

**Author:** [@olivia](https://www.ruby-forum.com/u/olivia)\
**Replies:** 1\
**Last updated:** [July 17, 2008, 6:44pm UTC](https://www.ruby-forum.com/t/create-a-work-folder-and-a-rails-project-in-windows/143365 "2008-07-17T18:44:30Z")

</div>

I am new to RoR. I am running Windows. I heard Mac automatically generates “Sites” folder for you. But how do you create a work folder called “Sites” in Window Terminal? I followed a tutorial that runs on Mac, the aut…

---

## [:back](https://www.ruby-forum.com/t/back/143364)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 1\
**Last updated:** [July 17, 2008, 6:38pm UTC](https://www.ruby-forum.com/t/back/143364 "2008-07-17T18:38:39Z")

</div>

In a redirect\_to you can say :back to redirect you back to the previous function. How do I access that previous function value? I need to check and see if one method is being called from a certain method, it is I woul…

---

## [Problem with link\_to\_remote, RJS and jRails](https://www.ruby-forum.com/t/problem-with-link-to-remote-rjs-and-jrails/143363)

<div class="topic-metadata">

**Author:** [@samflores](https://www.ruby-forum.com/u/samflores)\
**Replies:** 3\
**Last updated:** [July 17, 2008, 6:32pm UTC](https://www.ruby-forum.com/t/problem-with-link-to-remote-rjs-and-jrails/143363 "2008-07-17T18:32:11Z")

</div>

Hi, everyone, I’m trying to update the content of a div using link\_to\_remote and RJS template. Everything works fine if I use the default Prototype/Scriptaculous libraries, but I want to use jRails 'coz other parts o…

---

## [Using Ruby on Rails with existing Microsoft SQL Server database](https://www.ruby-forum.com/t/using-ruby-on-rails-with-existing-microsoft-sql-server-database/143362)

<div class="topic-metadata">

**Author:** [@chengpan](https://www.ruby-forum.com/u/chengpan)\
**Replies:** 2\
**Last updated:** [July 17, 2008, 6:29pm UTC](https://www.ruby-forum.com/t/using-ruby-on-rails-with-existing-microsoft-sql-server-database/143362 "2008-07-17T18:29:15Z")

</div>

Hey guys, I just started learning how to use RORs and am really satisfied with it. I installed it and created my first web page in under two hours. I’ve decided to make a more advanced page by using an existing SQL …

---

## [Changing a \<tr\> display onClick](https://www.ruby-forum.com/t/changing-a-tr-display-onclick/142972)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 1\
**Last updated:** [July 17, 2008, 6:28pm UTC](https://www.ruby-forum.com/t/changing-a-tr-display-onclick/142972 "2008-07-17T18:28:05Z")

</div>

onclick=" \<%= user.email %\>.tr.style.display=‘inline’ " \<div id="\<%= user.email %\>"\> \<tr class="row-details" id="tr" style="display: none;"\> \<td\>sdf\</td\> \</tr\> \</div\> thi…

---

## [Formatting background with cycle](https://www.ruby-forum.com/t/formatting-background-with-cycle/142971)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 1\
**Last updated:** [July 17, 2008, 6:19pm UTC](https://www.ruby-forum.com/t/formatting-background-with-cycle/142971 "2008-07-17T18:19:54Z")

</div>

I’ve got a with onmouseout=“this.style.background=’\<%= cycle(odd-row, ‘even-row’)%\>’;” But that doesn’t seem to work. onmouseover changes the bg to white, and I need to get the color back to its original color onmous…

---

## [.build method](https://www.ruby-forum.com/t/build-method/143335)

<div class="topic-metadata">

**Author:** [@validkeys](https://www.ruby-forum.com/u/validkeys)\
**Replies:** 5\
**Last updated:** [July 17, 2008, 5:39pm UTC](https://www.ruby-forum.com/t/build-method/143335 "2008-07-17T17:39:30Z")

</div>

I have gone to the api and have searched the internet and looked through the books that I have, but I am having trouble finding an explanation on what the .build method actually does and how it is used. I guess the b…

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

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