# Rails

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

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

---

## [Routes and RJS](https://www.ruby-forum.com/t/routes-and-rjs/173577)

<div class="topic-metadata">

**Author:** [@pmckinstry](https://www.ruby-forum.com/u/pmckinstry)\
**Replies:** 1\
**Last updated:** [August 11, 2009, 6:26pm UTC](https://www.ruby-forum.com/t/routes-and-rjs/173577 "2009-08-11T18:26:24Z")

</div>

Hi Folks, Sorry to ask more questions :slight\_smile: So I gave a RJS a go, I have a simple countries ‘index’ which lists countries and with alink to ‘show’ which shows detail. It works fine when you go to /countries…

---

## [Unable to store data in database](https://www.ruby-forum.com/t/unable-to-store-data-in-database/173580)

<div class="topic-metadata">

**Author:** [@anks](https://www.ruby-forum.com/u/anks)\
**Replies:** 1\
**Last updated:** [August 11, 2009, 6:21pm UTC](https://www.ruby-forum.com/t/unable-to-store-data-in-database/173580 "2009-08-11T18:21:43Z")

</div>

hii I am developing an application using ror in that i had created a feedback form using radiobuttton but the entry of the form is not submitted in the database after clicking the submit button although the id will b…

---

## [Presenting data in 2 styles - 2 action/views or 1?](https://www.ruby-forum.com/t/presenting-data-in-2-styles-2-action-views-or-1/173566)

<div class="topic-metadata">

**Author:** [@scudco](https://www.ruby-forum.com/u/scudco)\
**Replies:** 2\
**Last updated:** [August 11, 2009, 6:15pm UTC](https://www.ruby-forum.com/t/presenting-data-in-2-styles-2-action-views-or-1/173566 "2009-08-11T18:15:41Z")

</div>

Hi I want to present a list of ingredients in an A - Z format and also offer a by category format as well in my ingredients index. E.g. A apple apricot blahblah blahblah blah blah blah blah B … and by…

---

## [Show validation error messages from a nested model?](https://www.ruby-forum.com/t/show-validation-error-messages-from-a-nested-model/173530)

<div class="topic-metadata">

**Author:** [@coolmenu](https://www.ruby-forum.com/u/coolmenu)\
**Replies:** 2\
**Last updated:** [August 11, 2009, 5:55pm UTC](https://www.ruby-forum.com/t/show-validation-error-messages-from-a-nested-model/173530 "2009-08-11T17:55:55Z")

</div>

I’m trying to get error messages from a child object to show up on the view page of the parent object. Line #7 of show view is what I’m trying to do. What am I missing? If I enter a comment that is less than 30 cha…

---

## [Commenting / Blog gem or plugin?](https://www.ruby-forum.com/t/commenting-blog-gem-or-plugin/173575)

<div class="topic-metadata">

**Author:** [@hangingclowns](https://www.ruby-forum.com/u/hangingclowns)\
**Replies:** 1\
**Last updated:** [August 11, 2009, 5:39pm UTC](https://www.ruby-forum.com/t/commenting-blog-gem-or-plugin/173575 "2009-08-11T17:39:47Z")

</div>

Searching around if there is a good commenting / blog plugin or gem to use in my app. Would rather use one than reinvent the wheel. Something like where a user can comment on a specific item in my model and have the d…

---

## [Different gem locations: reasons?](https://www.ruby-forum.com/t/different-gem-locations-reasons/173578)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 3\
**Last updated:** [August 11, 2009, 5:38pm UTC](https://www.ruby-forum.com/t/different-gem-locations-reasons/173578 "2009-08-11T17:38:56Z")

</div>

Hi there, as far as I know, gems can be stored in 2 folders: /usr/lib/ruby/gems/1.8/gems app/vendor/gems When I install a gem, it automatically goes into the 1st folder. My questions are: What are the reasons one …

---

## [How to specify css](https://www.ruby-forum.com/t/how-to-specify-css/170823)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 8\
**Last updated:** [August 11, 2009, 5:31pm UTC](https://www.ruby-forum.com/t/how-to-specify-css/170823 "2009-08-11T17:31:52Z")

</div>

Hi… i used paulca-phone\_codes plugin for country code.and it works. \<%= f.select :country\_code, PhoneCode.options\_for\_select(:prefix)%\> what i want to know is how to apply css class for this.when i tried like below i…

---

## [Relative\_url\_root in Engines::RailsExtensions::AssetHelpers.plugin\_asset\_path](https://www.ruby-forum.com/t/relative-url-root-in-engines-assethelpers-plugin-asset-path/173576)

<div class="topic-metadata">

**Author:** [@John\_Koleszar](https://www.ruby-forum.com/u/John_Koleszar)\
**Replies:** 0\
**Last updated:** [August 11, 2009, 5:09pm UTC](https://www.ruby-forum.com/t/relative-url-root-in-engines-assethelpers-plugin-asset-path/173576 "2009-08-11T17:09:40Z")

</div>

Hi, I have a rails app (redmine) running within a sub-uri via the following directive in environment.rb: ActionController::AbstractRequest.relative\_url\_root = “/redmine” Unfortunately, URLs generated for plugin asset…

---

## [Use observe\_field within form\_tag](https://www.ruby-forum.com/t/use-observe-field-within-form-tag/173573)

<div class="topic-metadata">

**Author:** [@iggar](https://www.ruby-forum.com/u/iggar)\
**Replies:** 2\
**Last updated:** [August 11, 2009, 4:21pm UTC](https://www.ruby-forum.com/t/use-observe-field-within-form-tag/173573 "2009-08-11T16:21:26Z")

</div>

Hey, I’m trying to observe a field that is inside a form\_tag like so: \<% form\_tag ‘send\_mail’ do %\> \<%= select\_tag ‘select\_club’, options\_from\_collection\_for\_select(clubs,‘id’,‘name’), :class =\> ‘ComboBox’ %\> \<%= o…

---

## [Destroy problem](https://www.ruby-forum.com/t/destroy-problem/173569)

<div class="topic-metadata">

**Author:** [@wap](https://www.ruby-forum.com/u/wap)\
**Replies:** 4\
**Last updated:** [August 11, 2009, 4:10pm UTC](https://www.ruby-forum.com/t/destroy-problem/173569 "2009-08-11T16:10:06Z")

</div>

i have table pro\_categories and i am handle add update from admins controller but can not destroy record from there i mean using admin controller Product Category Category Title \</tr\> \<% @pro\_categori…

---

## [Testing subdomains as account keys](https://www.ruby-forum.com/t/testing-subdomains-as-account-keys/173564)

<div class="topic-metadata">

**Author:** [@subv3](https://www.ruby-forum.com/u/subv3)\
**Replies:** 1\
**Last updated:** [August 11, 2009, 3:58pm UTC](https://www.ruby-forum.com/t/testing-subdomains-as-account-keys/173564 "2009-08-11T15:58:50Z")

</div>

Hello, I’m just starting to write tests for my apps (I’ve really been putting it off). Im trying to test the following code but I’m getting an error “undefined local variable or method \`current\_account’” in a function…

---

## [Nested object form existing values not displayed](https://www.ruby-forum.com/t/nested-object-form-existing-values-not-displayed/173571)

<div class="topic-metadata">

**Author:** [@ingoweiss](https://www.ruby-forum.com/u/ingoweiss)\
**Replies:** 0\
**Last updated:** [August 11, 2009, 3:51pm UTC](https://www.ruby-forum.com/t/nested-object-form-existing-values-not-displayed/173571 "2009-08-11T15:51:48Z")

</div>

I have two models, User and Profile, that have a one-to-one relationship and which I am creating in the same form. I thought I’d give nested object forms a go, but got stuck with two problems: When I use the syntax …

---

## [Active Record Session expiration in Rails 2.3](https://www.ruby-forum.com/t/active-record-session-expiration-in-rails-2-3/159198)

<div class="topic-metadata">

**Author:** [@nauhaie](https://www.ruby-forum.com/u/nauhaie)\
**Replies:** 8\
**Last updated:** [August 11, 2009, 3:37pm UTC](https://www.ruby-forum.com/t/active-record-session-expiration-in-rails-2-3/159198 "2009-08-11T15:37:45Z")

</div>

Hi, I cannot figure out how to let session cookies expire after let’s say two years. Note that I am not using CookieStore. I mean the cookie referencing the Active Record Session. Here is my config/environnement.rb +…

---

## [Xml-containing models](https://www.ruby-forum.com/t/xml-containing-models/173427)

<div class="topic-metadata">

**Author:** [@jhaagmans](https://www.ruby-forum.com/u/jhaagmans)\
**Replies:** 15\
**Last updated:** [August 11, 2009, 3:27pm UTC](https://www.ruby-forum.com/t/xml-containing-models/173427 "2009-08-11T15:27:48Z")

</div>

Because the definitions of certain objects in our models are growing out of control, we’re looking into the possibility of simply defining some of our objects in XML, rather than using many models and having to use co…

---

## [Dynamic Views](https://www.ruby-forum.com/t/dynamic-views/173561)

<div class="topic-metadata">

**Author:** [@pmckinstry](https://www.ruby-forum.com/u/pmckinstry)\
**Replies:** 1\
**Last updated:** [August 11, 2009, 2:56pm UTC](https://www.ruby-forum.com/t/dynamic-views/173561 "2009-08-11T14:56:11Z")

</div>

Hello Folks, And thanks to everyone so far who has answered my newbie questions :slight\_smile: I just want a little advice, I’m starting tinkering with ruby to show certain businesses locations which reside in a city. …

---

## [I got this error when creating data bases with rake command](https://www.ruby-forum.com/t/i-got-this-error-when-creating-data-bases-with-rake-command/173546)

<div class="topic-metadata">

**Author:** [@rajendra](https://www.ruby-forum.com/u/rajendra)\
**Replies:** 5\
**Last updated:** [August 11, 2009, 2:52pm UTC](https://www.ruby-forum.com/t/i-got-this-error-when-creating-data-bases-with-rake-command/173546 "2009-08-11T14:52:40Z")

</div>

hi i got this error when i tries to run rake db:create:all command, G:\\my\\frogtest\>rake db:create:all (in G:/my/frogtest) rake aborted! undefined method \`last’ for {“action\_mailer\_optional\_tls”=\>:environment}:Hash …

---

## [Mysql away after sending email](https://www.ruby-forum.com/t/mysql-away-after-sending-email/173565)

<div class="topic-metadata">

**Author:** [@Luciano](https://www.ruby-forum.com/u/Luciano)\
**Replies:** 0\
**Last updated:** [August 11, 2009, 2:25pm UTC](https://www.ruby-forum.com/t/mysql-away-after-sending-email/173565 "2009-08-11T14:25:44Z")

</div>

Hello there, I’m having a strange issue with my app that was built with rails 2.2.2: I have a form where one employee can send a price quote to a client; the action just mark the quote as ‘sent’ on the database and d…

---

## [Translating missing for I18n in models after upgrading gem](https://www.ruby-forum.com/t/translating-missing-for-i18n-in-models-after-upgrading-gem/173550)

<div class="topic-metadata">

**Author:** [@bitonio2](https://www.ruby-forum.com/u/bitonio2)\
**Replies:** 1\
**Last updated:** [August 11, 2009, 1:38pm UTC](https://www.ruby-forum.com/t/translating-missing-for-i18n-in-models-after-upgrading-gem/173550 "2009-08-11T13:38:59Z")

</div>

Hi everyone, I deployed yesterday a new version of my website. For some features, I had to upgrade rubygems to 1.3.1 version. Here is my gem env : RubyGems Environment: RUBYGEMS VERSION: 1.3.1 RUBY VERSION: 1.8.6 (2…

---

## [Ruby include in the plugin 'init' works only in console mode](https://www.ruby-forum.com/t/ruby-include-in-the-plugin-init-works-only-in-console-mode/173495)

<div class="topic-metadata">

**Author:** [@krishna](https://www.ruby-forum.com/u/krishna)\
**Replies:** 4\
**Last updated:** [August 11, 2009, 12:55pm UTC](https://www.ruby-forum.com/t/ruby-include-in-the-plugin-init-works-only-in-console-mode/173495 "2009-08-11T12:55:00Z")

</div>

Hi, I have a plugin. in which there is a module. In the init of the plugin I have a statement like #ActiveRecord::Base.send (:include, Module::Plugin) Thing.send (:include, Module::Plugin) #Thing is a model That ho…

---

## [Windows federated login and the action parameter](https://www.ruby-forum.com/t/windows-federated-login-and-the-action-parameter/173555)

<div class="topic-metadata">

**Author:** [@krishna](https://www.ruby-forum.com/u/krishna)\
**Replies:** 0\
**Last updated:** [August 11, 2009, 12:49pm UTC](https://www.ruby-forum.com/t/windows-federated-login-and-the-action-parameter/173555 "2009-08-11T12:49:44Z")

</div>

Hi all, I am trying to support the Windows live web auth system (they still dont have open id fully working yet :frowning: ) .The quirk is that on login,the Windows Live send a request to your url and also specifie…

---

## [Thinking\_sphinx](https://www.ruby-forum.com/t/thinking-sphinx/173557)

<div class="topic-metadata">

**Author:** [@fisa](https://www.ruby-forum.com/u/fisa)\
**Replies:** 0\
**Last updated:** [August 11, 2009, 12:46pm UTC](https://www.ruby-forum.com/t/thinking-sphinx/173557 "2009-08-11T12:46:23Z")

</div>

hi all, I installed sphinx and thinking\_sphinx correctly.But When i am running rake thinking\_sphinx:index it showing error rake aborted! undefined method \`configuration’ for Rails:Module I can’t recognize it…Plz hel…

---

## [\[ANN\] Full Lineup Announced for Aloha on Rails, the Hawaii Ruby on Rails Conference](https://www.ruby-forum.com/t/ann-full-lineup-announced-for-aloha-on-rails-the-hawaii-ruby-on-rails-conference/173553)

<div class="topic-metadata">

**Author:** [@seth](https://www.ruby-forum.com/u/seth)\
**Replies:** 2\
**Last updated:** [August 11, 2009, 12:42pm UTC](https://www.ruby-forum.com/t/ann-full-lineup-announced-for-aloha-on-rails-the-hawaii-ruby-on-rails-conference/173553 "2009-08-11T12:42:07Z")

</div>

Aloha! We’re proud and excited to announce the full lineup of speakers and sessions for Aloha on Rails, the Hawaii Ruby on Rails Conference (http://alohaonrails.com/). A total of 28 sessions will be presented, thoug…

---

## [Paginate in rails 2.3.3](https://www.ruby-forum.com/t/paginate-in-rails-2-3-3/173554)

<div class="topic-metadata">

**Author:** [@wap](https://www.ruby-forum.com/u/wap)\
**Replies:** 1\
**Last updated:** [August 11, 2009, 12:39pm UTC](https://www.ruby-forum.com/t/paginate-in-rails-2-3-3/173554 "2009-08-11T12:39:17Z")

</div>

Hi all, i want to do paging in my project. i am trying to using will\_paginate but i can not do it. i am follow following step download will\_paginate and put in vendor/plugin/ require ‘will\_paginate’ in config/enviro…

---

## [Update record problem](https://www.ruby-forum.com/t/update-record-problem/173551)

<div class="topic-metadata">

**Author:** [@wap](https://www.ruby-forum.com/u/wap)\
**Replies:** 3\
**Last updated:** [August 11, 2009, 11:41am UTC](https://www.ruby-forum.com/t/update-record-problem/173551 "2009-08-11T11:41:58Z")

</div>

i have admins controller and in this i want to two times update one for admin and other for cateupdate both methods are different. def catedit @pro\_categorie = ProCategorie.find(params\[:id\]) end def cateupdate @pro…

---

## [Doubt in joins condition?](https://www.ruby-forum.com/t/doubt-in-joins-condition/173539)

<div class="topic-metadata">

**Author:** [@karthik](https://www.ruby-forum.com/u/karthik)\
**Replies:** 9\
**Last updated:** [August 11, 2009, 11:41am UTC](https://www.ruby-forum.com/t/doubt-in-joins-condition/173539 "2009-08-11T11:41:14Z")

</div>

hi I have two tables agencies contracts i have one statement like below @getdata=Agency.all(:joins=\>:contracts, :select=\>“agencies.\*”,:conditions=\>\[“agencies.status =?”,1 \]) i am able to access all data in agency …

---

## [A big paginate plugin problem](https://www.ruby-forum.com/t/a-big-paginate-plugin-problem/173518)

<div class="topic-metadata">

**Author:** [@Kayne](https://www.ruby-forum.com/u/Kayne)\
**Replies:** 10\
**Last updated:** [August 11, 2009, 9:20am UTC](https://www.ruby-forum.com/t/a-big-paginate-plugin-problem/173518 "2009-08-11T09:20:10Z")

</div>

Hi, I’ve got big problem. I was looking google for some info, but unfortunately, no solutions help me. So, my problem is: I’ve got this code: @pages, specs = paginate :specs, :conditions =\> \["last\_name like ?", …

---

## [Princely Plugin: get nil.size error](https://www.ruby-forum.com/t/princely-plugin-get-nil-size-error/155763)

<div class="topic-metadata">

**Author:** [@brijesh](https://www.ruby-forum.com/u/brijesh)\
**Replies:** 3\
**Last updated:** [August 11, 2009, 8:15am UTC](https://www.ruby-forum.com/t/princely-plugin-get-nil-size-error/155763 "2009-08-11T08:15:50Z")

</div>

Hi All, I want to generate pdf with css. I am using princely plugin. This is code which I written def pdf prince = Prince.new() html\_string = render\_to\_string(:template =\> ‘/users/paid\_invoice.pdf.erb’) send\_data( …

---

## [How to delete record from two table](https://www.ruby-forum.com/t/how-to-delete-record-from-two-table/173480)

<div class="topic-metadata">

**Author:** [@wap](https://www.ruby-forum.com/u/wap)\
**Replies:** 6\
**Last updated:** [August 11, 2009, 7:53am UTC](https://www.ruby-forum.com/t/how-to-delete-record-from-two-table/173480 "2009-08-11T07:53:37Z")

</div>

hello all, i got error following when i try to delete record from services table. i am display data from tables services and users so that it make “services\_users” logical table so that how to possible delete record …

---

## [Insert record in table error](https://www.ruby-forum.com/t/insert-record-in-table-error/173501)

<div class="topic-metadata">

**Author:** [@wap](https://www.ruby-forum.com/u/wap)\
**Replies:** 5\
**Last updated:** [August 11, 2009, 7:34am UTC](https://www.ruby-forum.com/t/insert-record-in-table-error/173501 "2009-08-11T07:34:56Z")

</div>

i have cateadd.html.erb file in admins folder and i want call admins controller and define method like this def cateadd @pro\_categorie = ProCategorie.new respond\_to do |formate| format.html # new.html.erb …

---

## [Controller in subfolder help](https://www.ruby-forum.com/t/controller-in-subfolder-help/173454)

<div class="topic-metadata">

**Author:** [@little\_kostas](https://www.ruby-forum.com/u/little_kostas)\
**Replies:** 2\
**Last updated:** [August 11, 2009, 7:34am UTC](https://www.ruby-forum.com/t/controller-in-subfolder-help/173454 "2009-08-11T07:34:49Z")

</div>

Hi guys, i’ve created a scaffold in an admin folder. the folders are app/ controllers/admin/books\_controller and app/views/admin/index, new etc… I changed routes.rb to look like this: … map.resources :books … map…

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

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