# Rails

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

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

---

## [Storing constant data in a separate database](https://www.ruby-forum.com/t/storing-constant-data-in-a-separate-database/191536)

<div class="topic-metadata">

**Author:** [@fearless\_fool](https://www.ruby-forum.com/u/fearless_fool)\
**Replies:** 2\
**Last updated:** [July 14, 2010, 9:16pm UTC](https://www.ruby-forum.com/t/storing-constant-data-in-a-separate-database/191536 "2010-07-14T21:16:39Z")

</div>

Following a suggestion by Rob B. removed\_email\_address@domain.invalid, I’m setting up a separate database to hold “constant” data, ie, tables that are not changed by my application. (Though they are occasionally chan…

---

## [Creating AR access to an external, readonly database](https://www.ruby-forum.com/t/creating-ar-access-to-an-external-readonly-database/191587)

<div class="topic-metadata">

**Author:** [@fearless\_fool](https://www.ruby-forum.com/u/fearless_fool)\
**Replies:** 0\
**Last updated:** [July 14, 2010, 9:13pm UTC](https://www.ruby-forum.com/t/creating-ar-access-to-an-external-readonly-database/191587 "2010-07-14T21:13:36Z")

</div>

Based on excellent suggestions by Rob B. removed\_email\_address@domain.invalid in Storing constant data in a separate database - Rails - Ruby-Forum …here’s a recipe for setting up access to an external readonly databa…

---

## [Image croping with Ruby on Rails](https://www.ruby-forum.com/t/image-croping-with-ruby-on-rails/191564)

<div class="topic-metadata">

**Author:** [@amitjain](https://www.ruby-forum.com/u/amitjain)\
**Replies:** 1\
**Last updated:** [July 14, 2010, 7:25pm UTC](https://www.ruby-forum.com/t/image-croping-with-ruby-on-rails/191564 "2010-07-14T19:25:26Z")

</div>

Hi All, I am new in ROR. I want to implement Image cropping with Ruby on Rails. please help me how can implement and where can i find the code. Thanks Amit

---

## [Sphinx search not indexing the new record](https://www.ruby-forum.com/t/sphinx-search-not-indexing-the-new-record/191555)

<div class="topic-metadata">

**Author:** [@gandhi-tush](https://www.ruby-forum.com/u/gandhi-tush)\
**Replies:** 1\
**Last updated:** [July 14, 2010, 7:24pm UTC](https://www.ruby-forum.com/t/sphinx-search-not-indexing-the-new-record/191555 "2010-07-14T19:24:16Z")

</div>

Hi, I have an application which is doing search using “sphnix” search. Everything is working fine but whenever user adding new record it is not able to index. For that I have to again reindex the all records. My user…

---

## [\[Jobs\] Groupon is looking for RoR Developers in Chicago and Palo Alto](https://www.ruby-forum.com/t/jobs-groupon-is-looking-for-ror-developers-in-chicago-and-palo-alto/191577)

<div class="topic-metadata">

**Author:** [@CMcComb](https://www.ruby-forum.com/u/CMcComb)\
**Replies:** 0\
**Last updated:** [July 14, 2010, 7:04pm UTC](https://www.ruby-forum.com/t/jobs-groupon-is-looking-for-ror-developers-in-chicago-and-palo-alto/191577 "2010-07-14T19:04:57Z")

</div>

Groupon is seeking top-notch developers who love working on all aspects of software used by millions of people around the world. We are looking to add to a talented team of folks who are passionate about software and…

---

## [Avoid re-finding already-loaded associations](https://www.ruby-forum.com/t/avoid-re-finding-already-loaded-associations/191568)

<div class="topic-metadata">

**Author:** [@cmaxvv](https://www.ruby-forum.com/u/cmaxvv)\
**Replies:** 2\
**Last updated:** [July 14, 2010, 4:44pm UTC](https://www.ruby-forum.com/t/avoid-re-finding-already-loaded-associations/191568 "2010-07-14T16:44:50Z")

</div>

I have a situation where an instance method pulls out a selection from a set of associated objects. Sometimes when this is called the associated objects have been eager loaded, in which case it makes most sense to use …

---

## [How to run unit tests w/o first blowing away test db?](https://www.ruby-forum.com/t/how-to-run-unit-tests-w-o-first-blowing-away-test-db/191462)

<div class="topic-metadata">

**Author:** [@fearless\_fool](https://www.ruby-forum.com/u/fearless_fool)\
**Replies:** 26\
**Last updated:** [July 14, 2010, 4:38pm UTC](https://www.ruby-forum.com/t/how-to-run-unit-tests-w-o-first-blowing-away-test-db/191462 "2010-07-14T16:38:33Z")

</div>

The documentation on fixtures makes a tantalizing claim: | If you preload your test database with all fixture data | (probably in the Rakefile task) and use transactional | fixtures, then you may omit all fixtures dec…

---

## [Example of Wordpress for main site, Rails app in subdomain?](https://www.ruby-forum.com/t/example-of-wordpress-for-main-site-rails-app-in-subdomain/191566)

<div class="topic-metadata">

**Author:** [@tcsh](https://www.ruby-forum.com/u/tcsh)\
**Replies:** 0\
**Last updated:** [July 14, 2010, 4:09pm UTC](https://www.ruby-forum.com/t/example-of-wordpress-for-main-site-rails-app-in-subdomain/191566 "2010-07-14T16:09:17Z")

</div>

Can anybody point me to an example of a website that uses wordpress as the main content management and a rails app within a subdomain? www.domain.com would be a wordpress installation. subdomain.domain.com would be a …

---

## [Email on error](https://www.ruby-forum.com/t/email-on-error/191544)

<div class="topic-metadata">

**Author:** [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Replies:** 2\
**Last updated:** [July 14, 2010, 2:38pm UTC](https://www.ruby-forum.com/t/email-on-error/191544 "2010-07-14T14:38:46Z")

</div>

Hello All, Is there any built in method/gem which can send an email when any kind of error comes in your application?

---

## [Adding a path attribute to a form](https://www.ruby-forum.com/t/adding-a-path-attribute-to-a-form/191519)

<div class="topic-metadata">

**Author:** [@daisagah](https://www.ruby-forum.com/u/daisagah)\
**Replies:** 1\
**Last updated:** [July 14, 2010, 2:32pm UTC](https://www.ruby-forum.com/t/adding-a-path-attribute-to-a-form/191519 "2010-07-14T14:32:05Z")

</div>

Hi there, I’m using a form tag to implement a search text\_field. \<% form\_tag catalogues\_path(:select =\> params\[:select\]), :method =\> “get”, :class =\> “search\_form” do %\> The problem is the catalogues\_path which shoul…

---

## [Search area](https://www.ruby-forum.com/t/search-area/191513)

<div class="topic-metadata">

**Author:** [@anat42000](https://www.ruby-forum.com/u/anat42000)\
**Replies:** 1\
**Last updated:** [July 14, 2010, 2:32pm UTC](https://www.ruby-forum.com/t/search-area/191513 "2010-07-14T14:32:04Z")

</div>

Hi, I’ve implemented two boxes of research which correspond to two columns of my table. This solution works well: In my index.html.erb: \<% form\_tag search\_intervenants\_path, :method =\> :get do %\> \<%= label\_tag “code…

---

## [Can you have a model with attributes of another model?](https://www.ruby-forum.com/t/can-you-have-a-model-with-attributes-of-another-model/191527)

<div class="topic-metadata">

**Author:** [@jakx12](https://www.ruby-forum.com/u/jakx12)\
**Replies:** 4\
**Last updated:** [July 14, 2010, 12:53pm UTC](https://www.ruby-forum.com/t/can-you-have-a-model-with-attributes-of-another-model/191527 "2010-07-14T12:53:03Z")

</div>

Ok so basically I have a problem. Im relatively new to rails and i seem to have come to a dead end. I wanted a model that could either be a URL, a video, a picture or a sound recording. Obviously this is impossible. I …

---

## [Prawn question](https://www.ruby-forum.com/t/prawn-question/191313)

<div class="topic-metadata">

**Author:** [@upabibi](https://www.ruby-forum.com/u/upabibi)\
**Replies:** 13\
**Last updated:** [July 14, 2010, 6:40am UTC](https://www.ruby-forum.com/t/prawn-question/191313 "2010-07-14T06:40:43Z")

</div>

First off all, it’s important to say that I’m just using PRAWN gem, i’m NOT using prawnto plugin. So… It creates a PDF file, but the question is: How can I use a list (for example, if I wanna use the name and the mail …

---

## [Cannot pass digest authentication](https://www.ruby-forum.com/t/cannot-pass-digest-authentication/191525)

<div class="topic-metadata">

**Author:** [@alexamat](https://www.ruby-forum.com/u/alexamat)\
**Replies:** 0\
**Last updated:** [July 13, 2010, 10:15pm UTC](https://www.ruby-forum.com/t/cannot-pass-digest-authentication/191525 "2010-07-13T22:15:34Z")

</div>

I am implementing digest authentication. I copied example of authenticate\_or\_request\_with\_http\_digest and tried different approaches but I couldn’t pass the authentication. I always get 401 Unauthorized. My code exact…

---

## [Ruby on Rails Developers needed in Chicago](https://www.ruby-forum.com/t/ruby-on-rails-developers-needed-in-chicago/191520)

<div class="topic-metadata">

**Author:** [@katie\_hewes](https://www.ruby-forum.com/u/katie_hewes)\
**Replies:** 0\
**Last updated:** [July 13, 2010, 8:35pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-developers-needed-in-chicago/191520 "2010-07-13T20:35:38Z")

</div>

Hi I hope you all are well. Do you know of any one looking for a contract, CTH or fulltime ruby on rails positin in Chicago? Thanks for your help! Katie removed\_email\_address@domain.invalid 312-756-1760 ext. 257

---

## [Installation problem](https://www.ruby-forum.com/t/installation-problem/191448)

<div class="topic-metadata">

**Author:** [@Roy\_Yu](https://www.ruby-forum.com/u/Roy_Yu)\
**Replies:** 4\
**Last updated:** [July 13, 2010, 7:24pm UTC](https://www.ruby-forum.com/t/installation-problem/191448 "2010-07-13T19:24:13Z")

</div>

Hi all, I’m a newbies for ruby and need some help for installation blocker. I have my ruby installed “ruby 1.9.2dev (2010-07-11 revision 28613) \[i686-linux\]” And then I install the rails sudo gem install rails --pre …

---

## [Getting belongs\_to and has\_many working: good plan?](https://www.ruby-forum.com/t/getting-belongs-to-and-has-many-working-good-plan/191457)

<div class="topic-metadata">

**Author:** [@RichardOnRails](https://www.ruby-forum.com/u/RichardOnRails)\
**Replies:** 12\
**Last updated:** [July 13, 2010, 7:11pm UTC](https://www.ruby-forum.com/t/getting-belongs-to-and-has-many-working-good-plan/191457 "2010-07-13T19:11:55Z")

</div>

I just added these linkage statements to my Expense and Vendor models, respectively. I found a “HOWTO: Beginning Relationships” webpage (http://www.railsforum.com/viewtopic.php?id=265). That leads me to think that I …

---

## [HTML5/CSS3 and Rails](https://www.ruby-forum.com/t/html5-css3-and-rails/191515)

<div class="topic-metadata">

**Author:** [@MrSWinnymann](https://www.ruby-forum.com/u/MrSWinnymann)\
**Replies:** 0\
**Last updated:** [July 13, 2010, 7:00pm UTC](https://www.ruby-forum.com/t/html5-css3-and-rails/191515 "2010-07-13T19:00:11Z")

</div>

I have 3 projects which are experimental. They are more of a wish to improve or offer better services and products, to other sections of society, that i have used in the past that i feel are delivered badly. This proj…

---

## [Polymorphic association question](https://www.ruby-forum.com/t/polymorphic-association-question/191512)

<div class="topic-metadata">

**Author:** [@joep](https://www.ruby-forum.com/u/joep)\
**Replies:** 0\
**Last updated:** [July 13, 2010, 6:59pm UTC](https://www.ruby-forum.com/t/polymorphic-association-question/191512 "2010-07-13T18:59:36Z")

</div>

Question from a relative newbie. I have the following models (rails -v Rails 2.3.8) class Node \< ActiveRecord::Base belongs\_to :containable, :polymorphic =\> true end class Root \< ActiveRecord::Base has\_one :node, :…

---

## [\[R3B4\] errors\[:base\] = appends, doesn't "set" - bug, feature, or "error 18"?](https://www.ruby-forum.com/t/r3b4-errors-base-appends-doesnt-set-bug-feature-or-error-18/191450)

<div class="topic-metadata">

**Author:** [@Phoenix\_R](https://www.ruby-forum.com/u/Phoenix_R)\
**Replies:** 2\
**Last updated:** [July 13, 2010, 6:05pm UTC](https://www.ruby-forum.com/t/r3b4-errors-base-appends-doesnt-set-bug-feature-or-error-18/191450 "2010-07-13T18:05:07Z")

</div>

If you haven’t heard, an “error 18” means “the error is 18 inches from the screen.” Which would mean that I totally get that this could just be me being stupid. However, for some reason I’m thinking this violates the…

---

## [Rails, rake and crontab](https://www.ruby-forum.com/t/rails-rake-and-crontab/191505)

<div class="topic-metadata">

**Author:** [@addame](https://www.ruby-forum.com/u/addame)\
**Replies:** 3\
**Last updated:** [July 13, 2010, 5:29pm UTC](https://www.ruby-forum.com/t/rails-rake-and-crontab/191505 "2010-07-13T17:29:51Z")

</div>

I have a rails rake task which runs just fine. I want this task to be run periodically by crontab so I added it to crontab as follows : 0,30,0 cd /var/www/html/myapp && RAILS\_ENV=production /usr/local/bin/rake …

---

## [\[ADV\] Rails Studio in Santa Clara, CA Next Month](https://www.ruby-forum.com/t/adv-rails-studio-in-santa-clara-ca-next-month/191507)

<div class="topic-metadata">

**Author:** [@clarkware](https://www.ruby-forum.com/u/clarkware)\
**Replies:** 0\
**Last updated:** [July 13, 2010, 4:41pm UTC](https://www.ruby-forum.com/t/adv-rails-studio-in-santa-clara-ca-next-month/191507 "2010-07-13T16:41:57Z")

</div>

Hi Folks, Just wanted to let you know that we’ll be running a Rails Studio taught by Dave T. and Chad F. in Santa Clara, CA on August 18-20. This 3-day, hands-on course has been redesigned to take advantage of the l…

---

## [Changed path while upgrade from 0.3.6 to 0.4.0](https://www.ruby-forum.com/t/changed-path-while-upgrade-from-0-3-6-to-0-4-0/191503)

<div class="topic-metadata">

**Author:** [@schubi](https://www.ruby-forum.com/u/schubi)\
**Replies:** 0\
**Last updated:** [July 13, 2010, 4:17pm UTC](https://www.ruby-forum.com/t/changed-path-while-upgrade-from-0-3-6-to-0-4-0/191503 "2010-07-13T16:17:21Z")

</div>

Hi, for version 0.3.6 we have used: include I18n::Helpers::Gettext This path has been changed for version 0.4.0 to include I18n::Gettext::Helpers Is this a bug or a feature ? :slight\_smile: Cause the docu (comments…

---

## [Populate default data in tables when object is created](https://www.ruby-forum.com/t/populate-default-data-in-tables-when-object-is-created/191490)

<div class="topic-metadata">

**Author:** [@kinunt](https://www.ruby-forum.com/u/kinunt)\
**Replies:** 4\
**Last updated:** [July 13, 2010, 3:36pm UTC](https://www.ruby-forum.com/t/populate-default-data-in-tables-when-object-is-created/191490 "2010-07-13T15:36:26Z")

</div>

Hi, How can I populate a table (create several default objects) after a company (an object) is created. I would use after\_create inside the Company model but I need to populate a lot of data and I think the model is …

---

## [Unknown Method key? error in Rails 2.3.8 Unit testing](https://www.ruby-forum.com/t/unknown-method-key-error-in-rails-2-3-8-unit-testing/191501)

<div class="topic-metadata">

**Author:** [@luckydev](https://www.ruby-forum.com/u/luckydev)\
**Replies:** 0\
**Last updated:** [July 13, 2010, 3:27pm UTC](https://www.ruby-forum.com/t/unknown-method-key-error-in-rails-2-3-8-unit-testing/191501 "2010-07-13T15:27:07Z")

</div>

I was writing unit tests for my models for a while. After that I was tweaking around and again continued writing unit tests. Earlier all my unit tests were working - successfully. But now WHen I run them, it gives me …

---

## [Using a query as a class variable](https://www.ruby-forum.com/t/using-a-query-as-a-class-variable/191471)

<div class="topic-metadata">

**Author:** [@zatta105](https://www.ruby-forum.com/u/zatta105)\
**Replies:** 3\
**Last updated:** [July 13, 2010, 3:17pm UTC](https://www.ruby-forum.com/t/using-a-query-as-a-class-variable/191471 "2010-07-13T15:17:05Z")

</div>

Hi everyone, I have the following basic rules: Subject has many elements Element has many subjects Element has many knowledges which are either enabled or required Element has many skills which are either enabled or…

---

## [Named scopee on an association table](https://www.ruby-forum.com/t/named-scopee-on-an-association-table/191477)

<div class="topic-metadata">

**Author:** [@gregm](https://www.ruby-forum.com/u/gregm)\
**Replies:** 6\
**Last updated:** [July 13, 2010, 2:47pm UTC](https://www.ruby-forum.com/t/named-scopee-on-an-association-table/191477 "2010-07-13T14:47:09Z")

</div>

Hi, I have a Category and a Model product with an association table categories\_products. I want a named that returns the categories with products. Here is what I’ve done (in the Category model): named\_scope :with\_pr…

---

## [Will\_paginate destroys link\_to\_remote?!](https://www.ruby-forum.com/t/will-paginate-destroys-link-to-remote/191486)

<div class="topic-metadata">

**Author:** [@cojones](https://www.ruby-forum.com/u/cojones)\
**Replies:** 1\
**Last updated:** [July 13, 2010, 12:43pm UTC](https://www.ruby-forum.com/t/will-paginate-destroys-link-to-remote/191486 "2010-07-13T12:43:01Z")

</div>

Hello, I’ve got a list in a view and each of element of it has a link\_to\_remote and everything worked like a charm. Now I added AJAX pagination and the link\_to\_remote doesn’t work anymore. This is the partial of the …

---

## [Newbie: what is preferred approach for including javascript files?](https://www.ruby-forum.com/t/newbie-what-is-preferred-approach-for-including-javascript-files/191443)

<div class="topic-metadata">

**Author:** [@Lille](https://www.ruby-forum.com/u/Lille)\
**Replies:** 1\
**Last updated:** [July 13, 2010, 12:25pm UTC](https://www.ruby-forum.com/t/newbie-what-is-preferred-approach-for-including-javascript-files/191443 "2010-07-13T12:25:03Z")

</div>

Hi, What is the cost of not cacheing javascript? If that cost is serious, do I prefer to selectively include javascript files only for view where they are needed? In other words I see four options: Cache everything …

---

## [\[ANN/ADV\] The Compleat Rubyist, Philadelphia, PA, October 1-2 2010](https://www.ruby-forum.com/t/ann-adv-the-compleat-rubyist-philadelphia-pa-october-1-2-2010/191485)

<div class="topic-metadata">

**Author:** [@David\_ASBlack](https://www.ruby-forum.com/u/David_ASBlack)\
**Replies:** 0\
**Last updated:** [July 13, 2010, 12:23pm UTC](https://www.ruby-forum.com/t/ann-adv-the-compleat-rubyist-philadelphia-pa-october-1-2-2010/191485 "2010-07-13T12:23:42Z")

</div>

Hello everyone – I’m very pleased to announce that the next Compleat Rubyist event will be held in Philadelphia, PA, at the Crowne Plaza Philadelphia West, October 1-2, 2010. The Compleat Rubyist is a unique two-day …

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

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