# Rails

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

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

---

## [Why can't I add a :class to text\_field?](https://www.ruby-forum.com/t/why-cant-i-add-a-class-to-text-field/169742)

<div class="topic-metadata">

**Author:** [@rubyernewbie](https://www.ruby-forum.com/u/rubyernewbie)\
**Replies:** 1\
**Last updated:** [June 8, 2009, 9:36am UTC](https://www.ruby-forum.com/t/why-cant-i-add-a-class-to-text-field/169742 "2009-06-08T09:36:20Z")

</div>

\<%= text\_field\_tag ‘login’ ,nil, {:class =\> ‘line’} %\> the old way work. \<%= f.text\_field :login, :class =\> ‘line’ %\> but why this doesn’t.

---

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

<div class="topic-metadata">

**Author:** [@val](https://www.ruby-forum.com/u/val)\
**Replies:** 1\
**Last updated:** [June 8, 2009, 5:04am UTC](https://www.ruby-forum.com/t/link-to-from-controller/169736 "2009-06-08T05:04:16Z")

</div>

I need to use ‘link\_to’ dynamically in my view. So, in my controller I wrote: @right\_part = " \<%= link\_to( ‘Next’, :action =\> ‘/index’, :id =\> 3)%\>" And in my view I’m trying to get a link: \<%= @right\_part %\> But al…

---

## [Ruby w/ Apache mod\_proxy](https://www.ruby-forum.com/t/ruby-w-apache-mod-proxy/169710)

<div class="topic-metadata">

**Author:** [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Replies:** 7\
**Last updated:** [June 8, 2009, 2:42am UTC](https://www.ruby-forum.com/t/ruby-w-apache-mod-proxy/169710 "2009-06-08T02:42:40Z")

</div>

Yes, I know this is more specifically an Apache question, but you guys in this group know this stuff forwards & backwards it seems. I am running the glassfish gem (in lieu of mongrel) on port 81. If I go to http://127…

---

## [Embed php code in rails](https://www.ruby-forum.com/t/embed-php-code-in-rails/169537)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 3\
**Last updated:** [June 8, 2009, 2:08am UTC](https://www.ruby-forum.com/t/embed-php-code-in-rails/169537 "2009-06-08T02:08:03Z")

</div>

Hi there There are some code pieces that are available in php like currency rates, and weather status, etc. Is there a way that I can use those php code within rails code in the view. or is there a good rails plugin …

---

## [Error in production only: \`method\_missing': undefined method \`has\_attachment' for #\<Class:0xb72b6cb](https://www.ruby-forum.com/t/error-in-production-only-method-missing-undefined-method-has-attachment-for-class-0xb72b6cb/169727)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 6\
**Last updated:** [June 7, 2009, 11:29pm UTC](https://www.ruby-forum.com/t/error-in-production-only-method-missing-undefined-method-has-attachment-for-class-0xb72b6cb/169727 "2009-06-07T23:29:03Z")

</div>

Hello guys, I’m having a problem with running an application in production. The error I’m getting is as follows: /home/www/bandera/releases/20090607191259/vendor/rails/activerecord/ lib/active\_record/base.rb:1964:in m…

---

## [Namespaced application layout?](https://www.ruby-forum.com/t/namespaced-application-layout/169634)

<div class="topic-metadata">

**Author:** [@elliottg](https://www.ruby-forum.com/u/elliottg)\
**Replies:** 2\
**Last updated:** [June 7, 2009, 8:29pm UTC](https://www.ruby-forum.com/t/namespaced-application-layout/169634 "2009-06-07T20:29:38Z")

</div>

I have an admin namespace in my app. I would like to have a layout that would work like app/layouts/application.html.erb, but instead off affecting the entire app it would only affect all the views inside of Admin::\* …

---

## [XML::LibXML::Reader](https://www.ruby-forum.com/t/xml-reader/169321)

<div class="topic-metadata">

**Author:** [@lecielbleu](https://www.ruby-forum.com/u/lecielbleu)\
**Replies:** 10\
**Last updated:** [June 7, 2009, 7:49pm UTC](https://www.ruby-forum.com/t/xml-reader/169321 "2009-06-07T19:49:38Z")

</div>

is there anybody who knows how we can get child values using libxml (Reader class) def xml\_import\_to\_brands require’xml’ reader = XML::Reader.file(‘c:/brands.xml’) . . .

---

## [How to access parent property](https://www.ruby-forum.com/t/how-to-access-parent-property/169707)

<div class="topic-metadata">

**Author:** [@developerinlondon](https://www.ruby-forum.com/u/developerinlondon)\
**Replies:** 4\
**Last updated:** [June 7, 2009, 7:25pm UTC](https://www.ruby-forum.com/t/how-to-access-parent-property/169707 "2009-06-07T19:25:36Z")

</div>

Hi, I am having difficulties accessing parent properties/attributes from the child. Anyone could shed some lights onto this? Heres a sample code: class Parent \< ActiveRecord::Base :has\_many =\> :childs @connector d…

---

## [Calendar Plugin](https://www.ruby-forum.com/t/calendar-plugin/168990)

<div class="topic-metadata">

**Author:** [@prabesh](https://www.ruby-forum.com/u/prabesh)\
**Replies:** 3\
**Last updated:** [June 7, 2009, 6:16pm UTC](https://www.ruby-forum.com/t/calendar-plugin/168990 "2009-06-07T18:16:11Z")

</div>

I am trying to develop a Project Management Tool.I have to log events and have done that.I want to show the events in the calendar. Can anyone suggest me a good plugin for the purpose. Thanks, Prabesh Shrestha

---

## [Advice for quick fire DB replication with Rails](https://www.ruby-forum.com/t/advice-for-quick-fire-db-replication-with-rails/169705)

<div class="topic-metadata">

**Author:** [@yitzhakbg](https://www.ruby-forum.com/u/yitzhakbg)\
**Replies:** 4\
**Last updated:** [June 7, 2009, 6:03pm UTC](https://www.ruby-forum.com/t/advice-for-quick-fire-db-replication-with-rails/169705 "2009-06-07T18:03:00Z")

</div>

We need an “out-of-the-box” sure-fire DB replication setup with automatic failover for our Rails app. We haven’t done it before. We’d appreciate advice on what the simplest, surest, quickest method would be (no more t…

---

## [GeoLocation for any Cell Phone with GPS](https://www.ruby-forum.com/t/geolocation-for-any-cell-phone-with-gps/169672)

<div class="topic-metadata">

**Author:** [@flaubert](https://www.ruby-forum.com/u/flaubert)\
**Replies:** 2\
**Last updated:** [June 7, 2009, 5:06pm UTC](https://www.ruby-forum.com/t/geolocation-for-any-cell-phone-with-gps/169672 "2009-06-07T17:06:22Z")

</div>

Hi all, I’m having the following problem: I need a user using any device of any GPS is advised that at a certain place. I search on the net with articles on Global Positioning RubyonRails, but without success. Can an…

---

## [Subdomain](https://www.ruby-forum.com/t/subdomain/94633)

<div class="topic-metadata">

**Author:** [@prabu](https://www.ruby-forum.com/u/prabu)\
**Replies:** 8\
**Last updated:** [June 7, 2009, 3:17pm UTC](https://www.ruby-forum.com/t/subdomain/94633 "2009-06-07T15:17:54Z")

</div>

hi, how to create a subdomain outside the public directory and how to redirect to the subdomain

---

## [Administration Subsystem](https://www.ruby-forum.com/t/administration-subsystem/169690)

<div class="topic-metadata">

**Author:** [@Mark\_ASRichman](https://www.ruby-forum.com/u/Mark_ASRichman)\
**Replies:** 1\
**Last updated:** [June 7, 2009, 3:14pm UTC](https://www.ruby-forum.com/t/administration-subsystem/169690 "2009-06-07T15:14:58Z")

</div>

Can someone recommend a gem/plugin for administration of users, roles, preferences, etc.? I know various CMS’s like Radiant and BrowserCMS have this, but I don’t necessarily want to build all my apps on top of them. I…

---

## [How does controller call render when there's no render in action](https://www.ruby-forum.com/t/how-does-controller-call-render-when-theres-no-render-in-action/169659)

<div class="topic-metadata">

**Author:** [@Vojto](https://www.ruby-forum.com/u/Vojto)\
**Replies:** 2\
**Last updated:** [June 7, 2009, 2:14pm UTC](https://www.ruby-forum.com/t/how-does-controller-call-render-when-theres-no-render-in-action/169659 "2009-06-07T14:14:02Z")

</div>

Hello, I was studying Rails source and at this point: def process(request, response, method = :perform\_action, \*arguments) #:nodoc: response.request = request initialize\_template\_class(response) assign\_short…

---

## [\[ANN\] SQL Server Adapter 2000/2005/2008](https://www.ruby-forum.com/t/ann-sql-server-adapter-2000-2005-2008/169701)

<div class="topic-metadata">

**Author:** [@lqqkout4elfy](https://www.ruby-forum.com/u/lqqkout4elfy)\
**Replies:** 1\
**Last updated:** [June 7, 2009, 1:54pm UTC](https://www.ruby-forum.com/t/ann-sql-server-adapter-2000-2005-2008/169701 "2009-06-07T13:54:42Z")

</div>

Small announcement. The SQL Server adapter I’ve been working on for the past 6 months or so now passes all the tests in rails 2.2 and 2.3 for all SQL Server versions. It is also Ruby 1.9 compatible, UTF-8 support, etc…

---

## [Mongrel not playing nicely with older rails/ruby](https://www.ruby-forum.com/t/mongrel-not-playing-nicely-with-older-rails-ruby/169630)

<div class="topic-metadata">

**Author:** [@rustybucket](https://www.ruby-forum.com/u/rustybucket)\
**Replies:** 3\
**Last updated:** [June 7, 2009, 9:10am UTC](https://www.ruby-forum.com/t/mongrel-not-playing-nicely-with-older-rails-ruby/169630 "2009-06-07T09:10:20Z")

</div>

I’m trying to transfer an older Rails project to a new server, never would have thought it would have taken me this long (first time with Ruby On Rails). Anyways the site uses Ruby 1.8.4, Rails 1.1.6, gems 0.8.10 I i…

---

## [Learning Rails 1st Edition - Form Builders - Confuzzled](https://www.ruby-forum.com/t/learning-rails-1st-edition-form-builders-confuzzled/169699)

<div class="topic-metadata">

**Author:** [@rilindo](https://www.ruby-forum.com/u/rilindo)\
**Replies:** 0\
**Last updated:** [June 7, 2009, 9:05am UTC](https://www.ruby-forum.com/t/learning-rails-1st-edition-form-builders-confuzzled/169699 "2009-06-07T09:05:03Z")

</div>

Hi! Rails newbie here - so far, loving it. Going through the Learnings Rails book and the for the most part, I am learning quite a bit (in spite of the errata). I did see something odd. On 8.2.2, when I invoke the fol…

---

## [Retrieving count of individual items among the table](https://www.ruby-forum.com/t/retrieving-count-of-individual-items-among-the-table/169550)

<div class="topic-metadata">

**Author:** [@jayco](https://www.ruby-forum.com/u/jayco)\
**Replies:** 9\
**Last updated:** [June 7, 2009, 8:44am UTC](https://www.ruby-forum.com/t/retrieving-count-of-individual-items-among-the-table/169550 "2009-06-07T08:44:35Z")

</div>

I have a table that is displaying a list of 5 items. Next to each item I want to display the number of times that the item pops up in an individual list. Example: Item1 (4) Item2 (2) Item3 (1) Item4 (7) Item5 (3) …

---

## [How to Delete Table from Database?](https://www.ruby-forum.com/t/how-to-delete-table-from-database/169288)

<div class="topic-metadata">

**Author:** [@devrubygem](https://www.ruby-forum.com/u/devrubygem)\
**Replies:** 3\
**Last updated:** [June 7, 2009, 7:14am UTC](https://www.ruby-forum.com/t/how-to-delete-table-from-database/169288 "2009-06-07T07:14:13Z")

</div>

I want to delete my project, how do I delete my table inside my sqlite database? Thanks

---

## [Booting WEBrick ... server:invalid option: --trace?](https://www.ruby-forum.com/t/booting-webrick-server-invalid-option-trace/169678)

<div class="topic-metadata">

**Author:** [@rustybucket](https://www.ruby-forum.com/u/rustybucket)\
**Replies:** 2\
**Last updated:** [June 7, 2009, 1:37am UTC](https://www.ruby-forum.com/t/booting-webrick-server-invalid-option-trace/169678 "2009-06-07T01:37:00Z")

</div>

I’m migrating an old Rails App to a new server, I think I’ve got most of my issues worked out so far. But… When I run script/server --trace in the app I get the following output… and I have no clue what to do or eve…

---

## [Abbreviated stack when using runner](https://www.ruby-forum.com/t/abbreviated-stack-when-using-runner/169681)

<div class="topic-metadata">

**Author:** [@pedz](https://www.ruby-forum.com/u/pedz)\
**Replies:** 2\
**Last updated:** [June 7, 2009, 12:53am UTC](https://www.ruby-forum.com/t/abbreviated-stack-when-using-runner/169681 "2009-06-07T00:53:07Z")

</div>

When I use script/runner and get an exception, the stack that is printed often has something like: from /usr/local/lib/ruby/gems/1.8/gems/activerecord-2.3.2/lib/active\_record/transactions.rb:200:in \`save!’ … 9 l…

---

## [Commands out of sync](https://www.ruby-forum.com/t/commands-out-of-sync/169684)

<div class="topic-metadata">

**Author:** [@kc123](https://www.ruby-forum.com/u/kc123)\
**Replies:** 2\
**Last updated:** [June 7, 2009, 12:49am UTC](https://www.ruby-forum.com/t/commands-out-of-sync/169684 "2009-06-07T00:49:46Z")

</div>

I’m getting this error when talking to MySQL Status: 500 Internal Server Error Mysql::Error: Commands out of sync; you can’t run this command now: UPDATE sessions SET \`data This is the :active\_record\_store that is ca…

---

## [Checkbox to dropdown list](https://www.ruby-forum.com/t/checkbox-to-dropdown-list/169686)

<div class="topic-metadata">

**Author:** [@fonziguy](https://www.ruby-forum.com/u/fonziguy)\
**Replies:** 0\
**Last updated:** [June 7, 2009, 12:28am UTC](https://www.ruby-forum.com/t/checkbox-to-dropdown-list/169686 "2009-06-07T00:28:23Z")

</div>

Hello everybody I’m new here. Looking for a bit of help. I have a long list with radio buttons generated by the attached code. I need to change this from radio buttons to 2 drop down boxes. One for the Add-On name an…

---

## [Missing something about these form parameters](https://www.ruby-forum.com/t/missing-something-about-these-form-parameters/169674)

<div class="topic-metadata">

**Author:** [@JannaB](https://www.ruby-forum.com/u/JannaB)\
**Replies:** 1\
**Last updated:** [June 6, 2009, 11:45pm UTC](https://www.ruby-forum.com/t/missing-something-about-these-form-parameters/169674 "2009-06-06T23:45:45Z")

</div>

If I have the following form: Send Email \<% form\_remote\_tag :update =\> 'dud', :url =\> {:controller =\> 'emailer', :action =\> 'sendmail'} do %\> Subject: \<%= text\_field 'email', 'subject' %\> Recipient: \<%= text\_field 'ema…

---

## [Create a new parent on child form?](https://www.ruby-forum.com/t/create-a-new-parent-on-child-form/169675)

<div class="topic-metadata">

**Author:** [@jeremy](https://www.ruby-forum.com/u/jeremy)\
**Replies:** 0\
**Last updated:** [June 6, 2009, 8:09pm UTC](https://www.ruby-forum.com/t/create-a-new-parent-on-child-form/169675 "2009-06-06T20:09:31Z")

</div>

I’m creating a little event management system and I have an Event model and an Organization model. event.rb belongs\_to :organization organization.rb has\_many :events When I’m creating a new event, I present a dropdow…

---

## [Best way to find a ruby on rails company?](https://www.ruby-forum.com/t/best-way-to-find-a-ruby-on-rails-company/169669)

<div class="topic-metadata">

**Author:** [@milandobrota](https://www.ruby-forum.com/u/milandobrota)\
**Replies:** 2\
**Last updated:** [June 6, 2009, 7:57pm UTC](https://www.ruby-forum.com/t/best-way-to-find-a-ruby-on-rails-company/169669 "2009-06-06T19:57:10Z")

</div>

What is the best way to find a ruby on rails company if you have some extra work? I know about workingwithrails.com. Is there any other good place?

---

## [Routes - Preventing a Match](https://www.ruby-forum.com/t/routes-preventing-a-match/169612)

<div class="topic-metadata">

**Author:** [@djames](https://www.ruby-forum.com/u/djames)\
**Replies:** 8\
**Last updated:** [June 6, 2009, 5:53pm UTC](https://www.ruby-forum.com/t/routes-preventing-a-match/169612 "2009-06-06T17:53:12Z")

</div>

The result that I’m trying to achieve is that URLs that begin with ‘/ static’ do not get mapped. My thought is that it sure would be nice if I could somehow say that if a URL begins with ‘/static’ simply abandon any f…

---

## [Building an I18N aware custom form builder on Rails](https://www.ruby-forum.com/t/building-an-i18n-aware-custom-form-builder-on-rails/169668)

<div class="topic-metadata">

**Author:** [@mauricio](https://www.ruby-forum.com/u/mauricio)\
**Replies:** 0\
**Last updated:** [June 6, 2009, 4:48pm UTC](https://www.ruby-forum.com/t/building-an-i18n-aware-custom-form-builder-on-rails/169668 "2009-06-06T16:48:01Z")

</div>

Hi, I just wrote a simple tutorial about custom form builders that uses the Rails I18N support to generate labels, any feedback is appreciated Maurício Linhares http://alinhavado.wordpress.com/ (pt-br) | http:…

---

## [Select\_time / select current time + 15 min](https://www.ruby-forum.com/t/select-time-select-current-time-15-min/169656)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [June 6, 2009, 4:47pm UTC](https://www.ruby-forum.com/t/select-time-select-current-time-15-min/169656 "2009-06-06T16:47:25Z")

</div>

hej there i call select\_time in my view as follows: \<%= select\_time(Time.now, { :default =\> Time.now, :minute\_step =\> 15, :time\_separator =\> ‘:’, :include\_seconds =\> false } %\> now i want the dropdown boxes to be set…

---

## [Access values with has\_and\_belongs\_to\_many assocciation](https://www.ruby-forum.com/t/access-values-with-has-and-belongs-to-many-assocciation/169287)

<div class="topic-metadata">

**Author:** [@little\_kostas](https://www.ruby-forum.com/u/little_kostas)\
**Replies:** 9\
**Last updated:** [June 6, 2009, 3:52pm UTC](https://www.ruby-forum.com/t/access-values-with-has-and-belongs-to-many-assocciation/169287 "2009-06-06T15:52:00Z")

</div>

Hi! I have 2 models author and product. class Author \< ActiveRecord::Base has\_and\_belongs\_to\_many :products end class Product \< ActiveRecord::Base has\_and\_belongs\_to\_many :authors end I have also created the migr…

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

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