# Rails

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

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

---

## [PostgreSQL + Rails 3: SELECT AS weirdness](https://www.ruby-forum.com/t/postgresql-rails-3-select-as-weirdness/193989)

<div class="topic-metadata">

**Author:** [@IAmNan](https://www.ruby-forum.com/u/IAmNan)\
**Replies:** 0\
**Last updated:** [August 27, 2010, 4:09pm UTC](https://www.ruby-forum.com/t/postgresql-rails-3-select-as-weirdness/193989 "2010-08-27T16:09:18Z")

</div>

Here’s a class function I’ve made in a model called Exchange: def self.get\_history(product\_id) exchanges = Exchange.select(“product\_id, quantity, week, SUM(quantity) AS total”) exchanges = exchanges.where(‘product\_id…

---

## [Disabling Exception Notification for ActionController::InvalidAuthenticityToken](https://www.ruby-forum.com/t/disabling-exception-notification-for-actioncontroller-invalidauthenticitytoken/193988)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [August 27, 2010, 4:04pm UTC](https://www.ruby-forum.com/t/disabling-exception-notification-for-actioncontroller-invalidauthenticitytoken/193988 "2010-08-27T16:04:36Z")

</div>

Does anyone know how to disable exception notifications for the Exception Notification plugin when it is an ActionController::InvalidAuthenticityToken? Thanks! Tom

---

## [I can't access wIki.rubyonrails.org for some time](https://www.ruby-forum.com/t/i-cant-access-wiki-rubyonrails-org-for-some-time/193985)

<div class="topic-metadata">

**Author:** [@dano](https://www.ruby-forum.com/u/dano)\
**Replies:** 0\
**Last updated:** [August 27, 2010, 3:17pm UTC](https://www.ruby-forum.com/t/i-cant-access-wiki-rubyonrails-org-for-some-time/193985 "2010-08-27T15:17:46Z")

</div>

I can’t access wIki.rubyonrails.org for some time. (If my memory serves me right, it is since July.) Is this functional? Is it simply down for some maintenance issue? Anyone knows why?

---

## [How to add to a collection\_select collection?](https://www.ruby-forum.com/t/how-to-add-to-a-collection-select-collection/193971)

<div class="topic-metadata">

**Author:** [@jakx12](https://www.ruby-forum.com/u/jakx12)\
**Replies:** 0\
**Last updated:** [August 27, 2010, 11:33am UTC](https://www.ruby-forum.com/t/how-to-add-to-a-collection-select-collection/193971 "2010-08-27T11:33:25Z")

</div>

Hello everyone, I have a method that goes through a hash of arrays and i need to be able to add the name value and the id value to a drop down menu. How would I do this? Many thanks, jakx12

---

## [Dynamic creation of layouts at runtime](https://www.ruby-forum.com/t/dynamic-creation-of-layouts-at-runtime/193958)

<div class="topic-metadata">

**Author:** [@chrisdwan](https://www.ruby-forum.com/u/chrisdwan)\
**Replies:** 1\
**Last updated:** [August 27, 2010, 11:14am UTC](https://www.ruby-forum.com/t/dynamic-creation-of-layouts-at-runtime/193958 "2010-08-27T11:14:49Z")

</div>

I’ve learned how to dynamically change which layout is used at runtime, but I now have a question of whether it is possible to create new layouts (or modify existing ones) at runtime and have the app automatically rec…

---

## [Stylesheets in PDF (Prawn)](https://www.ruby-forum.com/t/stylesheets-in-pdf-prawn/193969)

<div class="topic-metadata">

**Author:** [@rorjeff](https://www.ruby-forum.com/u/rorjeff)\
**Replies:** 0\
**Last updated:** [August 27, 2010, 10:53am UTC](https://www.ruby-forum.com/t/stylesheets-in-pdf-prawn/193969 "2010-08-27T10:53:58Z")

</div>

Hi, Can we use stylesheet classes inside Pdf reports? i am trying to change the header\_color from b7e3fe to .heading oh the stylesheet, inside the table file:heading.pdf.prawn texts=\[""\],\[""\] pdf.table texts, :hea…

---

## [Syntax highlighting in IRB || Script/Console](https://www.ruby-forum.com/t/syntax-highlighting-in-irb-script-console/193968)

<div class="topic-metadata">

**Author:** [@ceekays](https://www.ruby-forum.com/u/ceekays)\
**Replies:** 0\
**Last updated:** [August 27, 2010, 10:46am UTC](https://www.ruby-forum.com/t/syntax-highlighting-in-irb-script-console/193968 "2010-08-27T10:46:08Z")

</div>

Railers, I would like to know if there is a way of changing colors for IRB standard input ($stdin). What I am interested in “is having IRB highlighting syntax as I type”. Among other stuff, I would like to be able t…

---

## [Recommend a gem/plugin for autocomplete in Rails3 using jQuery?](https://www.ruby-forum.com/t/recommend-a-gem-plugin-for-autocomplete-in-rails3-using-jquery/193861)

<div class="topic-metadata">

**Author:** [@andy](https://www.ruby-forum.com/u/andy)\
**Replies:** 1\
**Last updated:** [August 27, 2010, 10:00am UTC](https://www.ruby-forum.com/t/recommend-a-gem-plugin-for-autocomplete-in-rails3-using-jquery/193861 "2010-08-27T10:00:28Z")

</div>

Can anyone recommend a good gem or plugin for autocomplete in Rails 3 that only needs jQuery? I need to search multiple fields and multiple objects and display them in a clickable auto-complete list. Would it be best…

---

## [Count of records meeting condition](https://www.ruby-forum.com/t/count-of-records-meeting-condition/193959)

<div class="topic-metadata">

**Author:** [@callyworld](https://www.ruby-forum.com/u/callyworld)\
**Replies:** 2\
**Last updated:** [August 27, 2010, 9:59am UTC](https://www.ruby-forum.com/t/count-of-records-meeting-condition/193959 "2010-08-27T09:59:17Z")

</div>

Forgive this question, but I’m new to rails, and my SQL is rather rusty. I have a line like so to get all records for a particular time period: @recordings\_for\_period = Recording.find(:all, :order =\> “date\_of\_event DE…

---

## [Shared Host Problem](https://www.ruby-forum.com/t/shared-host-problem/193910)

<div class="topic-metadata">

**Author:** [@Ainar\_A](https://www.ruby-forum.com/u/Ainar_A)\
**Replies:** 3\
**Last updated:** [August 27, 2010, 7:55am UTC](https://www.ruby-forum.com/t/shared-host-problem/193910 "2010-08-27T07:55:47Z")

</div>

Hi, I created my app on shared host in home folder, it’s called “first”. OK then I following to the tutorial I runned in putty(CMD or Terminal) \[~\]# mv public\_html public\_html\_bk \[~\]# ln -s yournewrailsapp/public publ…

---

## [If nested attribute is blank](https://www.ruby-forum.com/t/if-nested-attribute-is-blank/193961)

<div class="topic-metadata">

**Author:** [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Replies:** 0\
**Last updated:** [August 27, 2010, 7:47am UTC](https://www.ruby-forum.com/t/if-nested-attribute-is-blank/193961 "2010-08-27T07:47:17Z")

</div>

HI, I need to know if any nested attributes is blank then how it would work? e.g - In my case user have addresses & photos(nested attributes) but not mandatory while adding user if i haven’t added photos & submit fo…

---

## [Help me! Install remine error. undefined symbol: d2i\_ECPKParameters](https://www.ruby-forum.com/t/help-me-install-remine-error-undefined-symbol-d2i-ecpkparameters/193346)

<div class="topic-metadata">

**Author:** [@phoenix3](https://www.ruby-forum.com/u/phoenix3)\
**Replies:** 1\
**Last updated:** [August 27, 2010, 6:19am UTC](https://www.ruby-forum.com/t/help-me-install-remine-error-undefined-symbol-d2i-ecpkparameters/193346 "2010-08-27T06:19:13Z")

</div>

RAILS\_ENV=production rake db:migrate (in /usr/local/redmine) rake aborted! /usr/local/ruby/lib/ruby/site\_ruby/1.9.1/x86\_64-linux/openssl.so: undefined symbol: d2i\_ECPKParameters - /usr/local/ruby/lib/ruby/ site\_ruby/…

---

## [Job: Remote from anywhere](https://www.ruby-forum.com/t/job-remote-from-anywhere/193883)

<div class="topic-metadata">

**Author:** [@tindrum](https://www.ruby-forum.com/u/tindrum)\
**Replies:** 1\
**Last updated:** [August 27, 2010, 6:02am UTC](https://www.ruby-forum.com/t/job-remote-from-anywhere/193883 "2010-08-27T06:02:49Z")

</div>

Did you read “Rework”? Do you like the ideas presented? Do you want to live anywhere you want? Do you want to work anytime you want? Are you good with Ruby and Rails? Does working remote make you more productive? Do y…

---

## [Authlogic: activating inactive account/user](https://www.ruby-forum.com/t/authlogic-activating-inactive-account-user/193926)

<div class="topic-metadata">

**Author:** [@pepe](https://www.ruby-forum.com/u/pepe)\
**Replies:** 4\
**Last updated:** [August 27, 2010, 5:32am UTC](https://www.ruby-forum.com/t/authlogic-activating-inactive-account-user/193926 "2010-08-27T05:32:59Z")

</div>

Hello, I have searched high and low on how to activate an inactive account in Authlogic and I can’t seem to figure it out. I am using “consecutive\_failed\_logins\_limit” to control a brute force attack and I want to of…

---

## [Need help on YouTube\_model plugin](https://www.ruby-forum.com/t/need-help-on-youtube-model-plugin/193955)

<div class="topic-metadata">

**Author:** [@nirosh](https://www.ruby-forum.com/u/nirosh)\
**Replies:** 0\
**Last updated:** [August 27, 2010, 4:28am UTC](https://www.ruby-forum.com/t/need-help-on-youtube-model-plugin/193955 "2010-08-27T04:28:36Z")

</div>

I used YouTube\_Model plugin to display videos of a user. it works fine but gives only top most 25 results. i dono how to get other videos. Please can anybody help me? -nirosh-

---

## [Children of the Nations' Rubyist has gone missing! \[Job\]](https://www.ruby-forum.com/t/children-of-the-nations-rubyist-has-gone-missing-job/193956)

<div class="topic-metadata">

**Author:** [@ktheory](https://www.ruby-forum.com/u/ktheory)\
**Replies:** 0\
**Last updated:** [August 27, 2010, 3:49am UTC](https://www.ruby-forum.com/t/children-of-the-nations-rubyist-has-gone-missing-job/193956 "2010-08-27T03:49:03Z")

</div>

Children of the Nations \[cotni.org\] is seeking a seasoned RoR programmer who wants to make a difference in orphaned and destitute childrenâ€™s lives. PLEASE only those with intermediate to advanced Ruby on Rails exper…

---

## [Using Logger to Create a Root-Owned Log File](https://www.ruby-forum.com/t/using-logger-to-create-a-root-owned-log-file/193951)

<div class="topic-metadata">

**Author:** [@djames](https://www.ruby-forum.com/u/djames)\
**Replies:** 0\
**Last updated:** [August 27, 2010, 1:56am UTC](https://www.ruby-forum.com/t/using-logger-to-create-a-root-owned-log-file/193951 "2010-08-27T01:56:26Z")

</div>

I have an application which I want to write log entries to its own separate log file in the log directory. Of course the log directory is owned by root and has permissions 755. I was expecting that Logger would oper…

---

## [Layouts in Rails 3.0](https://www.ruby-forum.com/t/layouts-in-rails-3-0/193885)

<div class="topic-metadata">

**Author:** [@bruparel](https://www.ruby-forum.com/u/bruparel)\
**Replies:** 2\
**Last updated:** [August 26, 2010, 10:37pm UTC](https://www.ruby-forum.com/t/layouts-in-rails-3-0/193885 "2010-08-26T22:37:57Z")

</div>

I have an admin section in my rails 3 app. where I want to use a different layout than the main layouts/application.html.haml layout. Here is the snippet of the admin\_controller.rb: class AdminController \< Application…

---

## [Problem with consecutive GET requests in integration test](https://www.ruby-forum.com/t/problem-with-consecutive-get-requests-in-integration-test/193892)

<div class="topic-metadata">

**Author:** [@Georgie\_P](https://www.ruby-forum.com/u/Georgie_P)\
**Replies:** 10\
**Last updated:** [August 26, 2010, 10:31pm UTC](https://www.ruby-forum.com/t/problem-with-consecutive-get-requests-in-integration-test/193892 "2010-08-26T22:31:31Z")

</div>

class UserStoriesTest \< ActionController::IntegrationTest test “some test” do get “/” assert\_response :success get “/” assert\_response :success end end When I run the code above the first assertion passes. Howeve…

---

## [Does Rails 3 provide time based caching?](https://www.ruby-forum.com/t/does-rails-3-provide-time-based-caching/193902)

<div class="topic-metadata">

**Author:** [@lexer](https://www.ruby-forum.com/u/lexer)\
**Replies:** 2\
**Last updated:** [August 26, 2010, 9:35pm UTC](https://www.ruby-forum.com/t/does-rails-3-provide-time-based-caching/193902 "2010-08-26T21:35:55Z")

</div>

Hi guys, I need a timebased caching of certain pages. Cache for certain page should be cleared each 15 minutes. Is that possible? In http://edgeguides.rubyonrails.org/caching\_with\_rails.html manual I see that there i…

---

## [Having trouble with link breaks in a table](https://www.ruby-forum.com/t/having-trouble-with-link-breaks-in-a-table/193888)

<div class="topic-metadata">

**Author:** [@adistarmid](https://www.ruby-forum.com/u/adistarmid)\
**Replies:** 4\
**Last updated:** [August 26, 2010, 9:06pm UTC](https://www.ruby-forum.com/t/having-trouble-with-link-breaks-in-a-table/193888 "2010-08-26T21:06:34Z")

</div>

I have table being filled by a partial. When the fields are filled, the fields end up together or not there for half a page. See below. My controller code and views are below… controller: @single = Array.new for @h …

---

## [Basic problems running tests](https://www.ruby-forum.com/t/basic-problems-running-tests/193920)

<div class="topic-metadata">

**Author:** [@techy\_bolek](https://www.ruby-forum.com/u/techy_bolek)\
**Replies:** 5\
**Last updated:** [August 26, 2010, 8:13pm UTC](https://www.ruby-forum.com/t/basic-problems-running-tests/193920 "2010-08-26T20:13:08Z")

</div>

I’ve tried to run scaffold-generated tests and the results is not what I would have expected. Basically all tests fail because the framework is trying to delete from the table and ignoring the table alias. I have two …

---

## [How do you get data from a hash of arrays?](https://www.ruby-forum.com/t/how-do-you-get-data-from-a-hash-of-arrays/193913)

<div class="topic-metadata">

**Author:** [@jakx12](https://www.ruby-forum.com/u/jakx12)\
**Replies:** 10\
**Last updated:** [August 26, 2010, 7:05pm UTC](https://www.ruby-forum.com/t/how-do-you-get-data-from-a-hash-of-arrays/193913 "2010-08-26T19:05:03Z")

</div>

Ok So I am using the calorieking api and it crack as my xml parser (it comes with httparty which is my consumer gem). Now I need to be able to list the food names. How can i get data from a hash that contains arrays? …

---

## [Removing the www before a domain with Rails3?](https://www.ruby-forum.com/t/removing-the-www-before-a-domain-with-rails3/193928)

<div class="topic-metadata">

**Author:** [@WSzP](https://www.ruby-forum.com/u/WSzP)\
**Replies:** 1\
**Last updated:** [August 26, 2010, 6:13pm UTC](https://www.ruby-forum.com/t/removing-the-www-before-a-domain-with-rails3/193928 "2010-08-26T18:13:20Z")

</div>

Hello, In Rails2 I used a middleware to redirect www.mydomain.tld to mydomain.tld. Something like this: http://pastie.org/1118140 It is in Libs, with filename “no\_www.rb”. I tryed to add as the first line of enviro…

---

## [Easy Noob Question?](https://www.ruby-forum.com/t/easy-noob-question/193930)

<div class="topic-metadata">

**Author:** [@aaronpowell](https://www.ruby-forum.com/u/aaronpowell)\
**Replies:** 0\
**Last updated:** [August 26, 2010, 6:09pm UTC](https://www.ruby-forum.com/t/easy-noob-question/193930 "2010-08-26T18:09:56Z")

</div>

I am completely new to RoR and have spent the better part of a week trying to figure all this out. I have ‘Instant Rails’ running non a Windows 7 x64 machine. I have downloaded a number of open source apps and have ye…

---

## [File preview in Rails](https://www.ruby-forum.com/t/file-preview-in-rails/193921)

<div class="topic-metadata">

**Author:** [@matte](https://www.ruby-forum.com/u/matte)\
**Replies:** 1\
**Last updated:** [August 26, 2010, 5:11pm UTC](https://www.ruby-forum.com/t/file-preview-in-rails/193921 "2010-08-26T17:11:16Z")

</div>

Hello guys, I’m developing my first Rails real application on my own. I’m facing this problem: I would like to show a preview of files inside a page, the kind of files I want to show can vary from image files (ong, jp…

---

## [How to disable button generated by submit\_to\_remote?](https://www.ruby-forum.com/t/how-to-disable-button-generated-by-submit-to-remote/193643)

<div class="topic-metadata">

**Author:** [@techy\_bolek](https://www.ruby-forum.com/u/techy_bolek)\
**Replies:** 2\
**Last updated:** [August 26, 2010, 3:38pm UTC](https://www.ruby-forum.com/t/how-to-disable-button-generated-by-submit-to-remote/193643 "2010-08-26T15:38:16Z")

</div>

I got a submit\_to\_remote button that I’d like to show as disabled on a certain condition. I’d assume the usual :disabled =\> true would do but I have not been able to. Comparing page source shows that for example: \<%= …

---

## [Q about authlogic](https://www.ruby-forum.com/t/q-about-authlogic/193916)

<div class="topic-metadata">

**Author:** [@tomtt](https://www.ruby-forum.com/u/tomtt)\
**Replies:** 0\
**Last updated:** [August 26, 2010, 3:15pm UTC](https://www.ruby-forum.com/t/q-about-authlogic/193916 "2010-08-26T15:15:57Z")

</div>

hi, this is part of the standard UserSession Code: def create @user\_session = UserSession.new(params\[:user\_session\]) @user\_session.save do |result| if result flash\[:notice\] = “Successfully logged in.” p “----------…

---

## [Dynamic javascript](https://www.ruby-forum.com/t/dynamic-javascript/193895)

<div class="topic-metadata">

**Author:** [@CUCUCU](https://www.ruby-forum.com/u/CUCUCU)\
**Replies:** 2\
**Last updated:** [August 26, 2010, 2:53pm UTC](https://www.ruby-forum.com/t/dynamic-javascript/193895 "2010-08-26T14:53:07Z")

</div>

I’m coming from a long period of CakePHP development. One of the more useful features of that framework was the ability to add any inline javascript in a view, with dynamic php codeblock-generated output (variables, f…

---

## [Sending Emails to Inbox](https://www.ruby-forum.com/t/sending-emails-to-inbox/193889)

<div class="topic-metadata">

**Author:** [@saurabhpurnaye](https://www.ruby-forum.com/u/saurabhpurnaye)\
**Replies:** 3\
**Last updated:** [August 26, 2010, 2:33pm UTC](https://www.ruby-forum.com/t/sending-emails-to-inbox/193889 "2010-08-26T14:33:13Z")

</div>

Hi All, I am having a functionality of sending emails in my rails application. Sending the emails is working properly but sometimes the email goes to Inbox folder and sometime it goes to Spam folder. I am sending one …

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

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