# Rails

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

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

---

## [Application layouts](https://www.ruby-forum.com/t/application-layouts/182318)

<div class="topic-metadata">

**Author:** [@tomtt](https://www.ruby-forum.com/u/tomtt)\
**Replies:** 1\
**Last updated:** [January 26, 2010, 5:20pm UTC](https://www.ruby-forum.com/t/application-layouts/182318 "2010-01-26T17:20:12Z")

</div>

hi, im using an application wide layout: div header /div div yield /div one particualr NEW-view of one of my models is a pop-upwindow. now, how can i exclude the div-header in that new-page? thx

---

## [How to get the value?](https://www.ruby-forum.com/t/how-to-get-the-value/182253)

<div class="topic-metadata">

**Author:** [@mcieong](https://www.ruby-forum.com/u/mcieong)\
**Replies:** 3\
**Last updated:** [January 26, 2010, 5:10pm UTC](https://www.ruby-forum.com/t/how-to-get-the-value/182253 "2010-01-26T17:10:37Z")

</div>

I wrote a small helper which receive a parameter “f”, as following: def cno\_helper(f) concat “” concat “\<div class=‘auto\_complete’ id=’” + f + “\_auto\_complete’” concat “style=‘display:none;border:none;background-col…

---

## [Routes and Requirements parameter question](https://www.ruby-forum.com/t/routes-and-requirements-parameter-question/182327)

<div class="topic-metadata">

**Author:** [@cswebgrl](https://www.ruby-forum.com/u/cswebgrl)\
**Replies:** 0\
**Last updated:** [January 26, 2010, 5:01pm UTC](https://www.ruby-forum.com/t/routes-and-requirements-parameter-question/182327 "2010-01-26T17:01:52Z")

</div>

I have done very little with customizing routes so this is new for me. I would like to send users to my users controller only if it follows a particular pattern. I think that I might be able to use requirements for t…

---

## [How do I call a Javascript function post-AJAX form submit?](https://www.ruby-forum.com/t/how-do-i-call-a-javascript-function-post-ajax-form-submit/182324)

<div class="topic-metadata">

**Author:** [@ressister](https://www.ruby-forum.com/u/ressister)\
**Replies:** 0\
**Last updated:** [January 26, 2010, 4:50pm UTC](https://www.ruby-forum.com/t/how-do-i-call-a-javascript-function-post-ajax-form-submit/182324 "2010-01-26T16:50:21Z")

</div>

Here’s my simple problem. I can’t call a javascript function that’s included in a page after an AJAX post. I think I’ve encountered something similar in the past, but can’t recall the solution. Here’s my setup: I …

---

## [Metaprogramming with RadiantCMS](https://www.ruby-forum.com/t/metaprogramming-with-radiantcms/182319)

<div class="topic-metadata">

**Author:** [@gautamry](https://www.ruby-forum.com/u/gautamry)\
**Replies:** 0\
**Last updated:** [January 26, 2010, 3:52pm UTC](https://www.ruby-forum.com/t/metaprogramming-with-radiantcms/182319 "2010-01-26T15:52:23Z")

</div>

Hi, I have been trying my hand at RadiantCMS – and had a great time. My views are shared at http://ow.ly/10z4i Enjoy the radiance! Gautam – Josh Software Pvt. Ltd. 302, Mitrangan ‘A’, Near Kapil Malhar Housing…

---

## [To\_xml method](https://www.ruby-forum.com/t/to-xml-method/182309)

<div class="topic-metadata">

**Author:** [@earlofego](https://www.ruby-forum.com/u/earlofego)\
**Replies:** 10\
**Last updated:** [January 26, 2010, 2:42pm UTC](https://www.ruby-forum.com/t/to-xml-method/182309 "2010-01-26T14:42:32Z")

</div>

Hey, i have overwritten the to\_xml method with these: http://pastie.org/793456 and i call it with: render :xml =\> Focat.find(:all) but the xml elements are displayed twice! could someone see my failure?

---

## [Database design question: building features](https://www.ruby-forum.com/t/database-design-question-building-features/182207)

<div class="topic-metadata">

**Author:** [@taylorstrait](https://www.ruby-forum.com/u/taylorstrait)\
**Replies:** 15\
**Last updated:** [January 26, 2010, 2:32pm UTC](https://www.ruby-forum.com/t/database-design-question-building-features/182207 "2010-01-26T14:32:10Z")

</div>

I am trying to decide between two different database architectures for an application to manage properties. For capturing the property features, I have two options: a single model/table with all the features as fields…

---

## [Error: SQLite3::TooBigException: String or BLOB exceeded size limit](https://www.ruby-forum.com/t/error-sqlite3-string-or-blob-exceeded-size-limit/182313)

<div class="topic-metadata">

**Author:** [@Lasse](https://www.ruby-forum.com/u/Lasse)\
**Replies:** 2\
**Last updated:** [January 26, 2010, 2:19pm UTC](https://www.ruby-forum.com/t/error-sqlite3-string-or-blob-exceeded-size-limit/182313 "2010-01-26T14:19:17Z")

</div>

I get an error message when i try to upload content to my database. Is there something wrong with my loop? titles =\> array contains about 200 titles links =\> array contains about 200 links titles.zip(links).each do |…

---

## [Action Mailer new DSL merged](https://www.ruby-forum.com/t/action-mailer-new-dsl-merged/182284)

<div class="topic-metadata">

**Author:** [@Mikel\_L](https://www.ruby-forum.com/u/Mikel_L)\
**Replies:** 6\
**Last updated:** [January 26, 2010, 1:26pm UTC](https://www.ruby-forum.com/t/action-mailer-new-dsl-merged/182284 "2010-01-26T13:26:01Z")

</div>

Hi all, Just letting you know we have a new DSL for Action Mailer. class Notifier \< ActionMailer::Base delivers\_from(“removed\_email\_address@domain.invalid”) def signup\_notification(recipient) @account = recipient a…

---

## [Testing helpers with RSpec](https://www.ruby-forum.com/t/testing-helpers-with-rspec/182306)

<div class="topic-metadata">

**Author:** [@makire](https://www.ruby-forum.com/u/makire)\
**Replies:** 0\
**Last updated:** [January 26, 2010, 12:20pm UTC](https://www.ruby-forum.com/t/testing-helpers-with-rspec/182306 "2010-01-26T12:20:27Z")

</div>

Hi all I have a helper that generates HTML for dynamically adding items to a class. It uses Formtastic for the fields: module Admin module CompetitionsHelper def add\_competition\_class\_link(form\_builder) link\_to\_fun…

---

## [NoMethodError: undefined method while running test](https://www.ruby-forum.com/t/nomethoderror-undefined-method-while-running-test/182276)

<div class="topic-metadata">

**Author:** [@vihrao](https://www.ruby-forum.com/u/vihrao)\
**Replies:** 3\
**Last updated:** [January 26, 2010, 12:08pm UTC](https://www.ruby-forum.com/t/nomethoderror-undefined-method-while-running-test/182276 "2010-01-26T12:08:10Z")

</div>

I run the command: ruby test/unit/user\_test.rb I get the error: NoMethodError: undefined method authenticate' for #\<Class:0x193dd20\> C:/Ruby19/lib/ruby/gems/1.9.1/gems/activerecord-2.3.5/lib/active\_record/base .rb:1959…

---

## [I18n controller-view](https://www.ruby-forum.com/t/i18n-controller-view/182298)

<div class="topic-metadata">

**Author:** [@furoh](https://www.ruby-forum.com/u/furoh)\
**Replies:** 1\
**Last updated:** [January 26, 2010, 10:20am UTC](https://www.ruby-forum.com/t/i18n-controller-view/182298 "2010-01-26T10:20:29Z")

</div>

hello, could you tell me why this doesn’t work? controller: flash\[:success\] = t(‘flash.added’, :item =\> t(‘dictionary.challenge’)) en.yml dictionary: challenge: Challenge flash: added: {{item}} has been successful…

---

## [Rake spec no such file to load -- spec\_helper](https://www.ruby-forum.com/t/rake-spec-no-such-file-to-load-spec-helper/182300)

<div class="topic-metadata">

**Author:** [@ilmari2k](https://www.ruby-forum.com/u/ilmari2k)\
**Replies:** 0\
**Last updated:** [January 26, 2010, 9:46am UTC](https://www.ruby-forum.com/t/rake-spec-no-such-file-to-load-spec-helper/182300 "2010-01-26T09:46:30Z")

</div>

I get the following error: kontulai@gamma2:~/myproject$ rails myproject kontulai@gamma2:~/myproject$ cd myproject/ kontulai@gamma2:~/myproject$ script/generate rspec kontulai@gamma2:~/myproject$ script/generate rspec…

---

## [Has\_many, :finder\_sql, setting attributes](https://www.ruby-forum.com/t/has-many-finder-sql-setting-attributes/182297)

<div class="topic-metadata">

**Author:** [@David\_van\_Geest](https://www.ruby-forum.com/u/David_van_Geest)\
**Replies:** 0\
**Last updated:** [January 26, 2010, 9:29am UTC](https://www.ruby-forum.com/t/has-many-finder-sql-setting-attributes/182297 "2010-01-26T09:29:31Z")

</div>

Hi all, My question is somewhat complicated, but bear with me. My project has a number of models: User, Program, and Team. Users belong to multiple Programs. Programs have multiple teams, but Teams belong to one p…

---

## [Help with Associations: Templates, Documents and Options](https://www.ruby-forum.com/t/help-with-associations-templates-documents-and-options/182291)

<div class="topic-metadata">

**Author:** [@anmueller](https://www.ruby-forum.com/u/anmueller)\
**Replies:** 0\
**Last updated:** [January 26, 2010, 7:25am UTC](https://www.ruby-forum.com/t/help-with-associations-templates-documents-and-options/182291 "2010-01-26T07:25:27Z")

</div>

So I have a rails project that I’m working on and I have it doing what I want, but I’m fairly certain what I’ve done is at best a horrendous hack. I was wondering if anyone could give me a very general suggestion for …

---

## [A problem when testing a CallBack in model](https://www.ruby-forum.com/t/a-problem-when-testing-a-callback-in-model/182293)

<div class="topic-metadata">

**Author:** [@terrytie](https://www.ruby-forum.com/u/terrytie)\
**Replies:** 0\
**Last updated:** [January 26, 2010, 7:00am UTC](https://www.ruby-forum.com/t/a-problem-when-testing-a-callback-in-model/182293 "2010-01-26T07:00:53Z")

</div>

hey guys: I met a very strange problem when testing a CallBack in model. I think the codes are very straightforward. model: class Download \< ActiveRecord::Base belongs\_to :user belongs\_to :drink after\_create :add\_…

---

## [Convert to numeric](https://www.ruby-forum.com/t/convert-to-numeric/182287)

<div class="topic-metadata">

**Author:** [@saboor](https://www.ruby-forum.com/u/saboor)\
**Replies:** 1\
**Last updated:** [January 26, 2010, 6:35am UTC](https://www.ruby-forum.com/t/convert-to-numeric/182287 "2010-01-26T06:35:28Z")

</div>

hi, i am new user of ruby on rails i have a problem in casting a variable in to int , my code is @EmployeeTenure = Employeepersonaldetail.find\_by\_sql("select round (DATEDIFF("date1,date2)/365,0) from table where Emplo…

---

## [Arrays to database](https://www.ruby-forum.com/t/arrays-to-database/182273)

<div class="topic-metadata">

**Author:** [@Lasse](https://www.ruby-forum.com/u/Lasse)\
**Replies:** 3\
**Last updated:** [January 26, 2010, 4:40am UTC](https://www.ruby-forum.com/t/arrays-to-database/182273 "2010-01-26T04:40:26Z")

</div>

Hello I’m a RoR newbe facing a problem. I would like to upload two arrays to a database called ‘wrtlist’ i used this migration file to create the database class AddWrtsList \< ActiveRecord::Migration def self.up crea…

---

## [List associations in a particular model or object](https://www.ruby-forum.com/t/list-associations-in-a-particular-model-or-object/182205)

<div class="topic-metadata">

**Author:** [@r-a-mueller](https://www.ruby-forum.com/u/r-a-mueller)\
**Replies:** 2\
**Last updated:** [January 26, 2010, 1:50am UTC](https://www.ruby-forum.com/t/list-associations-in-a-particular-model-or-object/182205 "2010-01-26T01:50:41Z")

</div>

Hi, Just a quick question is it possible to list the associations of a particular model or object Many thanks Richard

---

## [Button](https://www.ruby-forum.com/t/button/182216)

<div class="topic-metadata">

**Author:** [@tom-mac](https://www.ruby-forum.com/u/tom-mac)\
**Replies:** 8\
**Last updated:** [January 26, 2010, 1:45am UTC](https://www.ruby-forum.com/t/button/182216 "2010-01-26T01:45:24Z")

</div>

Hi I have Create Could anybody say get the same above using railshelper I tried f.submit “Create”,:class =\> ‘class1’ But not correct Thanks Tom

---

## [Crash on attempt to configure capistrano](https://www.ruby-forum.com/t/crash-on-attempt-to-configure-capistrano/181716)

<div class="topic-metadata">

**Author:** [@trapper](https://www.ruby-forum.com/u/trapper)\
**Replies:** 2\
**Last updated:** [January 25, 2010, 11:43pm UTC](https://www.ruby-forum.com/t/crash-on-attempt-to-configure-capistrano/181716 "2010-01-25T23:43:53Z")

</div>

I’m new with capistrano ant tried to configure my server usind: cap mongrel:cluster:configure And got this error backtrace: /usr/lib/ruby/gems/1.8/gems/capistrano-2.5.13/lib/capistrano/configuration/variables.rb:122:i…

---

## [ActionMailer does not find templates in production mode](https://www.ruby-forum.com/t/actionmailer-does-not-find-templates-in-production-mode/182213)

<div class="topic-metadata">

**Author:** [@Thilo-Alexander\_Gin](https://www.ruby-forum.com/u/Thilo-Alexander_Gin)\
**Replies:** 1\
**Last updated:** [January 25, 2010, 10:58pm UTC](https://www.ruby-forum.com/t/actionmailer-does-not-find-templates-in-production-mode/182213 "2010-01-25T22:58:35Z")

</div>

Hello everyone, I am currently struggling with the following issue that only seems to appear in my production environment: When attempting to send a mail from an ActionMailer the template location algorithm does no…

---

## [Embedding a rails app in a Google Sites site?](https://www.ruby-forum.com/t/embedding-a-rails-app-in-a-google-sites-site/182204)

<div class="topic-metadata">

**Author:** [@avramd](https://www.ruby-forum.com/u/avramd)\
**Replies:** 4\
**Last updated:** [January 25, 2010, 10:53pm UTC](https://www.ruby-forum.com/t/embedding-a-rails-app-in-a-google-sites-site/182204 "2010-01-25T22:53:11Z")

</div>

Has anybody figured out a way to use Google Sites to create all the static content for a site but then have certain pages call out to a rails app and inject the results directly into the Sites page? I was hoping it wa…

---

## [Building main page with admin controller](https://www.ruby-forum.com/t/building-main-page-with-admin-controller/182187)

<div class="topic-metadata">

**Author:** [@vihrao](https://www.ruby-forum.com/u/vihrao)\
**Replies:** 7\
**Last updated:** [January 25, 2010, 10:18pm UTC](https://www.ruby-forum.com/t/building-main-page-with-admin-controller/182187 "2010-01-25T22:18:06Z")

</div>

I am trying to build a main page with a customized view containing login control and several 'div with menus and buttons all combined into one page. I believe I have to use admin controller. Is there an article that s…

---

## [Field update, best practice](https://www.ruby-forum.com/t/field-update-best-practice/182243)

<div class="topic-metadata">

**Author:** [@adedip](https://www.ruby-forum.com/u/adedip)\
**Replies:** 4\
**Last updated:** [January 25, 2010, 9:25pm UTC](https://www.ruby-forum.com/t/field-update-best-practice/182243 "2010-01-25T21:25:29Z")

</div>

Hi everybody… I’m stuck with a strange (stupid) problem I can’t understand. I’m trying to do this in the articles\_controller: def updatecollection @arts = Article.find\_by\_solr(“14 MAY 91”).results @arts.each do |doc…

---

## [Aggregate similar sentences](https://www.ruby-forum.com/t/aggregate-similar-sentences/182268)

<div class="topic-metadata">

**Author:** [@furoh](https://www.ruby-forum.com/u/furoh)\
**Replies:** 9\
**Last updated:** [January 25, 2010, 9:12pm UTC](https://www.ruby-forum.com/t/aggregate-similar-sentences/182268 "2010-01-25T21:12:48Z")

</div>

Hello, I want to aggregate some similar sentences, which will work with i18n in the en.yml file Now I have redundancies like: challenge\_created\_success: Challenge has been successfully created. change\_created: Chang…

---

## [Dynamic attributes!](https://www.ruby-forum.com/t/dynamic-attributes/182209)

<div class="topic-metadata">

**Author:** [@demec](https://www.ruby-forum.com/u/demec)\
**Replies:** 3\
**Last updated:** [January 25, 2010, 9:07pm UTC](https://www.ruby-forum.com/t/dynamic-attributes/182209 "2010-01-25T21:07:55Z")

</div>

I want to create a general model ‘Product’ that I will be able to store several attributes in it. For example the attributes :id :name :description are pretty stantard. So each product will have this attributes. H…

---

## [Best search facility](https://www.ruby-forum.com/t/best-search-facility/182196)

<div class="topic-metadata">

**Author:** [@craigrails](https://www.ruby-forum.com/u/craigrails)\
**Replies:** 6\
**Last updated:** [January 25, 2010, 8:56pm UTC](https://www.ruby-forum.com/t/best-search-facility/182196 "2010-01-25T20:56:48Z")

</div>

Hi All, this may over-lap with my recent ferret post, but I wondered if anyone knew of the best way to add a search engine for rails on your site? I’ve tried ferret, which seems a bit ‘‘hit n miss’’ Someone has also …

---

## [Routes and permalinks problem](https://www.ruby-forum.com/t/routes-and-permalinks-problem/182256)

<div class="topic-metadata">

**Author:** [@cswebgrl](https://www.ruby-forum.com/u/cswebgrl)\
**Replies:** 2\
**Last updated:** [January 25, 2010, 7:52pm UTC](https://www.ruby-forum.com/t/routes-and-permalinks-problem/182256 "2010-01-25T19:52:47Z")

</div>

Hi. I’ve got a user who wants url’s to look like this: www.domain.com/firstname-lastname. Right now I have a route set up like this map.user ‘:user’, :controller =\> ‘user’, :action =\> ‘show’ This causes problems whe…

---

## [Mongrel\_rails unable to start (cant find rubygems)](https://www.ruby-forum.com/t/mongrel-rails-unable-to-start-cant-find-rubygems/182262)

<div class="topic-metadata">

**Author:** [@hirodusk](https://www.ruby-forum.com/u/hirodusk)\
**Replies:** 1\
**Last updated:** [January 25, 2010, 7:10pm UTC](https://www.ruby-forum.com/t/mongrel-rails-unable-to-start-cant-find-rubygems/182262 "2010-01-25T19:10:09Z")

</div>

I am currently nearing the end (hopefully) of a ruby versions nightmare on OSX… I ended up installing rubygems again. However one of my remaining problems is I am unable to start mongrel due to this error: /usr/bin/m…

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

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