# Rails

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

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

---

## [jQuery & unobstrusive javascript](https://www.ruby-forum.com/t/jquery-unobstrusive-javascript/157582)

<div class="topic-metadata">

**Author:** [@diabolist](https://www.ruby-forum.com/u/diabolist)\
**Replies:** 1\
**Last updated:** [January 13, 2009, 10:59am UTC](https://www.ruby-forum.com/t/jquery-unobstrusive-javascript/157582 "2009-01-13T10:59:46Z")

</div>

Anyone know how to unobtrusively turn a normal link into an ajax link using jQuery ?

---

## [How to Create Own Plugin in Rails](https://www.ruby-forum.com/t/how-to-create-own-plugin-in-rails/157581)

<div class="topic-metadata">

**Author:** [@prince\_tambar](https://www.ruby-forum.com/u/prince_tambar)\
**Replies:** 1\
**Last updated:** [January 13, 2009, 10:47am UTC](https://www.ruby-forum.com/t/how-to-create-own-plugin-in-rails/157581 "2009-01-13T10:47:19Z")

</div>

Can anyone help me how to create own plugin in Ruby on Rails… please reply me with some hints… Thanks Reply with steps

---

## [Can anyone see why the pw validation is failing?](https://www.ruby-forum.com/t/can-anyone-see-why-the-pw-validation-is-failing/157561)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 4\
**Last updated:** [January 13, 2009, 10:33am UTC](https://www.ruby-forum.com/t/can-anyone-see-why-the-pw-validation-is-failing/157561 "2009-01-13T10:33:48Z")

</div>

I have a simple form to allow the user to update their password. It always throws the error saying that the password is too short (they are over the min of 6 chars). The passwords are making it in to the model just f…

---

## [Ruport - how to wrap \<a href=" "\> tags around text inside a ruport table](https://www.ruby-forum.com/t/ruport-how-to-wrap-a-href-tags-around-text-inside-a-ruport-table/157576)

<div class="topic-metadata">

**Author:** [@stevej](https://www.ruby-forum.com/u/stevej)\
**Replies:** 0\
**Last updated:** [January 13, 2009, 10:29am UTC](https://www.ruby-forum.com/t/ruport-how-to-wrap-a-href-tags-around-text-inside-a-ruport-table/157576 "2009-01-13T10:29:02Z")

</div>

Anyone know how to embed a hyperlink in a ruport table? The url is in mysql. I’m using,after much head-banging, report\_table\_by\_sql to build a ruport table, which of course, also now contains the url text. I want t…

---

## [Controller help with :has\_many relationship](https://www.ruby-forum.com/t/controller-help-with-has-many-relationship/157579)

<div class="topic-metadata">

**Author:** [@Alfred\_Aday](https://www.ruby-forum.com/u/Alfred_Aday)\
**Replies:** 0\
**Last updated:** [January 13, 2009, 10:29am UTC](https://www.ruby-forum.com/t/controller-help-with-has-many-relationship/157579 "2009-01-13T10:29:02Z")

</div>

Hey, I’m having trouble understanding how to correctly build and save an object that has a has\_many relationship. I am trying to map Products to Categories through CategoryAssignments: Model: class Product \< Acti…

---

## [Progress bar](https://www.ruby-forum.com/t/progress-bar/157573)

<div class="topic-metadata">

**Author:** [@anubhaw](https://www.ruby-forum.com/u/anubhaw)\
**Replies:** 0\
**Last updated:** [January 13, 2009, 9:24am UTC](https://www.ruby-forum.com/t/progress-bar/157573 "2009-01-13T09:24:37Z")

</div>

Can anyone suggest how to get a dynamic progress bar for file uploading in ruby on rails.

---

## [Optional authentication and HTTP Basic](https://www.ruby-forum.com/t/optional-authentication-and-http-basic/157560)

<div class="topic-metadata">

**Author:** [@ISESSmith-Heister](https://www.ruby-forum.com/u/ISESSmith-Heister)\
**Replies:** 0\
**Last updated:** [January 13, 2009, 5:02am UTC](https://www.ruby-forum.com/t/optional-authentication-and-http-basic/157560 "2009-01-13T05:02:02Z")

</div>

Hi all, I have an app that originally only supported form-based authentication, and showed pared-down content to unauthenticated users. I then layered on HTTP Basic authentication using authenticate\_with\_http\_basic, …

---

## [What sort of business logic should go in a model?](https://www.ruby-forum.com/t/what-sort-of-business-logic-should-go-in-a-model/157555)

<div class="topic-metadata">

**Author:** [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Replies:** 4\
**Last updated:** [January 13, 2009, 3:57am UTC](https://www.ruby-forum.com/t/what-sort-of-business-logic-should-go-in-a-model/157555 "2009-01-13T03:57:09Z")

</div>

Suppose I have a classic blog application augmented with something like restful authentication so that users must log in to create blog posts and to issue comments on other blog posts. I would like to give a user the…

---

## [Best Practices for Multi-step Record Creation](https://www.ruby-forum.com/t/best-practices-for-multi-step-record-creation/157556)

<div class="topic-metadata">

**Author:** [@gavvin](https://www.ruby-forum.com/u/gavvin)\
**Replies:** 0\
**Last updated:** [January 13, 2009, 3:09am UTC](https://www.ruby-forum.com/t/best-practices-for-multi-step-record-creation/157556 "2009-01-13T03:09:43Z")

</div>

class Activity has\_many :locations In activities#new, I navigate away and select a location (among other things) on a map. At this point, the @activity is still missing attributes and is invalid. What is the best p…

---

## [How can I get Rspec on Mac iTerm formatting and colors occuring when I use Putty remotely?](https://www.ruby-forum.com/t/how-can-i-get-rspec-on-mac-iterm-formatting-and-colors-occuring-when-i-use-putty-remotely/157550)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 0\
**Last updated:** [January 13, 2009, 1:41am UTC](https://www.ruby-forum.com/t/how-can-i-get-rspec-on-mac-iterm-formatting-and-colors-occuring-when-i-use-putty-remotely/157550 "2009-01-13T01:41:58Z")

</div>

Hi, Any ideas how can I get the nice formatting & colors that occurs on my Mac iTerm when I run Rspec (e.g. ./script/autotest), to occur when I log in to my dev environment via Putty (from Windows) and run it here??…

---

## [Validates\_presence\_of fails with false boolean](https://www.ruby-forum.com/t/validates-presence-of-fails-with-false-boolean/157542)

<div class="topic-metadata">

**Author:** [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Replies:** 2\
**Last updated:** [January 13, 2009, 12:24am UTC](https://www.ruby-forum.com/t/validates-presence-of-fails-with-false-boolean/157542 "2009-01-13T00:24:46Z")

</div>

This almost feels like a bug to me, since false is not nil. (i don’t think!) Using v\_p\_o on a boolean field fails validation if the field is passed with ‘false’. It passes validation in the case of true. How can I …

---

## [Filter in memory vs. hit the database again?](https://www.ruby-forum.com/t/filter-in-memory-vs-hit-the-database-again/157407)

<div class="topic-metadata">

**Author:** [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Replies:** 2\
**Last updated:** [January 12, 2009, 11:54pm UTC](https://www.ruby-forum.com/t/filter-in-memory-vs-hit-the-database-again/157407 "2009-01-12T23:54:32Z")

</div>

Is it generally preferred to filter a large collection of objects in memory or in the database. In the case of a single query, I know that the database is preferred. But what about multiple filtering based on atribut…

---

## [Hidden\_field\_tag flattens my array for value](https://www.ruby-forum.com/t/hidden-field-tag-flattens-my-array-for-value/157414)

<div class="topic-metadata">

**Author:** [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Replies:** 2\
**Last updated:** [January 12, 2009, 11:53pm UTC](https://www.ruby-forum.com/t/hidden-field-tag-flattens-my-array-for-value/157414 "2009-01-12T23:53:38Z")

</div>

ERB: \<%= hidden\_field\_tag(‘users\_ids’, @users.collect(&:id))%\> OUTPUT: I want to grab an array of user ids and then do something with them, but hidden\_form\_tag is flattening my array. I’ve tried various ways of p…

---

## [Dynamic Layout Positions and Extra Partials](https://www.ruby-forum.com/t/dynamic-layout-positions-and-extra-partials/157484)

<div class="topic-metadata">

**Author:** [@sifix](https://www.ruby-forum.com/u/sifix)\
**Replies:** 1\
**Last updated:** [January 12, 2009, 11:33pm UTC](https://www.ruby-forum.com/t/dynamic-layout-positions-and-extra-partials/157484 "2009-01-12T23:33:41Z")

</div>

Hallo, I am thinking of developing a new project and I would like 1)from the admin areaof the site to control the partials I wan to be displayed per page and theirs position. 2)These partials are not always related t…

---

## [Some routes stopped working](https://www.ruby-forum.com/t/some-routes-stopped-working/157523)

<div class="topic-metadata">

**Author:** [@bryan](https://www.ruby-forum.com/u/bryan)\
**Replies:** 5\
**Last updated:** [January 12, 2009, 10:55pm UTC](https://www.ruby-forum.com/t/some-routes-stopped-working/157523 "2009-01-12T22:55:41Z")

</div>

I’m relatively new to Rails, so the solution to this might be more trivial than I think However, I am working on an app, and everything was working fine until just recently. The problem is I’m not sure when I might ha…

---

## [Dynamically setting schema\_search\_path](https://www.ruby-forum.com/t/dynamically-setting-schema-search-path/103296)

<div class="topic-metadata">

**Author:** [@andy](https://www.ruby-forum.com/u/andy)\
**Replies:** 1\
**Last updated:** [January 12, 2009, 10:35pm UTC](https://www.ruby-forum.com/t/dynamically-setting-schema-search-path/103296 "2009-01-12T22:35:59Z")

</div>

Is there any way for Rails to look through schema1.table1 vs schema2.table1 depending on input from a view? eg. a link that sets a session variable?

---

## [Routing problem?](https://www.ruby-forum.com/t/routing-problem/157522)

<div class="topic-metadata">

**Author:** [@bryan](https://www.ruby-forum.com/u/bryan)\
**Replies:** 2\
**Last updated:** [January 12, 2009, 10:13pm UTC](https://www.ruby-forum.com/t/routing-problem/157522 "2009-01-12T22:13:18Z")

</div>

I just posted this and am wondering why it was taken down I’m relatively new to Rails, so the solution to this might be more trivial than I think However, I am working on an app, and everything was working fine until …

---

## [What's a good way to specify set of records to be created across multiple models (with associations)](https://www.ruby-forum.com/t/whats-a-good-way-to-specify-set-of-records-to-be-created-across-multiple-models-with-associations/157482)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 2\
**Last updated:** [January 12, 2009, 9:05pm UTC](https://www.ruby-forum.com/t/whats-a-good-way-to-specify-set-of-records-to-be-created-across-multiple-models-with-associations/157482 "2009-01-12T21:05:20Z")

</div>

Hi, I need to be able to specify for my application, via a configuration approach (i.e. power user, no nice UI required), a way to automate creation of a pre-determine set of database records across a few models. S…

---

## [Parseexcel problem](https://www.ruby-forum.com/t/parseexcel-problem/157531)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 3\
**Last updated:** [January 12, 2009, 8:02pm UTC](https://www.ruby-forum.com/t/parseexcel-problem/157531 "2009-01-12T20:02:18Z")

</div>

I am running rails 2.2 and gem 1.3.1 I have this basic code: equire ‘rubygems’ require ‘parseexcel’ workbook = Spreadsheet::ParseExcel.parse() I get this error: ./parseexcel.rb:4: uninitialized constant Spreadsheet…

---

## [How to pass and not a parameter to a link?](https://www.ruby-forum.com/t/how-to-pass-and-not-a-parameter-to-a-link/157012)

<div class="topic-metadata">

**Author:** [@xdmx](https://www.ruby-forum.com/u/xdmx)\
**Replies:** 1\
**Last updated:** [January 12, 2009, 6:54pm UTC](https://www.ruby-forum.com/t/how-to-pass-and-not-a-parameter-to-a-link/157012 "2009-01-12T18:54:32Z")

</div>

Hi, i’ve a page where when a params\[:something\] is passed all/some the urls in that page must have the params\[:something\] too, but when there isn’t it shouldn’t appear. I’ve tried with: report\_url(params\[:id\], :somet…

---

## [Exporting mysql data to excel?](https://www.ruby-forum.com/t/exporting-mysql-data-to-excel/157480)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 2\
**Last updated:** [January 12, 2009, 6:17pm UTC](https://www.ruby-forum.com/t/exporting-mysql-data-to-excel/157480 "2009-01-12T18:17:36Z")

</div>

Dear all, Could anyone please suggest about how to export mysql data’s to excel. Is there any plugins or gem to do so? Thanks in advance regards, Jose Martin

---

## [Editing Files in the Browser](https://www.ruby-forum.com/t/editing-files-in-the-browser/157519)

<div class="topic-metadata">

**Author:** [@daz](https://www.ruby-forum.com/u/daz)\
**Replies:** 4\
**Last updated:** [January 12, 2009, 5:31pm UTC](https://www.ruby-forum.com/t/editing-files-in-the-browser/157519 "2009-01-12T17:31:14Z")

</div>

Hi, Is it possible to open a file (in the public directory) in a text field, edit it and save it? Is it also possible to type into a new text field, then save this as a new file in the public directory? One use for …

---

## [Create Slashed and dotted image through Rmagick in ROR](https://www.ruby-forum.com/t/create-slashed-and-dotted-image-through-rmagick-in-ror/157525)

<div class="topic-metadata">

**Author:** [@saurav](https://www.ruby-forum.com/u/saurav)\
**Replies:** 0\
**Last updated:** [January 12, 2009, 5:20pm UTC](https://www.ruby-forum.com/t/create-slashed-and-dotted-image-through-rmagick-in-ror/157525 "2009-01-12T17:20:37Z")

</div>

Hi friends , I have to create four type of images in my application (more like http://lab.rails2u.com/bgmaker/ ) 1.Slashed 2.Dotted 3.Strip 4. Gradient I get succeed in order to create the gradient image through R…

---

## [Great Opportunity in NYC great Package](https://www.ruby-forum.com/t/great-opportunity-in-nyc-great-package/196875)

<div class="topic-metadata">

**Author:** [@Smiley](https://www.ruby-forum.com/u/Smiley)\
**Replies:** 1\
**Last updated:** [January 12, 2009, 5:06pm UTC](https://www.ruby-forum.com/t/great-opportunity-in-nyc-great-package/196875 "2009-01-12T17:06:29Z")

</div>

Our client is a leading NYC-based publisher of web and mobile games, and personalization applications. They are seeking a Senior Server Engineer with Ruby on Rails experience. The Senior Server Engineer works with t…

---

## [Undefined local variable or method \`current\_user' for](https://www.ruby-forum.com/t/undefined-local-variable-or-method-current-user-for/157331)

<div class="topic-metadata">

**Author:** [@shahroon\_ali](https://www.ruby-forum.com/u/shahroon_ali)\
**Replies:** 14\
**Last updated:** [January 12, 2009, 4:15pm UTC](https://www.ruby-forum.com/t/undefined-local-variable-or-method-current-user-for/157331 "2009-01-12T16:15:05Z")

</div>

Hi All, I am using a Plugin mdarby-restful\_acl with restful\_authentication and I am following the procedure form GitHub - mdarby/restful\_acl: Rails gem/plugin that provides contextual access control to RESTful…

---

## [How to keep track of popular items](https://www.ruby-forum.com/t/how-to-keep-track-of-popular-items/157471)

<div class="topic-metadata">

**Author:** [@metanoize](https://www.ruby-forum.com/u/metanoize)\
**Replies:** 4\
**Last updated:** [January 12, 2009, 4:00pm UTC](https://www.ruby-forum.com/t/how-to-keep-track-of-popular-items/157471 "2009-01-12T16:00:09Z")

</div>

I have a site which is basically a catalog of product about 30,000.00 products. What do you think is the best (in terms of performance) way to keep track of the most popular products,a part from the idea of writing we…

---

## [How following expression evaluate in rails?](https://www.ruby-forum.com/t/how-following-expression-evaluate-in-rails/157504)

<div class="topic-metadata">

**Author:** [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Replies:** 1\
**Last updated:** [January 12, 2009, 3:43pm UTC](https://www.ruby-forum.com/t/how-following-expression-evaluate-in-rails/157504 "2009-01-12T15:43:13Z")

</div>

Hi, i have a following code abc= Abc.find(aa\_ids, :order =\> ‘created\_at desc’) abc.delete\_if { |event| (event.group\_id && !group\_ids.include?(event.group\_id) && !event.group.is\_public?) || !Abc::SHOW\_EVENTS.include?…

---

## [Grabbing date out of url path for use as param i.e. /entries/01/2009](https://www.ruby-forum.com/t/grabbing-date-out-of-url-path-for-use-as-param-i-e-entries-01-2009/157516)

<div class="topic-metadata">

**Author:** [@ressister](https://www.ruby-forum.com/u/ressister)\
**Replies:** 0\
**Last updated:** [January 12, 2009, 3:29pm UTC](https://www.ruby-forum.com/t/grabbing-date-out-of-url-path-for-use-as-param-i-e-entries-01-2009/157516 "2009-01-12T15:29:47Z")

</div>

Hi there, I have been working on what i would describe as a “view selector,” a DHTML drop-down menu that allows a user to view entries by criteria such as: All, Uncategorized, or by month where the user has entries. I…

---

## [Ruby 1.9.1 Windows rake tasks problem](https://www.ruby-forum.com/t/ruby-1-9-1-windows-rake-tasks-problem/157511)

<div class="topic-metadata">

**Author:** [@safestate](https://www.ruby-forum.com/u/safestate)\
**Replies:** 4\
**Last updated:** [January 12, 2009, 2:52pm UTC](https://www.ruby-forum.com/t/ruby-1-9-1-windows-rake-tasks-problem/157511 "2009-01-12T14:52:05Z")

</div>

I can’t get rake tasks to work properly using Ruby 1.9.1 with Windows I have set up all the gems for Rails 2.2.2, “rails myapp” works fine, but when i rake db:migrate, it complains about rake tasks being inaccessible …

---

## [Ongoing errors with libxml & mysql](https://www.ruby-forum.com/t/ongoing-errors-with-libxml-mysql/157156)

<div class="topic-metadata">

**Author:** [@MikeyB](https://www.ruby-forum.com/u/MikeyB)\
**Replies:** 2\
**Last updated:** [January 12, 2009, 2:11pm UTC](https://www.ruby-forum.com/t/ongoing-errors-with-libxml-mysql/157156 "2009-01-12T14:11:13Z")

</div>

It seems like whenever I get around one issue another one surfaces… now when I try to do anything with my app (rake db:migrate, script/ server), I get the following error: /opt/local/lib/ruby/gems/1.8/gems/libxml-ruby…

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

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