# Rails

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

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

---

## [Partial loop counter in Rails 2.1](https://www.ruby-forum.com/t/partial-loop-counter-in-rails-2-1/144789)

<div class="topic-metadata">

**Author:** [@markmt](https://www.ruby-forum.com/u/markmt)\
**Replies:** 6\
**Last updated:** [August 2, 2008, 7:00am UTC](https://www.ruby-forum.com/t/partial-loop-counter-in-rails-2-1/144789 "2008-08-02T07:00:24Z")

</div>

I’m aware that the “\_counter” variable that’s accessible when rendering partials with collections was modified in Rails 2.1 so that it starts from 1 instead of 0. However I’m wondering if I might have discovered anoth…

---

## [How do I create this relationship in Rails? At least...what's the best way?](https://www.ruby-forum.com/t/how-do-i-create-this-relationship-in-rails-at-least-whats-the-best-way/144790)

<div class="topic-metadata">

**Author:** [@Lefty](https://www.ruby-forum.com/u/Lefty)\
**Replies:** 1\
**Last updated:** [August 2, 2008, 3:34am UTC](https://www.ruby-forum.com/t/how-do-i-create-this-relationship-in-rails-at-least-whats-the-best-way/144790 "2008-08-02T03:34:12Z")

</div>

I have a model, let’s call it an Assessments model. This model describes a collection of questions I’m developing to profile a user. So the first one is maybe a travel assessment. It consists of a few questions rela…

---

## [Activerecord concurrency](https://www.ruby-forum.com/t/activerecord-concurrency/144784)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 4\
**Last updated:** [August 2, 2008, 2:15am UTC](https://www.ruby-forum.com/t/activerecord-concurrency/144784 "2008-08-02T02:15:07Z")

</div>

Hey, I want to make sure that a user doesn’t edit a row while another user is editing it. A simple solution I figured was to set session\[:editing\] = row.id, and when a user clicks to edit a certain row, I’ll just che…

---

## [Problems loading gems](https://www.ruby-forum.com/t/problems-loading-gems/144768)

<div class="topic-metadata">

**Author:** [@maxmotor](https://www.ruby-forum.com/u/maxmotor)\
**Replies:** 2\
**Last updated:** [August 2, 2008, 2:05am UTC](https://www.ruby-forum.com/t/problems-loading-gems/144768 "2008-08-02T02:05:21Z")

</div>

I have some code in a controller that requires the GeoX gem. Let’s say I have the following code: … require ‘rubygems’ require ‘geox’ geocoder = GeoX::Geocoder.new(:geoengine =\> GeoX::Google) … If I run this in th…

---

## [Noob question -- where are rake files/tasks/scripts located](https://www.ruby-forum.com/t/noob-question-where-are-rake-files-tasks-scripts-located/144783)

<div class="topic-metadata">

**Author:** [@Morgan\_P](https://www.ruby-forum.com/u/Morgan_P)\
**Replies:** 5\
**Last updated:** [August 2, 2008, 1:15am UTC](https://www.ruby-forum.com/t/noob-question-where-are-rake-files-tasks-scripts-located/144783 "2008-08-02T01:15:29Z")

</div>

Hi there, Just getting my feet wet with rails (and ruby) and want to poke around a little. Could anyone tell me where to find the file executed by rake, for example, with the command rake db:migrate. thanks! -Morgan …

---

## [NameError in Rails/infoController#properties ( uninitialized constant ActiveRecord::Base::SQLite3 )](https://www.ruby-forum.com/t/nameerror-in-rails-infocontroller-properties-uninitialized-constant-activerecord-sqlite3/144788)

<div class="topic-metadata">

**Author:** [@javaDeveloper](https://www.ruby-forum.com/u/javaDeveloper)\
**Replies:** 0\
**Last updated:** [August 2, 2008, 1:07am UTC](https://www.ruby-forum.com/t/nameerror-in-rails-infocontroller-properties-uninitialized-constant-activerecord-sqlite3/144788 "2008-08-02T01:07:52Z")

</div>

I am trying to setup my RubyOnRails environment as mentioned in the RailSpace book ( RailsSpace: Building a Social Networking Website with Ruby on Rails ), pg 18. However when I click on the “About your application’s …

---

## [BigDecimal to letters](https://www.ruby-forum.com/t/bigdecimal-to-letters/144672)

<div class="topic-metadata">

**Author:** [@costi](https://www.ruby-forum.com/u/costi)\
**Replies:** 2\
**Last updated:** [August 2, 2008, 1:06am UTC](https://www.ruby-forum.com/t/bigdecimal-to-letters/144672 "2008-08-02T01:06:30Z")

</div>

Is there a method that converts BigDecimal 1520.0 to “one thousand five hundred and twenty”?

---

## [RJS templates, how to call a method from a specific controller?](https://www.ruby-forum.com/t/rjs-templates-how-to-call-a-method-from-a-specific-controller/144754)

<div class="topic-metadata">

**Author:** [@lz-coelho](https://www.ruby-forum.com/u/lz-coelho)\
**Replies:** 1\
**Last updated:** [August 2, 2008, 12:18am UTC](https://www.ruby-forum.com/t/rjs-templates-how-to-call-a-method-from-a-specific-controller/144754 "2008-08-02T00:18:28Z")

</div>

Yeah, I have User and Photo controllers and models. the user has many photos photos belongs to the user In a user profile section i have a photo gallery using RJS. Well, I’m on user controller, and the logic of ‘ph…

---

## [Help with Access Control](https://www.ruby-forum.com/t/help-with-access-control/144781)

<div class="topic-metadata">

**Author:** [@Apprentice321](https://www.ruby-forum.com/u/Apprentice321)\
**Replies:** 0\
**Last updated:** [August 1, 2008, 11:46pm UTC](https://www.ruby-forum.com/t/help-with-access-control/144781 "2008-08-01T23:46:00Z")

</div>

Hi, I am following the excellent tutorial http://www.railsforum.com/viewtopic.php?id=14216 (post 5) on how to implement an access control feature i.e. only a friend is allowed to view a profile of a particular member…

---

## [Paginate conditions](https://www.ruby-forum.com/t/paginate-conditions/144773)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 4\
**Last updated:** [August 1, 2008, 11:43pm UTC](https://www.ruby-forum.com/t/paginate-conditions/144773 "2008-08-01T23:43:05Z")

</div>

paginate :per\_page =\> 15, :page =\> page, :conditions =\> \[‘tags like ?’, “%#{search}%”\], :order =\> ‘created\_at DESC’ Hi, just wondering how I would change the conditions to include an extra like? I want to do: ‘tag…

---

## ["config/initializer" replacing "lib" folder?](https://www.ruby-forum.com/t/config-initializer-replacing-lib-folder/144777)

<div class="topic-metadata">

**Author:** [@ericgoodwin](https://www.ruby-forum.com/u/ericgoodwin)\
**Replies:** 0\
**Last updated:** [August 1, 2008, 11:34pm UTC](https://www.ruby-forum.com/t/config-initializer-replacing-lib-folder/144777 "2008-08-01T23:34:06Z")

</div>

I’m upgrading to rails 2.1, and there is a new convention with the config/initializer folder. As I understand, the purpose of this folder is to put configurations that need to get loaded between the Rails being loaded…

---

## [YM4R Add label to top of marker](https://www.ruby-forum.com/t/ym4r-add-label-to-top-of-marker/144776)

<div class="topic-metadata">

**Author:** [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Replies:** 0\
**Last updated:** [August 1, 2008, 11:22pm UTC](https://www.ruby-forum.com/t/ym4r-add-label-to-top-of-marker/144776 "2008-08-01T23:22:12Z")

</div>

Hi, Does anyone know how to add a label to the top of a marker. For example if i have 5 reults for locations and i have them numbered 1-5 then a number on the top of each marker so its clear which marker belongs to …

---

## [Little help please](https://www.ruby-forum.com/t/little-help-please/144656)

<div class="topic-metadata">

**Author:** [@Hallmark\_Staff](https://www.ruby-forum.com/u/Hallmark_Staff)\
**Replies:** 2\
**Last updated:** [August 1, 2008, 11:09pm UTC](https://www.ruby-forum.com/t/little-help-please/144656 "2008-08-01T23:09:40Z")

</div>

Hi, This is not spam, or anything like that. I am an executive head hunter trying to fill a full time, full benefit position for a Ruby on Rails developer with 2 years of experience in the field, and at least 4 years…

---

## [RForum in Rails?](https://www.ruby-forum.com/t/rforum-in-rails/144764)

<div class="topic-metadata">

**Author:** [@kylemathews](https://www.ruby-forum.com/u/kylemathews)\
**Replies:** 1\
**Last updated:** [August 1, 2008, 10:20pm UTC](https://www.ruby-forum.com/t/rforum-in-rails/144764 "2008-08-01T22:20:10Z")

</div>

Does RForum use Rails? It’s quite fast, so I assumed it didn’t, but looking at the source code, it looks like Rails.

---

## [Using FormTagHelper methods outside of a view](https://www.ruby-forum.com/t/using-formtaghelper-methods-outside-of-a-view/144763)

<div class="topic-metadata">

**Author:** [@nodrew](https://www.ruby-forum.com/u/nodrew)\
**Replies:** 2\
**Last updated:** [August 1, 2008, 9:51pm UTC](https://www.ruby-forum.com/t/using-formtaghelper-methods-outside-of-a-view/144763 "2008-08-01T21:51:19Z")

</div>

I am trying to use the check\_box\_tag method outside of a view to build an HTML string. When I call “ActionView::Helpers::FormTagHelper.check\_box\_tag(…)” I get “error undefined method \`check\_box\_tag’ for ActionView::…

---

## [ActiveRecord relationships problem](https://www.ruby-forum.com/t/activerecord-relationships-problem/144753)

<div class="topic-metadata">

**Author:** [@nodrew](https://www.ruby-forum.com/u/nodrew)\
**Replies:** 4\
**Last updated:** [August 1, 2008, 9:12pm UTC](https://www.ruby-forum.com/t/activerecord-relationships-problem/144753 "2008-08-01T21:12:22Z")

</div>

I am having some difficulty correctly setting up the relationships between two ActiveRecord model. The DB tables look something like this: table scripts { id :integer description :text } table households { id :in…

---

## [Implementing a credit-based system](https://www.ruby-forum.com/t/implementing-a-credit-based-system/144721)

<div class="topic-metadata">

**Author:** [@CPerry](https://www.ruby-forum.com/u/CPerry)\
**Replies:** 6\
**Last updated:** [August 1, 2008, 8:54pm UTC](https://www.ruby-forum.com/t/implementing-a-credit-based-system/144721 "2008-08-01T20:54:15Z")

</div>

Hey all, fairly new to Rails here and I am currently building my first Rails app. I am building an app that will require users to purchase credits in order to post items on the site. These credits will be purchased in …

---

## [Is it possible for table intersection reference same table](https://www.ruby-forum.com/t/is-it-possible-for-table-intersection-reference-same-table/144668)

<div class="topic-metadata">

**Author:** [@betame342](https://www.ruby-forum.com/u/betame342)\
**Replies:** 1\
**Last updated:** [August 1, 2008, 8:04pm UTC](https://www.ruby-forum.com/t/is-it-possible-for-table-intersection-reference-same-table/144668 "2008-08-01T20:04:23Z")

</div>

Hi, Hopefully this is not confusing. ---- WHAT I need is this below ---------------- SQL Statement Select \* from table\_mains left join table\_a where table\_a.id = table\_mains.table\_a\_id left join table\_b where table…

---

## [Visual\_effect + ajax star rating system = display problem in IE 7.0](https://www.ruby-forum.com/t/visual-effect-ajax-star-rating-system-display-problem-in-ie-7-0/144752)

<div class="topic-metadata">

**Author:** [@LAB](https://www.ruby-forum.com/u/LAB)\
**Replies:** 0\
**Last updated:** [August 1, 2008, 7:38pm UTC](https://www.ruby-forum.com/t/visual-effect-ajax-star-rating-system-display-problem-in-ie-7-0/144752 "2008-08-01T19:38:43Z")

</div>

Hi everyone! I have implemented the Ajax CSS Star Rating with acts\_as\_rateable as seen here: http://blog.aisleten.com/2007/05/03/ajax-css-star-rating-with-acts\_as\_rateable/ I have the star ratings hidden in a div, so…

---

## [Simple javascript](https://www.ruby-forum.com/t/simple-javascript/144751)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 1\
**Last updated:** [August 1, 2008, 7:23pm UTC](https://www.ruby-forum.com/t/simple-javascript/144751 "2008-08-01T19:23:16Z")

</div>

Hi, .... ... \<%= text\_field\_tag :search, params\[:search\], :id=\>"search\_field", :value=\>params\[:search\] %\> ... Just wondering how I would clear the value for the text\_field\_tag, Thanks!!

---

## [Observing collection\_select + text\_field](https://www.ruby-forum.com/t/observing-collection-select-text-field/144663)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 6\
**Last updated:** [August 1, 2008, 7:05pm UTC](https://www.ruby-forum.com/t/observing-collection-select-text-field/144663 "2008-08-01T19:05:11Z")

</div>

\<%= collection\_select(:category, :id, @categories, :id, :name, options ={:prompt =\> "-Select categories-"}, :class=\>"category\_dropdown\_list") %\> \<td\> \<%= text\_field\_tag :search, params\[:search\], :id=\>"sea…

---

## [Is this a many to many relationship?](https://www.ruby-forum.com/t/is-this-a-many-to-many-relationship/144685)

<div class="topic-metadata">

**Author:** [@morgan](https://www.ruby-forum.com/u/morgan)\
**Replies:** 2\
**Last updated:** [August 1, 2008, 6:58pm UTC](https://www.ruby-forum.com/t/is-this-a-many-to-many-relationship/144685 "2008-08-01T18:58:07Z")

</div>

So i have one table of data, each data object has two owners from the users table. so it’s data table id owner1\_id owner2\_id 5 1 2 10 1 2 owner table id name 1 bob 2 cornholio s…

---

## [Will Paginate and formatted JS calls](https://www.ruby-forum.com/t/will-paginate-and-formatted-js-calls/144746)

<div class="topic-metadata">

**Author:** [@sw0rdfish](https://www.ruby-forum.com/u/sw0rdfish)\
**Replies:** 2\
**Last updated:** [August 1, 2008, 6:43pm UTC](https://www.ruby-forum.com/t/will-paginate-and-formatted-js-calls/144746 "2008-08-01T18:43:40Z")

</div>

Once again I go to the RoR group for help. I have an application that is completely RESTful. I have a formatted call to one of my resources that is; format.js and it calls and RJS file that reloads all the partials …

---

## [Running Rails on 64-Bit Linux - Segmentation Fault](https://www.ruby-forum.com/t/running-rails-on-64-bit-linux-segmentation-fault/144664)

<div class="topic-metadata">

**Author:** [@Christopher\_Hazlett](https://www.ruby-forum.com/u/Christopher_Hazlett)\
**Replies:** 5\
**Last updated:** [August 1, 2008, 6:24pm UTC](https://www.ruby-forum.com/t/running-rails-on-64-bit-linux-segmentation-fault/144664 "2008-08-01T18:24:56Z")

</div>

Just wanted to post a warning for everyone out there. We just migrated our application to a 64-Bit Red Hat Enterprise 5 Server, and when we migrated we dutifully installed the latest ruby patch p230 for Ruby 1.8.6. A…

---

## [\[ANN\] One day Ruby event in London, later this year. Interested?](https://www.ruby-forum.com/t/ann-one-day-ruby-event-in-london-later-this-year-interested/144745)

<div class="topic-metadata">

**Author:** [@nitr0z](https://www.ruby-forum.com/u/nitr0z)\
**Replies:** 0\
**Last updated:** [August 1, 2008, 6:16pm UTC](https://www.ruby-forum.com/t/ann-one-day-ruby-event-in-london-later-this-year-interested/144745 "2008-08-01T18:16:43Z")

</div>

Hi all, We’re thinking about putting a one-day Ruby event in London, later this year. We want to try putting together an event, but organise it a bit differently to regular conferences. In a nutshell: It should be c…

---

## [Fwd: \[Rails\] REST error](https://www.ruby-forum.com/t/fwd-rails-rest-error/144736)

<div class="topic-metadata">

**Author:** [@tgreiser](https://www.ruby-forum.com/u/tgreiser)\
**Replies:** 0\
**Last updated:** [August 1, 2008, 4:40pm UTC](https://www.ruby-forum.com/t/fwd-rails-rest-error/144736 "2008-08-01T16:40:36Z")

</div>

On Fri, Aug 1, 2008 at 4:11 AM, babu nair removed\_email\_address@domain.invalidwrote: map.resources :students, :member =\> \[:departments =\> :get\] member actions are defined as a hash, not an array. map.resources :st…

---

## [Know of any timeline components? (plugins, flash. etc) i.e. plotting time (horizontally) versus reso](https://www.ruby-forum.com/t/know-of-any-timeline-components-plugins-flash-etc-i-e-plotting-time-horizontally-versus-reso/144690)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 4\
**Last updated:** [August 1, 2008, 4:40pm UTC](https://www.ruby-forum.com/t/know-of-any-timeline-components-plugins-flash-etc-i-e-plotting-time-horizontally-versus-reso/144690 "2008-08-01T16:40:01Z")

</div>

Hi, I want to create a Rails application that summarises resource leave & project phases. I basically want time horizontally (choose day-by-day, week-by-week, etc resolution), and projects/resources horizontally. I …

---

## [Restful\_authentication](https://www.ruby-forum.com/t/restful-authentication/144722)

<div class="topic-metadata">

**Author:** [@ddtm](https://www.ruby-forum.com/u/ddtm)\
**Replies:** 2\
**Last updated:** [August 1, 2008, 4:26pm UTC](https://www.ruby-forum.com/t/restful-authentication/144722 "2008-08-01T16:26:32Z")

</div>

I’ve decided to add user authentication to my application using restful\_authentication plugin. It has generated Account model with such fragment of code: def create logout\_keeping\_session! @account = Account.new(par…

---

## [Fwd: \[Rails\] is it possible for table intersection reference same table](https://www.ruby-forum.com/t/fwd-rails-is-it-possible-for-table-intersection-reference-same-table/144733)

<div class="topic-metadata">

**Author:** [@tgreiser](https://www.ruby-forum.com/u/tgreiser)\
**Replies:** 0\
**Last updated:** [August 1, 2008, 4:16pm UTC](https://www.ruby-forum.com/t/fwd-rails-is-it-possible-for-table-intersection-reference-same-table/144733 "2008-08-01T16:16:35Z")

</div>

On Thu, Jul 31, 2008 at 7:42 PM, Beta B. \<removed\_email\_address@domain.invalid wrote: table\_mains = TableMain.find(:all,:include=\>\[:table\_a, :table\_b, :photo\]) It only return left join from table\_b but not table\_…

---

## [XSS and SQL Injection attacks](https://www.ruby-forum.com/t/xss-and-sql-injection-attacks/144731)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 1\
**Last updated:** [August 1, 2008, 4:16pm UTC](https://www.ruby-forum.com/t/xss-and-sql-injection-attacks/144731 "2008-08-01T16:16:00Z")

</div>

I have been notified by my boss that a large company that is using my app is going to start and try to hack it for vulnerablilities and while I feel that I have things pretty well secure I just wanted to inquire about…

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

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