# Rails

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

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

---

## [Creating a custom environment](https://www.ruby-forum.com/t/creating-a-custom-environment/136963)

<div class="topic-metadata">

**Author:** [@dr\_j](https://www.ruby-forum.com/u/dr_j)\
**Replies:** 0\
**Last updated:** [May 7, 2008, 6:58pm UTC](https://www.ruby-forum.com/t/creating-a-custom-environment/136963 "2008-05-07T18:58:57Z")

</div>

First, I do consider myself still a noob with Ruby/Rails (Rails 2.0). My question has to do with creating a custom environment; rails provides the development/test/production environments, but the shop I’m working at …

---

## [Begginer question: how to edit using options\_from\_collection](https://www.ruby-forum.com/t/begginer-question-how-to-edit-using-options-from-collection/136878)

<div class="topic-metadata">

**Author:** [@kanekcwu](https://www.ruby-forum.com/u/kanekcwu)\
**Replies:** 2\
**Last updated:** [May 7, 2008, 6:54pm UTC](https://www.ruby-forum.com/t/begginer-question-how-to-edit-using-options-from-collection/136878 "2008-05-07T18:54:11Z")

</div>

Hi, I have been stuck on this problem for 2 hours and still have no idea how to do it. Basically I have a relationship between Workout and Exercise Exercise has many Work out anyway in my code at Workout.view the edi…

---

## [Heavy CSV importing](https://www.ruby-forum.com/t/heavy-csv-importing/136879)

<div class="topic-metadata">

**Author:** [@melvinram](https://www.ruby-forum.com/u/melvinram)\
**Replies:** 4\
**Last updated:** [May 7, 2008, 6:52pm UTC](https://www.ruby-forum.com/t/heavy-csv-importing/136879 "2008-05-07T18:52:56Z")

</div>

I am building out an app that will allow the user to import a data set (as a CSV) from another application and view reports that will allow them to make educated decisions. The most common task users will be doing is …

---

## [Need Explainantion of ActiveRecord::Base.transaction](https://www.ruby-forum.com/t/need-explainantion-of-activerecord-base-transaction/136887)

<div class="topic-metadata">

**Author:** [@malioboro](https://www.ruby-forum.com/u/malioboro)\
**Replies:** 5\
**Last updated:** [May 7, 2008, 6:37pm UTC](https://www.ruby-forum.com/t/need-explainantion-of-activerecord-base-transaction/136887 "2008-05-07T18:37:24Z")

</div>

Dear All: Any one can help me to explain what is it for: \[1\] ActiveRecord::Base.transaction and Customer.transaction ? \[2\] What is deferences ActiveRecord::Base.transaction and Customer.transaction ? \[3\] Is it the s…

---

## [Has\_many :through question](https://www.ruby-forum.com/t/has-many-through-question/136944)

<div class="topic-metadata">

**Author:** [@jmjmjm](https://www.ruby-forum.com/u/jmjmjm)\
**Replies:** 2\
**Last updated:** [May 7, 2008, 6:26pm UTC](https://www.ruby-forum.com/t/has-many-through-question/136944 "2008-05-07T18:26:12Z")

</div>

I am trying to setup the has\_many :through scheme but am having some difficulties. The long story short I am building a simple ACL. I have Users, Roles and Permissions. Below is what I started with for associations. …

---

## [Rails-authorization plugin + rspec meaningful specs?](https://www.ruby-forum.com/t/rails-authorization-plugin-rspec-meaningful-specs/136959)

<div class="topic-metadata">

**Author:** [@eblatt](https://www.ruby-forum.com/u/eblatt)\
**Replies:** 0\
**Last updated:** [May 7, 2008, 6:13pm UTC](https://www.ruby-forum.com/t/rails-authorization-plugin-rspec-meaningful-specs/136959 "2008-05-07T18:13:38Z")

</div>

Hello, I’m working with the fabulous authorization\_plugin and have got things working pretty well. I’m now going back and trying to write some meaningful specs for my controller code. My code has the following line…

---

## [Errors in production environment](https://www.ruby-forum.com/t/errors-in-production-environment/136849)

<div class="topic-metadata">

**Author:** [@sdpurtill](https://www.ruby-forum.com/u/sdpurtill)\
**Replies:** 1\
**Last updated:** [May 7, 2008, 6:12pm UTC](https://www.ruby-forum.com/t/errors-in-production-environment/136849 "2008-05-07T18:12:30Z")

</div>

Hi all. I switched to production environment for my rails app. My production environment is an apache2+mongrel. All worked fine, but I have a problem: when an error is generated all debug infos come out, as like as i…

---

## [ESPN -Sr. Web Developer position- Ruby exp. required in our Burbank, CA office](https://www.ruby-forum.com/t/espn-sr-web-developer-position-ruby-exp-required-in-our-burbank-ca-office/136954)

<div class="topic-metadata">

**Author:** [@CaccamoS\_Marisa](https://www.ruby-forum.com/u/CaccamoS_Marisa)\
**Replies:** 0\
**Last updated:** [May 7, 2008, 5:32pm UTC](https://www.ruby-forum.com/t/espn-sr-web-developer-position-ruby-exp-required-in-our-burbank-ca-office/136954 "2008-05-07T17:32:15Z")

</div>

Hi All, We are looking for a Sr. Web D. with Ruby experience in Burbank, CA office. I have included a job description for your review. If you are interested please apply online at http://www.espn.com/joinourteam re…

---

## [Migration](https://www.ruby-forum.com/t/migration/136892)

<div class="topic-metadata">

**Author:** [@validkeys](https://www.ruby-forum.com/u/validkeys)\
**Replies:** 2\
**Last updated:** [May 7, 2008, 5:00pm UTC](https://www.ruby-forum.com/t/migration/136892 "2008-05-07T17:00:21Z")

</div>

quick n00b question. If I am working on one computer on a new rails app, commit it to SVN, and then checkout to another computer. Once I create the database (without tables), When i run rake db:migrate, will it run al…

---

## [Partials and config.load\_paths](https://www.ruby-forum.com/t/partials-and-config-load-paths/136934)

<div class="topic-metadata">

**Author:** [@MaddyTheGoose](https://www.ruby-forum.com/u/MaddyTheGoose)\
**Replies:** 3\
**Last updated:** [May 7, 2008, 4:41pm UTC](https://www.ruby-forum.com/t/partials-and-config-load-paths/136934 "2008-05-07T16:41:20Z")

</div>

Is it possible to define a sub directory in the views folder to put partials? In my config.load\_paths in the environment.rb I’ve added an entry to the effect of “config.load\_paths += %W( #{RAILS\_ROOT}/app/ views/my\_it…

---

## [Has\_many :conditions =\>](https://www.ruby-forum.com/t/has-many-conditions/136727)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 29\
**Last updated:** [May 7, 2008, 4:23pm UTC](https://www.ruby-forum.com/t/has-many-conditions/136727 "2008-05-07T16:23:34Z")

</div>

In a model class, can the target of the has\_many :conditions option be a method? For example: class etc. has\_many abcs :conditions =\> :local\_conditions private def local\_conditions \[ “start = :begin\_date AND end…

---

## [Rspec and validates\_existence\_of](https://www.ruby-forum.com/t/rspec-and-validates-existence-of/136941)

<div class="topic-metadata">

**Author:** [@Rory\_McKinley](https://www.ruby-forum.com/u/Rory_McKinley)\
**Replies:** 0\
**Last updated:** [May 7, 2008, 4:20pm UTC](https://www.ruby-forum.com/t/rspec-and-validates-existence-of/136941 "2008-05-07T16:20:04Z")

</div>

Hi List I am using validates\_existence\_of in some of my Model classes. For instance I have the following class: class User \< ActiveRecord::Base belongs\_to :department validates\_existence\_of :department end If I c…

---

## [HABTM, and complex validation](https://www.ruby-forum.com/t/habtm-and-complex-validation/136942)

<div class="topic-metadata">

**Author:** [@bartz](https://www.ruby-forum.com/u/bartz)\
**Replies:** 0\
**Last updated:** [May 7, 2008, 4:18pm UTC](https://www.ruby-forum.com/t/habtm-and-complex-validation/136942 "2008-05-07T16:18:59Z")

</div>

Hey gang, Pretty complicated question, but I’ll try my best. I’m building an app in which the user can enter a Show. A Show has\_many items, and each Item has and belongs to many People. So, a person can appear in man…

---

## [ActiveRecord validation with ajax calls](https://www.ruby-forum.com/t/activerecord-validation-with-ajax-calls/136929)

<div class="topic-metadata">

**Author:** [@skg](https://www.ruby-forum.com/u/skg)\
**Replies:** 1\
**Last updated:** [May 7, 2008, 4:17pm UTC](https://www.ruby-forum.com/t/activerecord-validation-with-ajax-calls/136929 "2008-05-07T16:17:16Z")

</div>

Hi I have a model class ServiceDeskResolution.It has fields, code and solution.I have to make the solution not empty .So for that I wrote validates\_presence\_of :resolution in the model.So from the view when I click s…

---

## [Best way to implement?](https://www.ruby-forum.com/t/best-way-to-implement/136865)

<div class="topic-metadata">

**Author:** [@jeremy](https://www.ruby-forum.com/u/jeremy)\
**Replies:** 10\
**Last updated:** [May 7, 2008, 4:12pm UTC](https://www.ruby-forum.com/t/best-way-to-implement/136865 "2008-05-07T16:12:52Z")

</div>

So I’m new to all this Rails stuff and this is probably a database design-related question to, but here it is… Just for learning I’m trying to build a little real estate listings application. Of course there is the l…

---

## [Scheduling/calendering](https://www.ruby-forum.com/t/scheduling-calendering/136867)

<div class="topic-metadata">

**Author:** [@Tim\_U](https://www.ruby-forum.com/u/Tim_U)\
**Replies:** 1\
**Last updated:** [May 7, 2008, 4:12pm UTC](https://www.ruby-forum.com/t/scheduling-calendering/136867 "2008-05-07T16:12:17Z")

</div>

I want to write a scheduling application. Basically people are going to submit schedules like “every thursday from 3-4” or “mon, wed, fri, 10-11” or something like that. I want to display the schedule on a calendar, a…

---

## [Single table inheritance , how to alias the id key name?](https://www.ruby-forum.com/t/single-table-inheritance-how-to-alias-the-id-key-name/136935)

<div class="topic-metadata">

**Author:** [@Erwin](https://www.ruby-forum.com/u/Erwin)\
**Replies:** 1\
**Last updated:** [May 7, 2008, 3:49pm UTC](https://www.ruby-forum.com/t/single-table-inheritance-how-to-alias-the-id-key-name/136935 "2008-05-07T15:49:38Z")

</div>

I have a model class Person \< ActiveRecord::Base and 2 classes inheriting from it class User \< Person and class Contact \< Person obviously the id is person.id but is there anyway to use user.id and contact.id or …

---

## [How does one specify plugin versions under git?](https://www.ruby-forum.com/t/how-does-one-specify-plugin-versions-under-git/136641)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 4\
**Last updated:** [May 7, 2008, 3:39pm UTC](https://www.ruby-forum.com/t/how-does-one-specify-plugin-versions-under-git/136641 "2008-05-07T15:39:41Z")

</div>

Hi all, I’m looking to migrate all my plugins to git in the near future, just got a couple of questions I’ve not been able to find answers to: First, will users need git installed in order to install git-hosted plugi…

---

## [Ferret Problem with Restful Authentication](https://www.ruby-forum.com/t/ferret-problem-with-restful-authentication/136663)

<div class="topic-metadata">

**Author:** [@MrSBless](https://www.ruby-forum.com/u/MrSBless)\
**Replies:** 5\
**Last updated:** [May 7, 2008, 3:35pm UTC](https://www.ruby-forum.com/t/ferret-problem-with-restful-authentication/136663 "2008-05-07T15:35:32Z")

</div>

I am using Restful Authentication plugin for the login system. Whenever I include ferret in my application it shows me error. I am using the ferret for the other model as well in which it works very well. Can anyone s…

---

## [Number Helper method](https://www.ruby-forum.com/t/number-helper-method/136783)

<div class="topic-metadata">

**Author:** [@jags](https://www.ruby-forum.com/u/jags)\
**Replies:** 4\
**Last updated:** [May 7, 2008, 3:21pm UTC](https://www.ruby-forum.com/t/number-helper-method/136783 "2008-05-07T15:21:03Z")

</div>

hello all i was lookin for a method which wud print the floating numbers without fractional part if the fractional part is 0 5.0 shud print 5 5.5 shud print 5.5 is there any helper method to do it jags

---

## [Where should the responsibility for ACL be placed in MVC?](https://www.ruby-forum.com/t/where-should-the-responsibility-for-acl-be-placed-in-mvc/136774)

<div class="topic-metadata">

**Author:** [@tuktuk](https://www.ruby-forum.com/u/tuktuk)\
**Replies:** 7\
**Last updated:** [May 7, 2008, 3:05pm UTC](https://www.ruby-forum.com/t/where-should-the-responsibility-for-acl-be-placed-in-mvc/136774 "2008-05-07T15:05:59Z")

</div>

I am rebuilding one of my favorite intranet apps in Rails. I use a lot of access control - not just on model-level, but down to specific fields inside one model. For example: User A is allowed to modify the field “Me…

---

## [Shared controller logic](https://www.ruby-forum.com/t/shared-controller-logic/136775)

<div class="topic-metadata">

**Author:** [@thorsten](https://www.ruby-forum.com/u/thorsten)\
**Replies:** 6\
**Last updated:** [May 7, 2008, 2:42pm UTC](https://www.ruby-forum.com/t/shared-controller-logic/136775 "2008-05-07T14:42:47Z")

</div>

what’s the best place for code that’s used in several controllers? i have a site with several namespaces. one for admin and one for client (and some more) adding a new client is a (relative) complex process involving…

---

## [How to get normal view context when using ERB directly](https://www.ruby-forum.com/t/how-to-get-normal-view-context-when-using-erb-directly/136924)

<div class="topic-metadata">

**Author:** [@stefan](https://www.ruby-forum.com/u/stefan)\
**Replies:** 1\
**Last updated:** [May 7, 2008, 2:03pm UTC](https://www.ruby-forum.com/t/how-to-get-normal-view-context-when-using-erb-directly/136924 "2008-05-07T14:03:17Z")

</div>

Hi! I’m creating a content management system and the standard rails layout/ template/partial approach wasn’t going to cut it for me. I’m now rendering erb templates myself like so: template = ERB.new(File.new("#{RAIL…

---

## [Hacking on restful\_authentication](https://www.ruby-forum.com/t/hacking-on-restful-authentication/136930)

<div class="topic-metadata">

**Author:** [@matthew](https://www.ruby-forum.com/u/matthew)\
**Replies:** 0\
**Last updated:** [May 7, 2008, 1:25pm UTC](https://www.ruby-forum.com/t/hacking-on-restful-authentication/136930 "2008-05-07T13:25:13Z")

</div>

I am relatively new to Rails, and I recently installed the restful\_authentication plugin to manage authentication and users for a site I’m developing. I wanted to change the behaviour of the plugin so that it returne…

---

## [Call Web service on other network](https://www.ruby-forum.com/t/call-web-service-on-other-network/136923)

<div class="topic-metadata">

**Author:** [@crazybass](https://www.ruby-forum.com/u/crazybass)\
**Replies:** 0\
**Last updated:** [May 7, 2008, 1:02pm UTC](https://www.ruby-forum.com/t/call-web-service-on-other-network/136923 "2008-05-07T13:02:42Z")

</div>

Hello In my rails application I am trying to call a web service wich is on other machine and other network. Here is the code: begin factory\_chgst = SOAP::WSDLDriverFactory.new(“http://148.110.139.26/ mywebservice/s…

---

## [Rendering view using ajax is not working](https://www.ruby-forum.com/t/rendering-view-using-ajax-is-not-working/136919)

<div class="topic-metadata">

**Author:** [@karthikragu](https://www.ruby-forum.com/u/karthikragu)\
**Replies:** 1\
**Last updated:** [May 7, 2008, 12:57pm UTC](https://www.ruby-forum.com/t/rendering-view-using-ajax-is-not-working/136919 "2008-05-07T12:57:34Z")

</div>

hi all, im calling a method in my controller from my view (category.rhtml) using form\_remote\_tag.the method was called properly but the view its rendering was not replaced properly in the parent view (category.…

---

## [Validates\_presence\_of](https://www.ruby-forum.com/t/validates-presence-of/136901)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 4\
**Last updated:** [May 7, 2008, 12:54pm UTC](https://www.ruby-forum.com/t/validates-presence-of/136901 "2008-05-07T12:54:43Z")

</div>

Hi I have a model class SDResolution.It has fields code and solution.I have to make the solution not empty .So for that I wrote validates\_presence\_of :resolution in the model.So from the view when I click save not…

---

## [Case condition in view](https://www.ruby-forum.com/t/case-condition-in-view/136721)

<div class="topic-metadata">

**Author:** [@OhMyRuby](https://www.ruby-forum.com/u/OhMyRuby)\
**Replies:** 7\
**Last updated:** [May 7, 2008, 11:59am UTC](https://www.ruby-forum.com/t/case-condition-in-view/136721 "2008-05-07T11:59:57Z")

</div>

can you use a case statement in the view. i get a \_erbout.concat “\\n” error. can someone please show the syntax on this.

---

## [Append a timestamp to file](https://www.ruby-forum.com/t/append-a-timestamp-to-file/136903)

<div class="topic-metadata">

**Author:** [@sunfish](https://www.ruby-forum.com/u/sunfish)\
**Replies:** 1\
**Last updated:** [May 7, 2008, 11:32am UTC](https://www.ruby-forum.com/t/append-a-timestamp-to-file/136903 "2008-05-07T11:32:57Z")

</div>

im doing following code but it gives error temp=Time.now.to\_s file\_name = “#{temp}\_”+ params\[:group\_member\_information\].original\_filename so please reply how to append a timestamp to file name

---

## [Ruby on rails paid services](https://www.ruby-forum.com/t/ruby-on-rails-paid-services/136904)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [May 7, 2008, 9:05am UTC](https://www.ruby-forum.com/t/ruby-on-rails-paid-services/136904 "2008-05-07T09:05:09Z")

</div>

Hi all Is there any forum where commercial projects on rails are posted? I am a rails developer myself and have couple of guys who are very much experienced in rails and ruby. Thanx Karthikeyan

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

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