# Rails

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

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

---

## ["Missing Template" when manually creating views](https://www.ruby-forum.com/t/missing-template-when-manually-creating-views/185519)

<div class="topic-metadata">

**Author:** [@tutiplain](https://www.ruby-forum.com/u/tutiplain)\
**Replies:** 6\
**Last updated:** [March 22, 2010, 2:40pm UTC](https://www.ruby-forum.com/t/missing-template-when-manually-creating-views/185519 "2010-03-22T14:40:24Z")

</div>

Hi everyone, I am trying to set up a controller and a view manually, without the aid of scaffolding (though I am using a scaffolded model as reference). I have set up my controller like this: class RecetasController \<…

---

## [Including a json object in Rails 3 views](https://www.ruby-forum.com/t/including-a-json-object-in-rails-3-views/185540)

<div class="topic-metadata">

**Author:** [@MikeGBoston](https://www.ruby-forum.com/u/MikeGBoston)\
**Replies:** 1\
**Last updated:** [March 22, 2010, 2:33pm UTC](https://www.ruby-forum.com/t/including-a-json-object-in-rails-3-views/185540 "2010-03-22T14:33:57Z")

</div>

Hi All, I’m trying to embed a json object into one of views, and what used to work in Rails 2.x now no longer works. I’m generating the json code in my Staff model: def schedule appointments = Appointment.find(:all…

---

## [Installing will\_paginate](https://www.ruby-forum.com/t/installing-will-paginate/185536)

<div class="topic-metadata">

**Author:** [@ESESES](https://www.ruby-forum.com/u/ESESES)\
**Replies:** 1\
**Last updated:** [March 22, 2010, 12:33pm UTC](https://www.ruby-forum.com/t/installing-will-paginate/185536 "2010-03-22T12:33:25Z")

</div>

I installed the mislav-will\_paginate gem and put the following in my environment.rb file config.gem ‘mislav-will\_paginate’, :lib =\> ‘will\_paginate’, :source =\> ‘http://gems.github.com’ but why would I still be getti…

---

## [Calling a default record for a has\_many association](https://www.ruby-forum.com/t/calling-a-default-record-for-a-has-many-association/185486)

<div class="topic-metadata">

**Author:** [@Angelo\_Ashmore](https://www.ruby-forum.com/u/Angelo_Ashmore)\
**Replies:** 2\
**Last updated:** [March 22, 2010, 11:44am UTC](https://www.ruby-forum.com/t/calling-a-default-record-for-a-has-many-association/185486 "2010-03-22T11:44:49Z")

</div>

I have a Shop model that has\_many Zones (a Zone assigns different pricing to products). I want to save a default Zone for a Shop. This is what I have in my Shop class: has\_one :default\_zone, :class\_name =\> “Zone” Aft…

---

## [How to create an index page with data from other contollers](https://www.ruby-forum.com/t/how-to-create-an-index-page-with-data-from-other-contollers/185465)

<div class="topic-metadata">

**Author:** [@graham](https://www.ruby-forum.com/u/graham)\
**Replies:** 3\
**Last updated:** [March 22, 2010, 11:43am UTC](https://www.ruby-forum.com/t/how-to-create-an-index-page-with-data-from-other-contollers/185465 "2010-03-22T11:43:03Z")

</div>

Hi all, First I’m new to RoR so if I’m asking a question thats simple sorry but I can’t find the answer on google. I have a number of controllers that are working fine and I’ve got the foreign keys etc working. What…

---

## [Error in the code Doube Render (colins')](https://www.ruby-forum.com/t/error-in-the-code-doube-render-colins/185504)

<div class="topic-metadata">

**Author:** [@guru\_101](https://www.ruby-forum.com/u/guru_101)\
**Replies:** 3\
**Last updated:** [March 22, 2010, 11:40am UTC](https://www.ruby-forum.com/t/error-in-the-code-doube-render-colins/185504 "2010-03-22T11:40:08Z")

</div>

Hi everyone, i followed colins example and it worked perfectly but now i get this error ActionController::DoubleRenderError in UserController#login Render and/or redirect were called multiple times in this action. Ple…

---

## [Step 4implementing to implement a file uploader applictn in](https://www.ruby-forum.com/t/step-4implementing-to-implement-a-file-uploader-applictn-in/185523)

<div class="topic-metadata">

**Author:** [@murfhy](https://www.ruby-forum.com/u/murfhy)\
**Replies:** 1\
**Last updated:** [March 22, 2010, 10:12am UTC](https://www.ruby-forum.com/t/step-4implementing-to-implement-a-file-uploader-applictn-in/185523 "2010-03-22T10:12:53Z")

</div>

can any one provide a step by step procedure to implement a project with file uploader in rails. pleaseeeeeeeeeeeeeeee

---

## [Capitalize and utf8 international symbols](https://www.ruby-forum.com/t/capitalize-and-utf8-international-symbols/185334)

<div class="topic-metadata">

**Author:** [@asoto](https://www.ruby-forum.com/u/asoto)\
**Replies:** 1\
**Last updated:** [March 22, 2010, 10:06am UTC](https://www.ruby-forum.com/t/capitalize-and-utf8-international-symbols/185334 "2010-03-22T10:06:27Z")

</div>

Hi there, Being a relatively happy Rails user I suddenly noticed that string#capitalize and friends do not play well with international characters well. Sample console session: $ ./script/console Loading developmen…

---

## [Educational type of application](https://www.ruby-forum.com/t/educational-type-of-application/185530)

<div class="topic-metadata">

**Author:** [@cr930](https://www.ruby-forum.com/u/cr930)\
**Replies:** 0\
**Last updated:** [March 22, 2010, 10:00am UTC](https://www.ruby-forum.com/t/educational-type-of-application/185530 "2010-03-22T10:00:15Z")

</div>

mods: if this is in the wrong category or what not please feel free to delete or move. Thanks! Hi, I’ve been looking for something like moodle but in RoR that would give the ability to create tests, quizes, and othe…

---

## [Rails 3: including a json object in views](https://www.ruby-forum.com/t/rails-3-including-a-json-object-in-views/185524)

<div class="topic-metadata">

**Author:** [@Michael\_Gerstenblat](https://www.ruby-forum.com/u/Michael_Gerstenblat)\
**Replies:** 0\
**Last updated:** [March 22, 2010, 9:32am UTC](https://www.ruby-forum.com/t/rails-3-including-a-json-object-in-views/185524 "2010-03-22T09:32:30Z")

</div>

Hi All, I’m trying to embed a json object into one of views, and what used to work in Rails 2.x now no longer works. I’m generating the json code in my Staff model: def schedule appointments = Appointment.find(:al…

---

## [Unit testing is not running](https://www.ruby-forum.com/t/unit-testing-is-not-running/185522)

<div class="topic-metadata">

**Author:** [@periyasamy](https://www.ruby-forum.com/u/periyasamy)\
**Replies:** 3\
**Last updated:** [March 22, 2010, 8:34am UTC](https://www.ruby-forum.com/t/unit-testing-is-not-running/185522 "2010-03-22T08:34:55Z")

</div>

Hi, when i test the file for “Unit testing”, i am getting the following errror as below, /usr/local/lib/ruby/site\_ruby/1.8/rubygems/custom\_require.rb:31:in gem\_original\_require': no such file to load -- rails\_test\_se…

---

## [Redirect\_to that doesn't](https://www.ruby-forum.com/t/redirect-to-that-doesnt/185483)

<div class="topic-metadata">

**Author:** [@Jeffrey\_LSTaylor](https://www.ruby-forum.com/u/Jeffrey_LSTaylor)\
**Replies:** 1\
**Last updated:** [March 22, 2010, 8:31am UTC](https://www.ruby-forum.com/t/redirect-to-that-doesnt/185483 "2010-03-22T08:31:48Z")

</div>

I have some code that works when logged\_in but not when not logged\_in. The switch\_theme action just changes the variable controlling the CSS stylesheet and does a ‘redirect\_to :back’. But no other action is called. …

---

## [What is the correct path for text\_field in my view?](https://www.ruby-forum.com/t/what-is-the-correct-path-for-text-field-in-my-view/185485)

<div class="topic-metadata">

**Author:** [@DrSJackanapes](https://www.ruby-forum.com/u/DrSJackanapes)\
**Replies:** 1\
**Last updated:** [March 22, 2010, 8:22am UTC](https://www.ruby-forum.com/t/what-is-the-correct-path-for-text-field-in-my-view/185485 "2010-03-22T08:22:44Z")

</div>

Hail Caesars! I have the following text entry field in my view: \<%= text\_field :order, :company\_name %\> However, company\_name doesn’t really reside in the orders table. It resides in the “company” table, which belong…

---

## [Sub accounts](https://www.ruby-forum.com/t/sub-accounts/185515)

<div class="topic-metadata">

**Author:** [@mlittle](https://www.ruby-forum.com/u/mlittle)\
**Replies:** 5\
**Last updated:** [March 22, 2010, 6:57am UTC](https://www.ruby-forum.com/t/sub-accounts/185515 "2010-03-22T06:57:24Z")

</div>

I am using restful authentication and was wondering if anyone has had any experience with sub accounts. Basically, I want a user to have the ability to add another user(s) to his/her account. So if user A creates an a…

---

## [Routing error in Rails 3](https://www.ruby-forum.com/t/routing-error-in-rails-3/185453)

<div class="topic-metadata">

**Author:** [@rjunee](https://www.ruby-forum.com/u/rjunee)\
**Replies:** 3\
**Last updated:** [March 22, 2010, 4:03am UTC](https://www.ruby-forum.com/t/routing-error-in-rails-3/185453 "2010-03-22T04:03:33Z")

</div>

I’m hoping someone can advise me on how to debug this routing error. My routes.rb includes: resources :prospects, :only =\> \[“create”\] rake routes shows: prospects POST /prospects(.:format) {:controller=\>“prospects”,…

---

## [Using ActionMailer on a controller method](https://www.ruby-forum.com/t/using-actionmailer-on-a-controller-method/185507)

<div class="topic-metadata">

**Author:** [@command0](https://www.ruby-forum.com/u/command0)\
**Replies:** 6\
**Last updated:** [March 22, 2010, 3:01am UTC](https://www.ruby-forum.com/t/using-actionmailer-on-a-controller-method/185507 "2010-03-22T03:01:31Z")

</div>

Hi guys (and gals), I have the most strange issue that I just cannot figure out. It doesn’t make sense at all why it’s happening, and had a fellow Rails developer friend of mine from the UK look at it with me last nig…

---

## [Link as a link AND as a function](https://www.ruby-forum.com/t/link-as-a-link-and-as-a-function/185140)

<div class="topic-metadata">

**Author:** [@mike343](https://www.ruby-forum.com/u/mike343)\
**Replies:** 4\
**Last updated:** [March 22, 2010, 2:37am UTC](https://www.ruby-forum.com/t/link-as-a-link-and-as-a-function/185140 "2010-03-22T02:37:51Z")

</div>

Hi there, I am relatively new to Rails and I am trying to do a fairly common task. I have a page that displays a series of links that go to offsite URLS. Next to each link is a counter that shows how many times that l…

---

## [Rails + Mysql](https://www.ruby-forum.com/t/rails-mysql/185216)

<div class="topic-metadata">

**Author:** [@JosSSSS\_Luis\_R](https://www.ruby-forum.com/u/JosSSSS_Luis_R)\
**Replies:** 13\
**Last updated:** [March 22, 2010, 2:03am UTC](https://www.ruby-forum.com/t/rails-mysql/185216 "2010-03-22T02:03:28Z")

</div>

Hi… I’m a rails newb, trying to do some rails homework or sort of… I’m trying to run rails on Fedora 12… but it seems impossible… It’s impossible to install the mysql gem… this is the last output when I tried to run a…

---

## [Auto\_complete plugin on rails 2.3.5](https://www.ruby-forum.com/t/auto-complete-plugin-on-rails-2-3-5/185427)

<div class="topic-metadata">

**Author:** [@Guido](https://www.ruby-forum.com/u/Guido)\
**Replies:** 2\
**Last updated:** [March 21, 2010, 10:43pm UTC](https://www.ruby-forum.com/t/auto-complete-plugin-on-rails-2-3-5/185427 "2010-03-21T22:43:57Z")

</div>

Hi, this is my first post. I have run: $ ruby script/plugin -v install auto\_complete but the result is: Plugin not found: \[“auto\_complete”\] #\<Errno::ENOENT: No such file or directory - /dev/null\> I have also try to…

---

## [Ruby on Rails tutorials for beginners are available here](https://www.ruby-forum.com/t/ruby-on-rails-tutorials-for-beginners-are-available-here/185423)

<div class="topic-metadata">

**Author:** [@pankaj](https://www.ruby-forum.com/u/pankaj)\
**Replies:** 3\
**Last updated:** [March 21, 2010, 8:15pm UTC](https://www.ruby-forum.com/t/ruby-on-rails-tutorials-for-beginners-are-available-here/185423 "2010-03-21T20:15:16Z")

</div>

Hello Everyone, I have started my blog at http://railsguru.org. Besides other stuff on Rails, the main focus of the site will be to help beginners to learn Ruby and Rails and build the fundamentals. Regards, Pankaj …

---

## [Calculate Probability?](https://www.ruby-forum.com/t/calculate-probability/185496)

<div class="topic-metadata">

**Author:** [@cojones](https://www.ruby-forum.com/u/cojones)\
**Replies:** 5\
**Last updated:** [March 21, 2010, 6:32pm UTC](https://www.ruby-forum.com/t/calculate-probability/185496 "2010-03-21T18:32:50Z")

</div>

Hello, I’m working with probability and Ruby doesn’t really does as I want. Just to make it easier to understand I’ll focus on the problem. I have some event that should occur in 20% of all events. I thought I’d make…

---

## [Logging out feature](https://www.ruby-forum.com/t/logging-out-feature/185497)

<div class="topic-metadata">

**Author:** [@guru\_101](https://www.ruby-forum.com/u/guru_101)\
**Replies:** 5\
**Last updated:** [March 21, 2010, 6:02pm UTC](https://www.ruby-forum.com/t/logging-out-feature/185497 "2010-03-21T18:02:24Z")

</div>

Logging out feature, Code: def logout @title = “Login - Books” session\[:user\_id\] != nil flash\[:notice\] = "You have sucessfully been logged out !" redirect\_to :controller =\> :books, :action =\> :index end end ^^when…

---

## [Need very simple help](https://www.ruby-forum.com/t/need-very-simple-help/185493)

<div class="topic-metadata">

**Author:** [@guru\_101](https://www.ruby-forum.com/u/guru_101)\
**Replies:** 4\
**Last updated:** [March 21, 2010, 5:47pm UTC](https://www.ruby-forum.com/t/need-very-simple-help/185493 "2010-03-21T17:47:11Z")

</div>

I have several questions and i need clear understanding on how i should approach them, my target is for creating something called “fakebook”, facebooks copy but not going live at all (uni project). Security Question …

---

## [Changing Scafflolds](https://www.ruby-forum.com/t/changing-scafflolds/185487)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 12\
**Last updated:** [March 21, 2010, 5:34pm UTC](https://www.ruby-forum.com/t/changing-scafflolds/185487 "2010-03-21T17:34:53Z")

</div>

Basically I’ve been creating various RoR (ruby on rails) applications and I cant figure out how to add properties to an already existing scaffold; I have ended up destroying and messing up two projects that I’ve worke…

---

## [Rail Quickstart Guide: Always receiving "template missing" errors](https://www.ruby-forum.com/t/rail-quickstart-guide-always-receiving-template-missing-errors/185382)

<div class="topic-metadata">

**Author:** [@stone](https://www.ruby-forum.com/u/stone)\
**Replies:** 3\
**Last updated:** [March 21, 2010, 4:11pm UTC](https://www.ruby-forum.com/t/rail-quickstart-guide-always-receiving-template-missing-errors/185382 "2010-03-21T16:11:10Z")

</div>

Hello, Upon going through the rails quickstart guide: Getting Started with Rails — Ruby on Rails Guides & also this guide here: http://fuelyourcoding.com/creating-your-first-ruby-on-rails-application-from-scratch/ I…

---

## [Validates uniqueness scope](https://www.ruby-forum.com/t/validates-uniqueness-scope/185489)

<div class="topic-metadata">

**Author:** [@Angelo\_Ashmore](https://www.ruby-forum.com/u/Angelo_Ashmore)\
**Replies:** 0\
**Last updated:** [March 21, 2010, 11:30am UTC](https://www.ruby-forum.com/t/validates-uniqueness-scope/185489 "2010-03-21T11:30:51Z")

</div>

In a Rails 2.x validation to check if the name of some model is unique within a some category, I would use: validates\_uniqueness\_of :name, :scope =\> :category\_id In Rails 3, this is replaced with: validates :name, :u…

---

## [Query Help](https://www.ruby-forum.com/t/query-help/185450)

<div class="topic-metadata">

**Author:** [@newb](https://www.ruby-forum.com/u/newb)\
**Replies:** 2\
**Last updated:** [March 21, 2010, 10:15am UTC](https://www.ruby-forum.com/t/query-help/185450 "2010-03-21T10:15:20Z")

</div>

HEllo all, Kindly look into the below query @access\_senders = GroupUser.find\_by\_sql “select distinct user\_id from group\_users where group\_id in (SELECT group\_id FROM group\_users where user\_id=2)” when i inspect the @…

---

## [Disabled Text\_Field Value Not Saved](https://www.ruby-forum.com/t/disabled-text-field-value-not-saved/185475)

<div class="topic-metadata">

**Author:** [@josh](https://www.ruby-forum.com/u/josh)\
**Replies:** 3\
**Last updated:** [March 21, 2010, 9:32am UTC](https://www.ruby-forum.com/t/disabled-text-field-value-not-saved/185475 "2010-03-21T09:32:36Z")

</div>

I have a text\_field that stores an invoice due date. It’s value is updated by JQuery when the user specifies the terms of the invoice. So, the value would become the Invoice Date + Terms. The text\_field should be disa…

---

## [Preparing an Asynchronous Response with ActionController](https://www.ruby-forum.com/t/preparing-an-asynchronous-response-with-actioncontroller/185436)

<div class="topic-metadata">

**Author:** [@tomx](https://www.ruby-forum.com/u/tomx)\
**Replies:** 1\
**Last updated:** [March 21, 2010, 9:17am UTC](https://www.ruby-forum.com/t/preparing-an-asynchronous-response-with-actioncontroller/185436 "2010-03-21T09:17:54Z")

</div>

Hello, I was wondering if there’s an easy way to make ActionController render a response in an asynchronous background process. I have a large object graph which takes over a minute to serialize in amf: render :amf …

---

## [I18n and Rails 2.3.5](https://www.ruby-forum.com/t/i18n-and-rails-2-3-5/185434)

<div class="topic-metadata">

**Author:** [@bartolome](https://www.ruby-forum.com/u/bartolome)\
**Replies:** 2\
**Last updated:** [March 21, 2010, 4:15am UTC](https://www.ruby-forum.com/t/i18n-and-rails-2-3-5/185434 "2010-03-21T04:15:23Z")

</div>

Has anybody faced any problem to use i18n on Rails 2.3.5? Sometimes when I call the t function, it works fine, but for some keys, it does not work and I have no clue why it is going on. I do have a .yml with correct…

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

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