# Rails

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

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

---

## [Check empty? of variable for Case/When](https://www.ruby-forum.com/t/check-empty-of-variable-for-case-when/180604)

<div class="topic-metadata">

**Author:** [@adedip](https://www.ruby-forum.com/u/adedip)\
**Replies:** 1\
**Last updated:** [December 22, 2009, 7:16pm UTC](https://www.ruby-forum.com/t/check-empty-of-variable-for-case-when/180604 "2009-12-22T19:16:39Z")

</div>

I have this: case child.name when @collection.location\_tag @article.location = child.content when @collection.content\_tag @article.content = child.content when @collection.docno\_tag @article.docno = child.content …

---

## [Will paginate is missing on rake db:migrate](https://www.ruby-forum.com/t/will-paginate-is-missing-on-rake-db-migrate/180586)

<div class="topic-metadata">

**Author:** [@jeb](https://www.ruby-forum.com/u/jeb)\
**Replies:** 6\
**Last updated:** [December 22, 2009, 7:16pm UTC](https://www.ruby-forum.com/t/will-paginate-is-missing-on-rake-db-migrate/180586 "2009-12-22T19:16:03Z")

</div>

I have a very annoying problem, when doing rake db:migrate, I get the error message: Missing these required gems: will\_paginate ~\> 2.3.11 But the gem is not missing, It runs very well in my app. To make the rake pa…

---

## [Has\_many association with two foreign keys](https://www.ruby-forum.com/t/has-many-association-with-two-foreign-keys/180587)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 4\
**Last updated:** [December 22, 2009, 4:31pm UTC](https://www.ruby-forum.com/t/has-many-association-with-two-foreign-keys/180587 "2009-12-22T16:31:35Z")

</div>

Hello, I was wondering if there is a way to specify two foreign keys on a has\_many association. I have a conversation model with a sender\_id and recipient\_id. A user can be the sender or recipient of a conversation. …

---

## [Multiple email recipients](https://www.ruby-forum.com/t/multiple-email-recipients/180559)

<div class="topic-metadata">

**Author:** [@depassion](https://www.ruby-forum.com/u/depassion)\
**Replies:** 2\
**Last updated:** [December 22, 2009, 4:18pm UTC](https://www.ruby-forum.com/t/multiple-email-recipients/180559 "2009-12-22T16:18:26Z")

</div>

I’m trying to call multiple email addresses from database. But dont know how to get the logic into the recipients field. #subscriptions\_controller def deliver @subscription = Subscription.find(params\[:id\]) @users = @…

---

## [Rails fixtures - defining a table name?](https://www.ruby-forum.com/t/rails-fixtures-defining-a-table-name/180600)

<div class="topic-metadata">

**Author:** [@jon-d](https://www.ruby-forum.com/u/jon-d)\
**Replies:** 1\
**Last updated:** [December 22, 2009, 4:08pm UTC](https://www.ruby-forum.com/t/rails-fixtures-defining-a-table-name/180600 "2009-12-22T16:08:42Z")

</div>

Hi, At the minute all my fixtures have the same name as the table that they are intended for, because of a recent issue with rails it doesn’t seem possible to have a fixture beginning with the word ‘test’ Does anyone…

---

## [How to use thinking sphinx](https://www.ruby-forum.com/t/how-to-use-thinking-sphinx/180523)

<div class="topic-metadata">

**Author:** [@mohitnegi](https://www.ruby-forum.com/u/mohitnegi)\
**Replies:** 2\
**Last updated:** [December 22, 2009, 3:26pm UTC](https://www.ruby-forum.com/t/how-to-use-thinking-sphinx/180523 "2009-12-22T15:26:00Z")

</div>

I want to use thinking sphinx in my application, basically i have a filter criteria screen, and depending on the user input, the sql query is generated, which joins all the tables based on user input, now i want to us…

---

## [Excluding controller from before\_filter](https://www.ruby-forum.com/t/excluding-controller-from-before-filter/180589)

<div class="topic-metadata">

**Author:** [@Aladin](https://www.ruby-forum.com/u/Aladin)\
**Replies:** 4\
**Last updated:** [December 22, 2009, 12:27pm UTC](https://www.ruby-forum.com/t/excluding-controller-from-before-filter/180589 "2009-12-22T12:27:29Z")

</div>

hi my app uses before\_filter for authorization in ApplicationController which filter ‘create’, ‘update’ and so on in every controller. But let’s say i want to exclude ‘create’ in one particular controller how would i…

---

## [500 error, no log files](https://www.ruby-forum.com/t/500-error-no-log-files/180583)

<div class="topic-metadata">

**Author:** [@G-Reg](https://www.ruby-forum.com/u/G-Reg)\
**Replies:** 1\
**Last updated:** [December 22, 2009, 11:13am UTC](https://www.ruby-forum.com/t/500-error-no-log-files/180583 "2009-12-22T11:13:43Z")

</div>

Hello, A rails app that had been running smoothly for 2 months is suddenly giving a 500 error. Unfortunately the production.log is not being written to (the permissions seem to be fine) and the mongrel.log doesn’t o…

---

## [User Activity Monitor Plugin](https://www.ruby-forum.com/t/user-activity-monitor-plugin/180588)

<div class="topic-metadata">

**Author:** [@johnnybutler7](https://www.ruby-forum.com/u/johnnybutler7)\
**Replies:** 0\
**Last updated:** [December 22, 2009, 10:27am UTC](https://www.ruby-forum.com/t/user-activity-monitor-plugin/180588 "2009-12-22T10:27:16Z")

</div>

Hi, Is there any plugins out there that make a record of what pages individual users visit and if they make a purchase etc… Im just about o write my own code as it doesn’t seem to difficult but was wondering if there…

---

## [Calander dateselect error](https://www.ruby-forum.com/t/calander-dateselect-error/180581)

<div class="topic-metadata">

**Author:** [@sharankruthi](https://www.ruby-forum.com/u/sharankruthi)\
**Replies:** 1\
**Last updated:** [December 22, 2009, 8:00am UTC](https://www.ruby-forum.com/t/calander-dateselect-error/180581 "2009-12-22T08:00:00Z")

</div>

Am using calendardateselect in my code. I have included in code only after including all ‘defaults’ javascript that includes prototype.js. But still in IE alone, am getting error as prototype not found. Please let me…

---

## [Eval on LHS of Assignment](https://www.ruby-forum.com/t/eval-on-lhs-of-assignment/180557)

<div class="topic-metadata">

**Author:** [@djames](https://www.ruby-forum.com/u/djames)\
**Replies:** 2\
**Last updated:** [December 22, 2009, 5:05am UTC](https://www.ruby-forum.com/t/eval-on-lhs-of-assignment/180557 "2009-12-22T05:05:00Z")

</div>

I want to set the values of several record fields from within an iterator where the field name is passed as a parameter. For example (conceptually): Line numbers are for reference only and are not a part of the code…

---

## [Google Analytics and Gdata](https://www.ruby-forum.com/t/google-analytics-and-gdata/180563)

<div class="topic-metadata">

**Author:** [@ajitonrails](https://www.ruby-forum.com/u/ajitonrails)\
**Replies:** 0\
**Last updated:** [December 21, 2009, 10:46pm UTC](https://www.ruby-forum.com/t/google-analytics-and-gdata/180563 "2009-12-21T22:46:52Z")

</div>

Hello all in my app I have link “Authorize me to access your Google Analytics data”. so user will click this link… 1.if user is logged into Google account it will show a screen with my email id prefilled in authoriz…

---

## [Beginner problem](https://www.ruby-forum.com/t/beginner-problem/180550)

<div class="topic-metadata">

**Author:** [@erwillie](https://www.ruby-forum.com/u/erwillie)\
**Replies:** 3\
**Last updated:** [December 21, 2009, 10:41pm UTC](https://www.ruby-forum.com/t/beginner-problem/180550 "2009-12-21T22:41:01Z")

</div>

Hi, IÂ´m starting using rails. I have one problem. I create a controller, the code is the next: class PlayersController \< ApplicationController scaffold:player end I did all the things that I suppose to do, but a p…

---

## [T.references usage](https://www.ruby-forum.com/t/t-references-usage/180547)

<div class="topic-metadata">

**Author:** [@Thufir](https://www.ruby-forum.com/u/Thufir)\
**Replies:** 2\
**Last updated:** [December 21, 2009, 8:40pm UTC](https://www.ruby-forum.com/t/t-references-usage/180547 "2009-12-21T20:40:25Z")

</div>

While I’m not currently using the whole rails environment, I may utilize the framework in the future. In the meantime, I’m not clear on the syntax for establishing a foreign key relationship for an active record asso…

---

## [Given the session key and secret, how can we decrypt cookie-based sessions?](https://www.ruby-forum.com/t/given-the-session-key-and-secret-how-can-we-decrypt-cookie-based-sessions/180555)

<div class="topic-metadata">

**Author:** [@joeg](https://www.ruby-forum.com/u/joeg)\
**Replies:** 1\
**Last updated:** [December 21, 2009, 8:36pm UTC](https://www.ruby-forum.com/t/given-the-session-key-and-secret-how-can-we-decrypt-cookie-based-sessions/180555 "2009-12-21T20:36:19Z")

</div>

Hello all. I’ve got a question about how Rails handles cookie encryption/decryption. I’ve got this in my config/environment.rb config.action\_controller.session = { :session\_key =\> \[some key\], :secret =\> \[some secret…

---

## [Post method or request flattening array of hashes in params](https://www.ruby-forum.com/t/post-method-or-request-flattening-array-of-hashes-in-params/180554)

<div class="topic-metadata">

**Author:** [@biot023](https://www.ruby-forum.com/u/biot023)\
**Replies:** 0\
**Last updated:** [December 21, 2009, 6:35pm UTC](https://www.ruby-forum.com/t/post-method-or-request-flattening-array-of-hashes-in-params/180554 "2009-12-21T18:35:10Z")

</div>

Hi – I have the following code in a cucumber feature: http://pastie.org/752061 The problem is that the post method (or the controller) is flattening the array of hashes into an array containing all the key-value pairs…

---

## [Making CSS Rounded Divs with Rails](https://www.ruby-forum.com/t/making-css-rounded-divs-with-rails/180552)

<div class="topic-metadata">

**Author:** [@Joe\_McGlynn](https://www.ruby-forum.com/u/Joe_McGlynn)\
**Replies:** 0\
**Last updated:** [December 21, 2009, 6:03pm UTC](https://www.ruby-forum.com/t/making-css-rounded-divs-with-rails/180552 "2009-12-21T18:03:32Z")

</div>

I just released a Rails generator to create CSS Rounded Divs The overview is on my blog: You can install the Rails Plugin from github: This is one of those UI things that will evolve as people use it and give me fe…

---

## [Paths for configured gems](https://www.ruby-forum.com/t/paths-for-configured-gems/180516)

<div class="topic-metadata">

**Author:** [@joshs](https://www.ruby-forum.com/u/joshs)\
**Replies:** 1\
**Last updated:** [December 21, 2009, 5:48pm UTC](https://www.ruby-forum.com/t/paths-for-configured-gems/180516 "2009-12-21T17:48:19Z")

</div>

I would like to get a list of the paths of configured gems. A list of gem dependencies can be found by: Rails.configuration.gems …which returns a bunch of Rails::GemDependency but I can’t figure out how to get a path…

---

## [Beginner views](https://www.ruby-forum.com/t/beginner-views/180533)

<div class="topic-metadata">

**Author:** [@Manus](https://www.ruby-forum.com/u/Manus)\
**Replies:** 2\
**Last updated:** [December 21, 2009, 4:02pm UTC](https://www.ruby-forum.com/t/beginner-views/180533 "2009-12-21T16:02:23Z")

</div>

Hey! I’m a bit new to Rails and I wonder how one render both the new controller and the index on the same page. For example: Guestbook (new) #post a new entry (index) #showing all posts I do not want to go to a separ…

---

## ["Best practice" for accessing session from model](https://www.ruby-forum.com/t/best-practice-for-accessing-session-from-model/180519)

<div class="topic-metadata">

**Author:** [@wanyixue](https://www.ruby-forum.com/u/wanyixue)\
**Replies:** 3\
**Last updated:** [December 21, 2009, 3:26pm UTC](https://www.ruby-forum.com/t/best-practice-for-accessing-session-from-model/180519 "2009-12-21T15:26:14Z")

</div>

i need to do update pm a “updated\_by” field with a session variable “user” on a model after\_save. but accessing session variables from models is supposedly bad whats the usual best practice for this kinda scenario ?

---

## [Eager load extended associations](https://www.ruby-forum.com/t/eager-load-extended-associations/180526)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 1\
**Last updated:** [December 21, 2009, 3:26pm UTC](https://www.ruby-forum.com/t/eager-load-extended-associations/180526 "2009-12-21T15:26:05Z")

</div>

Hello, I was wondering which is the correct syntax to eager load via includes an extended association. For example, I’ll like to eager load the last\_message method: class Conversation \< ActiveRecord::Base has\_many :…

---

## [Value for text\_field\_tag?](https://www.ruby-forum.com/t/value-for-text-field-tag/180536)

<div class="topic-metadata">

**Author:** [@T\_P](https://www.ruby-forum.com/u/T_P)\
**Replies:** 3\
**Last updated:** [December 21, 2009, 3:24pm UTC](https://www.ruby-forum.com/t/value-for-text-field-tag/180536 "2009-12-21T15:24:54Z")

</div>

Hi! I have this in my controller: @text = params\[:data\]\[:text\] In the view, I have this code: \<%= label\_tag(‘data\[text\]’, "Word/phrase: ") %\> \<%= text\_field\_tag( ‘data\[text\]’, @text, :size =\> 40, :maxlength =\> 25…

---

## [Errors.add\_to\_base translation missing: en, activerecord](https://www.ruby-forum.com/t/errors-add-to-base-translation-missing-en-activerecord/180544)

<div class="topic-metadata">

**Author:** [@mikej](https://www.ruby-forum.com/u/mikej)\
**Replies:** 0\
**Last updated:** [December 21, 2009, 3:24pm UTC](https://www.ruby-forum.com/t/errors-add-to-base-translation-missing-en-activerecord/180544 "2009-12-21T15:24:19Z")

</div>

In my model I am using errors.add\_to\_base: errors.add\_to\_base “Error 1” This works fine. If I do this twice: errors.add\_to\_base “Error 1” errors.add\_to\_base “Error 2” I receive the message: translation missing: en…

---

## [Newbie questions](https://www.ruby-forum.com/t/newbie-questions/180541)

<div class="topic-metadata">

**Author:** [@tutiplain](https://www.ruby-forum.com/u/tutiplain)\
**Replies:** 1\
**Last updated:** [December 21, 2009, 3:02pm UTC](https://www.ruby-forum.com/t/newbie-questions/180541 "2009-12-21T15:02:49Z")

</div>

Hi all, I am new to Rails, and I have a few questions about it. I’ve done a few tutorials, up to generating a scaffold using SQLite and inserting some data. Must I always create my tables using rake db:migrate? O…

---

## [Can i use Heroku in windows](https://www.ruby-forum.com/t/can-i-use-heroku-in-windows/180535)

<div class="topic-metadata">

**Author:** [@Tsr\_on\_rails](https://www.ruby-forum.com/u/Tsr_on_rails)\
**Replies:** 1\
**Last updated:** [December 21, 2009, 2:04pm UTC](https://www.ruby-forum.com/t/can-i-use-heroku-in-windows/180535 "2009-12-21T14:04:08Z")

</div>

Hi, I am a beginner of rails.now i am using Aptana Rad Rails…but i saw many tutorials recommends Heroku…Can i use it in windows and where can i get it…pls help me out – You received this message because you ar…

---

## ["NoMethodError" while running Rake](https://www.ruby-forum.com/t/nomethoderror-while-running-rake/180521)

<div class="topic-metadata">

**Author:** [@dwhitekiss](https://www.ruby-forum.com/u/dwhitekiss)\
**Replies:** 6\
**Last updated:** [December 21, 2009, 12:19pm UTC](https://www.ruby-forum.com/t/nomethoderror-while-running-rake/180521 "2009-12-21T12:19:22Z")

</div>

Hi All, I was able to match the development database and migration will when running rake db:migrate I am trying to understand the error logs generated when running rake. $ rake (in /home/user/projects/emporium) /u…

---

## [Complicated route](https://www.ruby-forum.com/t/complicated-route/180522)

<div class="topic-metadata">

**Author:** [@Abhishek\_shukla](https://www.ruby-forum.com/u/Abhishek_shukla)\
**Replies:** 1\
**Last updated:** [December 21, 2009, 6:22am UTC](https://www.ruby-forum.com/t/complicated-route/180522 "2009-12-21T06:22:53Z")

</div>

Hello Friends, I have a requirement where I want to have a dynamic url for e.g http://localhost:3000/company\_name map.my\_company\_link’ ‘/:company\_link’, :controller =\> “companies”, :action =\> “show”, :requirements …

---

## [Heroku account behavior](https://www.ruby-forum.com/t/heroku-account-behavior/180517)

<div class="topic-metadata">

**Author:** [@bikle](https://www.ruby-forum.com/u/bikle)\
**Replies:** 0\
**Last updated:** [December 21, 2009, 1:15am UTC](https://www.ruby-forum.com/t/heroku-account-behavior/180517 "2009-12-21T01:15:37Z")

</div>

\#heroku Heroku account behavior: 1 account is good enough. (Thumbs up for Heroku Customer Support! ) http://c1c.me/heroku – You received this message because you are subscribed to the Google Groups “Ruby on Rails: T…

---

## [Problem with has\_many :through Association](https://www.ruby-forum.com/t/problem-with-has-many-through-association/180514)

<div class="topic-metadata">

**Author:** [@LeonS](https://www.ruby-forum.com/u/LeonS)\
**Replies:** 1\
**Last updated:** [December 21, 2009, 12:04am UTC](https://www.ruby-forum.com/t/problem-with-has-many-through-association/180514 "2009-12-21T00:04:12Z")

</div>

Hi, I’ve got a problem with a has\_many :through association, i cant call the u1.UsersProfileAttributes.find\_by\_ProfileAttribute\_name (“icq”) method, rails means that this method doesn’t exist. The method u1.UsersProfi…

---

## [\[JOBS\] Available for HIRE](https://www.ruby-forum.com/t/jobs-available-for-hire/180509)

<div class="topic-metadata">

**Author:** [@mekdigital](https://www.ruby-forum.com/u/mekdigital)\
**Replies:** 1\
**Last updated:** [December 20, 2009, 11:52pm UTC](https://www.ruby-forum.com/t/jobs-available-for-hire/180509 "2009-12-20T23:52:39Z")

</div>

Hello World, I’ll be back on the market at the beginning of the year! I cleaned up my resume for the occasion! :slight\_smile: – Emanuele T. – You received this message because you are subscribed to the Google Gr…

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

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