# Rails

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

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

---

## [ActiveRecord & SQLite3 Blobs](https://www.ruby-forum.com/t/activerecord-sqlite3-blobs/136897)

<div class="topic-metadata">

**Author:** [@jay](https://www.ruby-forum.com/u/jay)\
**Replies:** 0\
**Last updated:** [May 7, 2008, 7:15am UTC](https://www.ruby-forum.com/t/activerecord-sqlite3-blobs/136897 "2008-05-07T07:15:50Z")

</div>

There is a problem with blobs in ActiveRecord when you’re using sqlite3: sql length limits. Sqlite3 limits the size of the sql queries to 1mb. Because AR puts everything into the sql text, you can’t insert a blob o…

---

## [Best cron job method for email notifications?](https://www.ruby-forum.com/t/best-cron-job-method-for-email-notifications/135919)

<div class="topic-metadata">

**Author:** [@AtsoK](https://www.ruby-forum.com/u/AtsoK)\
**Replies:** 1\
**Last updated:** [May 7, 2008, 7:05am UTC](https://www.ruby-forum.com/t/best-cron-job-method-for-email-notifications/135919 "2008-05-07T07:05:54Z")

</div>

There are so many ways to do cron jobs in Rails (Backgroundrb, script/ runner, etc.) but I am wondering what would be the best to use in production, just for sending out email/SMS notifications? For example, an email …

---

## [Only get, head, post, put, and delete requests are allowed](https://www.ruby-forum.com/t/only-get-head-post-put-and-delete-requests-are-allowed/135921)

<div class="topic-metadata">

**Author:** [@qertoip](https://www.ruby-forum.com/u/qertoip)\
**Replies:** 3\
**Last updated:** [May 7, 2008, 6:28am UTC](https://www.ruby-forum.com/t/only-get-head-post-put-and-delete-requests-are-allowed/135921 "2008-05-07T06:28:22Z")

</div>

Rails REVISION\_9248 (edge before 2.1) Sometimes I get a very strange exception: " ActionController::MethodNotAllowed Only get, head, post, put, and delete requests are allowed. " Notice that all HTTP methods are al…

---

## [Variables output in views/layouts?](https://www.ruby-forum.com/t/variables-output-in-views-layouts/136765)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 8\
**Last updated:** [May 7, 2008, 4:22am UTC](https://www.ruby-forum.com/t/variables-output-in-views-layouts/136765 "2008-05-07T04:22:39Z")

</div>

Hi, I usually always deal with arrays this is the first time I have to deal with a regular variable on a different view in this case in the layout… so I have in my method: def online @online = Status.count\_by\_sql “SE…

---

## [Assigning to the foreign key on a belongs\_to association](https://www.ruby-forum.com/t/assigning-to-the-foreign-key-on-a-belongs-to-association/136876)

<div class="topic-metadata">

**Author:** [@Matt\_Westcott](https://www.ruby-forum.com/u/Matt_Westcott)\
**Replies:** 1\
**Last updated:** [May 7, 2008, 2:56am UTC](https://www.ruby-forum.com/t/assigning-to-the-foreign-key-on-a-belongs-to-association/136876 "2008-05-07T02:56:40Z")

</div>

I’ve encountered what seems like an odd omission in the behaviour of belongs\_to associations: if you assign to the foreign key attribute, it doesn’t update the associated object (or mark a previously loaded one as sta…

---

## [Why is my partial being skipped/cached?](https://www.ruby-forum.com/t/why-is-my-partial-being-skipped-cached/136872)

<div class="topic-metadata">

**Author:** [@michael\_teter](https://www.ruby-forum.com/u/michael_teter)\
**Replies:** 1\
**Last updated:** [May 7, 2008, 1:27am UTC](https://www.ruby-forum.com/t/why-is-my-partial-being-skipped-cached/136872 "2008-05-07T01:27:11Z")

</div>

Howdy. I’ve got a controller action that calls render :template =\> “my\_view/errors” errors.rhtml simply renders a partial \<%= render(:partial =\> ‘error\_list\_section’) %\> \_error\_list\_section.rhtml does a few things, …

---

## [Web site programming needed-site already designed (Ruby on Rails and Wordpress)](https://www.ruby-forum.com/t/web-site-programming-needed-site-already-designed-ruby-on-rails-and-wordpress/136873)

<div class="topic-metadata">

**Author:** [@Steven](https://www.ruby-forum.com/u/Steven)\
**Replies:** 0\
**Last updated:** [May 7, 2008, 1:12am UTC](https://www.ruby-forum.com/t/web-site-programming-needed-site-already-designed-ruby-on-rails-and-wordpress/136873 "2008-05-07T01:12:34Z")

</div>

Description: SITE IS ALREADY DESIGNED COMPLETELY JUST NEEDS CODING. I need 34 pages except for home page & portfolio to be wordpress setup Or RUBY ON RAILS, AJAX, or JOOMLA for entire site. need Create a photography …

---

## [Why before\_filter is not working?](https://www.ruby-forum.com/t/why-before-filter-is-not-working/136766)

<div class="topic-metadata">

**Author:** [@maestro777](https://www.ruby-forum.com/u/maestro777)\
**Replies:** 12\
**Last updated:** [May 7, 2008, 1:05am UTC](https://www.ruby-forum.com/t/why-before-filter-is-not-working/136766 "2008-05-07T01:05:32Z")

</div>

I have been scratching my head on this one for most of the day. Hopefully someone can help explain why before\_filter isn’t working for my codes. In my Application controller, I have this: before\_filter :login\_require…

---

## [Specify protocol (webcal/https/...) with formatted\_abc\_url()?](https://www.ruby-forum.com/t/specify-protocol-webcal-https-with-formatted-abc-url/136870)

<div class="topic-metadata">

**Author:** [@joergbattermann](https://www.ruby-forum.com/u/joergbattermann)\
**Replies:** 0\
**Last updated:** [May 7, 2008, 12:45am UTC](https://www.ruby-forum.com/t/specify-protocol-webcal-https-with-formatted-abc-url/136870 "2008-05-07T00:45:37Z")

</div>

Hello there, is there a way to specifiy which protocol a formatted\_user\_events\_url(@user) uses? I am asking because I have a custom format.ics {} declared in a controller and would like to specify a different (from t…

---

## [Multiple has\_many objects in one form](https://www.ruby-forum.com/t/multiple-has-many-objects-in-one-form/136863)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 0\
**Last updated:** [May 6, 2008, 10:54pm UTC](https://www.ruby-forum.com/t/multiple-has-many-objects-in-one-form/136863 "2008-05-06T22:54:05Z")

</div>

Hi - I have to models, Question and Answers. A question has many answers. I want to set up a form where a user can submit 1 question and up to 10 answers. So, in the questions controller, I have new: def new @quest…

---

## [Multiple forms with ajax](https://www.ruby-forum.com/t/multiple-forms-with-ajax/136858)

<div class="topic-metadata">

**Author:** [@Meenal](https://www.ruby-forum.com/u/Meenal)\
**Replies:** 0\
**Last updated:** [May 6, 2008, 10:23pm UTC](https://www.ruby-forum.com/t/multiple-forms-with-ajax/136858 "2008-05-06T22:23:30Z")

</div>

I want to create a form such that when the first form is submitted, the second form is triggered based on the user input ( ex: selection from a drop down list) . Are there any examples for this? Thanks Meenal

---

## [POST when leaving page](https://www.ruby-forum.com/t/post-when-leaving-page/136836)

<div class="topic-metadata">

**Author:** [@djlewis](https://www.ruby-forum.com/u/djlewis)\
**Replies:** 2\
**Last updated:** [May 6, 2008, 10:22pm UTC](https://www.ruby-forum.com/t/post-when-leaving-page/136836 "2008-05-06T22:22:55Z")

</div>

I’m on my first Rails app, and have this question. I have a page with a form and with next and previous buttons (which are do submit/post), and some other links (like logout, update-user- profile). Problem – I want i…

---

## [Boston Area Contract Opportunity](https://www.ruby-forum.com/t/boston-area-contract-opportunity/136855)

<div class="topic-metadata">

**Author:** [@keith](https://www.ruby-forum.com/u/keith)\
**Replies:** 0\
**Last updated:** [May 6, 2008, 9:45pm UTC](https://www.ruby-forum.com/t/boston-area-contract-opportunity/136855 "2008-05-06T21:45:59Z")

</div>

We are looking for a talented Ruby on Rails developer to work on a short-term project. The work will involve rewriting an old Ruby application in Rails and integrating it with a new Rails site. Required knowledge and …

---

## [Help with "find\_by\_sql" statement](https://www.ruby-forum.com/t/help-with-find-by-sql-statement/136813)

<div class="topic-metadata">

**Author:** [@Carson](https://www.ruby-forum.com/u/Carson)\
**Replies:** 4\
**Last updated:** [May 6, 2008, 9:27pm UTC](https://www.ruby-forum.com/t/help-with-find-by-sql-statement/136813 "2008-05-06T21:27:01Z")

</div>

I’m trying to write a “find\_by\_sql” statement that selects with a WHERE clause comparing an attribute to an external value. My statement generates an error on the last line: def department # For menu display @depart…

---

## [Link\_to\_remote with pop-up or link\_to with form.serialize?](https://www.ruby-forum.com/t/link-to-remote-with-pop-up-or-link-to-with-form-serialize/136854)

<div class="topic-metadata">

**Author:** [@newrubygirl](https://www.ruby-forum.com/u/newrubygirl)\
**Replies:** 0\
**Last updated:** [May 6, 2008, 9:23pm UTC](https://www.ruby-forum.com/t/link-to-remote-with-pop-up-or-link-to-with-form-serialize/136854 "2008-05-06T21:23:42Z")

</div>

I need to create a new record based on form values prior to a pop-up window opening. The way I see to do that is form.serialize, but it looks like that’s only possible with link\_to\_remote and similar. Can I either do…

---

## [HTML =\> Image converter for Ruby/Rails?](https://www.ruby-forum.com/t/html-image-converter-for-ruby-rails/136853)

<div class="topic-metadata">

**Author:** [@Wildtangent](https://www.ruby-forum.com/u/Wildtangent)\
**Replies:** 0\
**Last updated:** [May 6, 2008, 9:15pm UTC](https://www.ruby-forum.com/t/html-image-converter-for-ruby-rails/136853 "2008-05-06T21:15:45Z")

</div>

Hi Was wondering if anyone knew of a good gem/plugin/ruby script that could be used with a Rails app to generate thumbnail views of HTML pages in my website? I want to use it for making a preview of my content pages …

---

## [Managing git submodules with git.rake](https://www.ruby-forum.com/t/managing-git-submodules-with-git-rake/136852)

<div class="topic-metadata">

**Author:** [@miked](https://www.ruby-forum.com/u/miked)\
**Replies:** 0\
**Last updated:** [May 6, 2008, 9:12pm UTC](https://www.ruby-forum.com/t/managing-git-submodules-with-git-rake/136852 "2008-05-06T21:12:49Z")

</div>

Hey all, If you’re like me and use git submodules heavily (I vendor everything, and every plugin is a submodule), you might like to hear about code published this morning to make it easier to manage multiple git subm…

---

## [Nested Set question](https://www.ruby-forum.com/t/nested-set-question/136839)

<div class="topic-metadata">

**Author:** [@gadys](https://www.ruby-forum.com/u/gadys)\
**Replies:** 0\
**Last updated:** [May 6, 2008, 7:28pm UTC](https://www.ruby-forum.com/t/nested-set-question/136839 "2008-05-06T19:28:24Z")

</div>

Hi I’m want to create a nested forum list and i want to use BetterNestedSet should i make the forum act as BetterNestedSet or should i create a diffrent model for the forum order ?

---

## [Namespaces problem](https://www.ruby-forum.com/t/namespaces-problem/136605)

<div class="topic-metadata">

**Author:** [@dannyheathcote](https://www.ruby-forum.com/u/dannyheathcote)\
**Replies:** 10\
**Last updated:** [May 6, 2008, 7:26pm UTC](https://www.ruby-forum.com/t/namespaces-problem/136605 "2008-05-06T19:26:28Z")

</div>

I’m working on a module based application. The first module is an eCommerce module. I’ve made a few models for the webshop with the namespace Webshop: Webshop::Category Webshop::Product etc. My backend application …

---

## [Trouble with slow rubygems](https://www.ruby-forum.com/t/trouble-with-slow-rubygems/136347)

<div class="topic-metadata">

**Author:** [@tachekent](https://www.ruby-forum.com/u/tachekent)\
**Replies:** 2\
**Last updated:** [May 6, 2008, 7:02pm UTC](https://www.ruby-forum.com/t/trouble-with-slow-rubygems/136347 "2008-05-06T19:02:46Z")

</div>

Hi there, I’m having a lot of trouble trying to install any gems in ubuntu. Every time I try I get: Bulk updating Gem source index for: http://gems.rubyforge.org/ and then that hangs forever. More often than not I ge…

---

## [Problem with ActionWebService and UTF-8 encoding](https://www.ruby-forum.com/t/problem-with-actionwebservice-and-utf-8-encoding/136779)

<div class="topic-metadata">

**Author:** [@david](https://www.ruby-forum.com/u/david)\
**Replies:** 1\
**Last updated:** [May 6, 2008, 7:01pm UTC](https://www.ruby-forum.com/t/problem-with-actionwebservice-and-utf-8-encoding/136779 "2008-05-06T19:01:35Z")

</div>

Hello, I have a Rails App which serve a Soap Web Service with ActionWebService. I accept 2 string parameters that must contain xml. The data sent are in UTF-8, but the non-ascii char (Ã©, Ã …) in the message are cr…

---

## [Link\_to\_remote inserting instead of replacing](https://www.ruby-forum.com/t/link-to-remote-inserting-instead-of-replacing/136740)

<div class="topic-metadata">

**Author:** [@emuen](https://www.ruby-forum.com/u/emuen)\
**Replies:** 2\
**Last updated:** [May 6, 2008, 6:59pm UTC](https://www.ruby-forum.com/t/link-to-remote-inserting-instead-of-replacing/136740 "2008-05-06T18:59:48Z")

</div>

Hi guys. Is there anyone, that have a good explanation for this: I have a link\_to\_remote function that has the :update tag pointing to the “pages\_content” div, but instead of replacing the content it simply inserts i…

---

## [Getaddrinfo: Name or service not known](https://www.ruby-forum.com/t/getaddrinfo-name-or-service-not-known/136773)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 1\
**Last updated:** [May 6, 2008, 6:54pm UTC](https://www.ruby-forum.com/t/getaddrinfo-name-or-service-not-known/136773 "2008-05-06T18:54:30Z")

</div>

Hi I have just tried using ActionMailer to send mail in rails.For that i followed code from railcasts.And it worked also.But some times i am getting the error “getaddrinfo: Name or service not known”…Why this happens…

---

## [Strange memory issue](https://www.ruby-forum.com/t/strange-memory-issue/136304)

<div class="topic-metadata">

**Author:** [@sp00nyg](https://www.ruby-forum.com/u/sp00nyg)\
**Replies:** 12\
**Last updated:** [May 6, 2008, 6:14pm UTC](https://www.ruby-forum.com/t/strange-memory-issue/136304 "2008-05-06T18:14:24Z")

</div>

Like most, I have a test and a production env. Both are CentOS 5, Ruby 1.8.6, Rails 2.0.2, MySQL 5, and Apache. Both were setup using the same procedure. Except for the hardware (test: Intel, prod: AMD) and memory (…

---

## [Script/generate builtin commands](https://www.ruby-forum.com/t/script-generate-builtin-commands/135926)

<div class="topic-metadata">

**Author:** [@ikevin](https://www.ruby-forum.com/u/ikevin)\
**Replies:** 1\
**Last updated:** [May 6, 2008, 6:14pm UTC](https://www.ruby-forum.com/t/script-generate-builtin-commands/135926 "2008-05-06T18:14:14Z")

</div>

Hi, I am new to Ruby on Rails. I’m trying to find resources to read regarding the difference between generate scaffold, model, controller and resource commands. Could anyone please help? Thanks! Kevin.

---

## [Capistrano: chmod 600 database.yml](https://www.ruby-forum.com/t/capistrano-chmod-600-database-yml/136814)

<div class="topic-metadata">

**Author:** [@mdaoust](https://www.ruby-forum.com/u/mdaoust)\
**Replies:** 3\
**Last updated:** [May 6, 2008, 6:13pm UTC](https://www.ruby-forum.com/t/capistrano-chmod-600-database-yml/136814 "2008-05-06T18:13:03Z")

</div>

Would it be wise to chmod 600 your database.yml file using Capistrano when deploying seeing as it contains your mysql db in plain text? ~ Mark

---

## [Web application for feature requests/ideas](https://www.ruby-forum.com/t/web-application-for-feature-requests-ideas/136821)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 2\
**Last updated:** [May 6, 2008, 5:51pm UTC](https://www.ruby-forum.com/t/web-application-for-feature-requests-ideas/136821 "2008-05-06T17:51:48Z")

</div>

I have searched a lot on google, but haven’t found anything. I figure someone here would know of some. Thanks.

---

## [Datamatrix generator?](https://www.ruby-forum.com/t/datamatrix-generator/136823)

<div class="topic-metadata">

**Author:** [@giga](https://www.ruby-forum.com/u/giga)\
**Replies:** 0\
**Last updated:** [May 6, 2008, 5:50pm UTC](https://www.ruby-forum.com/t/datamatrix-generator/136823 "2008-05-06T17:50:15Z")

</div>

How can I generate datamatrix on ruby on rails? http://datenfreihafen.org/projects/iec16022.html

---

## [User selected item of Drop Down](https://www.ruby-forum.com/t/user-selected-item-of-drop-down/136815)

<div class="topic-metadata">

**Author:** [@OhMyRuby](https://www.ruby-forum.com/u/OhMyRuby)\
**Replies:** 1\
**Last updated:** [May 6, 2008, 5:42pm UTC](https://www.ruby-forum.com/t/user-selected-item-of-drop-down/136815 "2008-05-06T17:42:58Z")

</div>

In my view I have form.select( :child, @children.map { | u | \[0\], u\[1\] }, { }, { :onchange = remote\_function( :url =\> {:action =\> “rjs\_call\_here”}, :with =\> " ‘child\_picked=’ + escape(value)" ) } ) Everything works…

---

## [Find\_by\_sql and passing parameter value](https://www.ruby-forum.com/t/find-by-sql-and-passing-parameter-value/136799)

<div class="topic-metadata">

**Author:** [@KTU](https://www.ruby-forum.com/u/KTU)\
**Replies:** 4\
**Last updated:** [May 6, 2008, 5:40pm UTC](https://www.ruby-forum.com/t/find-by-sql-and-passing-parameter-value/136799 "2008-05-06T17:40:01Z")

</div>

Any idea why I cant pass parameter value for the find\_by\_sql query ? simple example below wont work: loginid = “demo” sql = ‘SELECT \* FROM users where ownerid = “loginid”’ @imitems = Imitem.find\_by\_sql(sql); but if …

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

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