# Rails

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

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

---

## [Not updating from migrate](https://www.ruby-forum.com/t/not-updating-from-migrate/144919)

<div class="topic-metadata">

**Author:** [@phil](https://www.ruby-forum.com/u/phil)\
**Replies:** 2\
**Last updated:** [August 4, 2008, 2:13pm UTC](https://www.ruby-forum.com/t/not-updating-from-migrate/144919 "2008-08-04T14:13:52Z")

</div>

This code runs: def self.up add\_column :film\_languages, :short\_code, :string fl = FilmLanguage.find\_by\_language("spanish") fl.short\_code = "es" fl.save fl = FilmLanguage.find\_by\_language("english") fl.short\_code = "e…

---

## [Problem in active\_support/string/access.rb?](https://www.ruby-forum.com/t/problem-in-active-support-string-access-rb/144930)

<div class="topic-metadata">

**Author:** [@phil](https://www.ruby-forum.com/u/phil)\
**Replies:** 0\
**Last updated:** [August 4, 2008, 1:53pm UTC](https://www.ruby-forum.com/t/problem-in-active-support-string-access-rb/144930 "2008-08-04T13:53:22Z")

</div>

There is this: def first(limit = 1) chars\[0..(limit - 1)\].to\_s end but in console when I try it I get: “test”.first NoMethodError: undefined method \[\]' for #\<Enumerable::Enumerator: 0x2242b90\> f…

---

## [Default value in related\_collection\_select](https://www.ruby-forum.com/t/default-value-in-related-collection-select/144928)

<div class="topic-metadata">

**Author:** [@mrbless](https://www.ruby-forum.com/u/mrbless)\
**Replies:** 0\
**Last updated:** [August 4, 2008, 1:45pm UTC](https://www.ruby-forum.com/t/default-value-in-related-collection-select/144928 "2008-08-04T13:45:44Z")

</div>

I am using related\_collection\_select for dynamic state select for selected country. But I have to make United States as default country. So in the collection \_select I have used :prompt=\>‘United State’ to make it defa…

---

## [Creating Ruby on Rails Indian Developers Network](https://www.ruby-forum.com/t/creating-ruby-on-rails-indian-developers-network/144903)

<div class="topic-metadata">

**Author:** [@ayyanar](https://www.ruby-forum.com/u/ayyanar)\
**Replies:** 1\
**Last updated:** [August 4, 2008, 1:24pm UTC](https://www.ruby-forum.com/t/creating-ruby-on-rails-indian-developers-network/144903 "2008-08-04T13:24:03Z")

</div>

Hi, If you are ROR indian developer, plz send an instant message to reachayyanaratyahoodotcom. We will create the developer network and start something useful for us. BTW, Iam Ayyanar, Leading ROR project. Thanks, …

---

## [Who uses RESTful?](https://www.ruby-forum.com/t/who-uses-restful/144911)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 3\
**Last updated:** [August 4, 2008, 1:07pm UTC](https://www.ruby-forum.com/t/who-uses-restful/144911 "2008-08-04T13:07:39Z")

</div>

I’m not into RESTful yet, as I haven’t understood it completely. So my question might fall back on that. I’m trying to learn it but I can’t see it will be useful for me. Who uses RESTful? I mean often an app is not th…

---

## ["Widgets" on a web site - what's the best way to do it?](https://www.ruby-forum.com/t/widgets-on-a-web-site-whats-the-best-way-to-do-it/144877)

<div class="topic-metadata">

**Author:** [@Hubert\_SSSSSSSSSpic](https://www.ruby-forum.com/u/Hubert_SSSSSSSSSpic)\
**Replies:** 5\
**Last updated:** [August 4, 2008, 1:00pm UTC](https://www.ruby-forum.com/t/widgets-on-a-web-site-whats-the-best-way-to-do-it/144877 "2008-08-04T13:00:03Z")

</div>

Hi all, I am having general question on how do you solve problem of rendering interactive (or not) “widgets” on your web sites - areas that user interact with and provide special behavior. For example, one might want…

---

## [Re: name\_scope and has\_many associations](https://www.ruby-forum.com/t/re-name-scope-and-has-many-associations/144923)

<div class="topic-metadata">

**Author:** [@fcheung](https://www.ruby-forum.com/u/fcheung)\
**Replies:** 0\
**Last updated:** [August 4, 2008, 12:55pm UTC](https://www.ruby-forum.com/t/re-name-scope-and-has-many-associations/144923 "2008-08-04T12:55:56Z")

</div>

However antigua.people.high\_earners returns nil. Why is this? I wouldn’t be surprised if it’s because of the finder SQL. Since the SQL could be anything adding the conditions could be non obvious. Have you tried doi…

---

## [Multilingual view](https://www.ruby-forum.com/t/multilingual-view/144920)

<div class="topic-metadata">

**Author:** [@shuaib85](https://www.ruby-forum.com/u/shuaib85)\
**Replies:** 2\
**Last updated:** [August 4, 2008, 12:45pm UTC](https://www.ruby-forum.com/t/multilingual-view/144920 "2008-08-04T12:45:56Z")

</div>

Dear all i was looking for a plugin that gives me the ability to have the view in different languages. I am using this for WebVZ. So, is there a plugin for multilingual view since i do not need the db or model things …

---

## [Name\_scope and has\_many associations](https://www.ruby-forum.com/t/name-scope-and-has-many-associations/144915)

<div class="topic-metadata">

**Author:** [@liseki](https://www.ruby-forum.com/u/liseki)\
**Replies:** 1\
**Last updated:** [August 4, 2008, 12:19pm UTC](https://www.ruby-forum.com/t/name-scope-and-has-many-associations/144915 "2008-08-04T12:19:46Z")

</div>

Hey people, I’m using named\_scope in some associations and I’ve run into a bit of a problem. For a simple association between two tables, named\_scope works fine: class Person \< AR:Base has\_many :cars end class Car…

---

## [Attachment\_fu - Problem in displaying image from DB](https://www.ruby-forum.com/t/attachment-fu-problem-in-displaying-image-from-db/196769)

<div class="topic-metadata">

**Author:** [@karthikeyan](https://www.ruby-forum.com/u/karthikeyan)\
**Replies:** 0\
**Last updated:** [August 4, 2008, 11:17am UTC](https://www.ruby-forum.com/t/attachment-fu-problem-in-displaying-image-from-db/196769 "2008-08-04T11:17:21Z")

</div>

Hi, I am using attachment\_fu plugin to upload images to database(I am using “:storage =\> :db\_file”). Now I want to read the image and display it in a web page. I am able to read it correctly, but i don’t know how to …

---

## [How to perform change password functionality?](https://www.ruby-forum.com/t/how-to-perform-change-password-functionality/144910)

<div class="topic-metadata">

**Author:** [@martin\_mercy2001](https://www.ruby-forum.com/u/martin_mercy2001)\
**Replies:** 0\
**Last updated:** [August 4, 2008, 9:37am UTC](https://www.ruby-forum.com/t/how-to-perform-change-password-functionality/144910 "2008-08-04T09:37:42Z")

</div>

Dear all, Iam in process of creation an admin panel, i have used def sign\_in if request.get? flash.now\[ :notice \] = 'Please enter your username and password' elsif request.post? and params\[ :admin \] session\[ :a…

---

## [Most frequent searched QUERY string - Ferret](https://www.ruby-forum.com/t/most-frequent-searched-query-string-ferret/144907)

<div class="topic-metadata">

**Author:** [@sgudibanda](https://www.ruby-forum.com/u/sgudibanda)\
**Replies:** 0\
**Last updated:** [August 4, 2008, 9:00am UTC](https://www.ruby-forum.com/t/most-frequent-searched-query-string-ferret/144907 "2008-08-04T09:00:57Z")

</div>

Hi, I need to calculate most frequent searches on a particular model. I am using ferret for searching in full text mode. For eg: Search on hospital names. I have a form which allows user to enter a search query, and …

---

## [Newbiw - How do I concate?](https://www.ruby-forum.com/t/newbiw-how-do-i-concate/144805)

<div class="topic-metadata">

**Author:** [@jalopy55](https://www.ruby-forum.com/u/jalopy55)\
**Replies:** 2\
**Last updated:** [August 4, 2008, 8:36am UTC](https://www.ruby-forum.com/t/newbiw-how-do-i-concate/144805 "2008-08-04T08:36:29Z")

</div>

I’ve found this nifty rFacebook tutorial and I’m so excited about learning to use Ruby on Rails. http://www.liverail.net/articles/2007/6/29/tutorial-on-developing-a-facebook-platform-application-with-ruby-on-rails How…

---

## [Beginner: Unable to create the first page](https://www.ruby-forum.com/t/beginner-unable-to-create-the-first-page/144825)

<div class="topic-metadata">

**Author:** [@nabanita\_sen](https://www.ruby-forum.com/u/nabanita_sen)\
**Replies:** 9\
**Last updated:** [August 4, 2008, 6:43am UTC](https://www.ruby-forum.com/t/beginner-unable-to-create-the-first-page/144825 "2008-08-04T06:43:28Z")

</div>

I have create my first ruby applications with the command: rails rails\_space Then I have created the controller like: ruby script/generate controller Site index about help Then started the server: ruby script/serve…

---

## [What is initdb.exe](https://www.ruby-forum.com/t/what-is-initdb-exe/144900)

<div class="topic-metadata">

**Author:** [@srijith](https://www.ruby-forum.com/u/srijith)\
**Replies:** 0\
**Last updated:** [August 4, 2008, 5:35am UTC](https://www.ruby-forum.com/t/what-is-initdb-exe/144900 "2008-08-04T05:35:14Z")

</div>

Hi I am trying install postgresql in windows and partition type FAT but at the time installation it saying install initdb.exe manually… what is initdb.exe and where shall i get. my postgresql version is postgresql-8.…

---

## [Customize Errors from method](https://www.ruby-forum.com/t/customize-errors-from-method/144793)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [August 4, 2008, 4:59am UTC](https://www.ruby-forum.com/t/customize-errors-from-method/144793 "2008-08-04T04:59:01Z")

</div>

I have this: begin sage = Net::Telnet::new( ‘Host’ =\> sage\_unit, ‘Prompt’ =\> /\>/ ) rescue TimeoutError fail “Connection timed out, waiting to reconnect.” end It outputs the text but also it gives the links for…

---

## [How to access the object bound to form in partial?](https://www.ruby-forum.com/t/how-to-access-the-object-bound-to-form-in-partial/144853)

<div class="topic-metadata">

**Author:** [@ssk](https://www.ruby-forum.com/u/ssk)\
**Replies:** 5\
**Last updated:** [August 4, 2008, 4:58am UTC](https://www.ruby-forum.com/t/how-to-access-the-object-bound-to-form-in-partial/144853 "2008-08-04T04:58:17Z")

</div>

Hi, In a partial, how do I access the ActiveRecord object that’s bound to a form? \<%= f.text\_field :name %\> \<% if f.(something).new\_record? %\> … \<% end %\> I want to know if the object is new record or not. I can …

---

## [Action Association Caching](https://www.ruby-forum.com/t/action-association-caching/144862)

<div class="topic-metadata">

**Author:** [@stefan](https://www.ruby-forum.com/u/stefan)\
**Replies:** 3\
**Last updated:** [August 4, 2008, 2:47am UTC](https://www.ruby-forum.com/t/action-association-caching/144862 "2008-08-04T02:47:22Z")

</div>

Hey again guys, I did come up with a problem few weeks ago and I still don’t have an elegant solution for it. I’d like to hear your opinions on how to deal with it, since it’s rather basic and could be quite common. I…

---

## [Acts\_as\_list problem](https://www.ruby-forum.com/t/acts-as-list-problem/144894)

<div class="topic-metadata">

**Author:** [@mostafa\_badawi](https://www.ruby-forum.com/u/mostafa_badawi)\
**Replies:** 0\
**Last updated:** [August 4, 2008, 2:25am UTC](https://www.ruby-forum.com/t/acts-as-list-problem/144894 "2008-08-04T02:25:50Z")

</div>

Hi all, I’m having this confusing acts\_as\_list problem: I have a Slideshow and Slide models, Slide acts as list in the scope of slideshow the first record in the slides db table is \<id : 1, position : 1 ,…\> an…

---

## [How do I build this form?](https://www.ruby-forum.com/t/how-do-i-build-this-form/144871)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 5\
**Last updated:** [August 4, 2008, 1:21am UTC](https://www.ruby-forum.com/t/how-do-i-build-this-form/144871 "2008-08-04T01:21:32Z")

</div>

Hi, I have a simple application. There is a form of items, in which a user can say I want the item or I do not. Then there is an orders table that records what items the user selected. The names of my tables are “…

---

## [Demo crashes](https://www.ruby-forum.com/t/demo-crashes/144888)

<div class="topic-metadata">

**Author:** [@random52k](https://www.ruby-forum.com/u/random52k)\
**Replies:** 0\
**Last updated:** [August 4, 2008, 12:32am UTC](https://www.ruby-forum.com/t/demo-crashes/144888 "2008-08-04T00:32:30Z")

</div>

When I develop a new application using “rails demo” then run “ruby script/server” WEBrick loads fine. I point my browser to http://localhost:3000. The Welcome aboard page loads fine. But when I click on “About your …

---

## [How to set a datetime to localtime?](https://www.ruby-forum.com/t/how-to-set-a-datetime-to-localtime/144887)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 0\
**Last updated:** [August 4, 2008, 12:04am UTC](https://www.ruby-forum.com/t/how-to-set-a-datetime-to-localtime/144887 "2008-08-04T00:04:22Z")

</div>

I would like to set the localtime, before validation. but if I write before\_validation :start\_timing def start\_timing s = self.starting\_at #params is 20008-10-31, no time self.starting\_at = Time.local(s.to\_date.yea…

---

## ["rake test" wipes my development database](https://www.ruby-forum.com/t/rake-test-wipes-my-development-database/144884)

<div class="topic-metadata">

**Author:** [@bitsmith](https://www.ruby-forum.com/u/bitsmith)\
**Replies:** 1\
**Last updated:** [August 3, 2008, 11:12pm UTC](https://www.ruby-forum.com/t/rake-test-wipes-my-development-database/144884 "2008-08-03T23:12:19Z")

</div>

When I run “rake test”, I see the following in my development.log: DROP TABLE users CREATE TABLE users etc Sure enough, when I check my development database, all the data is gone! But strangely, the test fixtures are…

---

## [RSS and Atom feed fetching](https://www.ruby-forum.com/t/rss-and-atom-feed-fetching/142049)

<div class="topic-metadata">

**Author:** [@rasmus](https://www.ruby-forum.com/u/rasmus)\
**Replies:** 1\
**Last updated:** [August 3, 2008, 10:58pm UTC](https://www.ruby-forum.com/t/rss-and-atom-feed-fetching/142049 "2008-08-03T22:58:16Z")

</div>

Hi! Which feed fetching library should I use? I need support for feedburner:origLink, , multiple elements, all RSS dialects and so on… The parser should return a data structure that is independent of the feed forma…

---

## [Rspc & stubbing out chained methods](https://www.ruby-forum.com/t/rspc-stubbing-out-chained-methods/144814)

<div class="topic-metadata">

**Author:** [@ratcheer](https://www.ruby-forum.com/u/ratcheer)\
**Replies:** 2\
**Last updated:** [August 3, 2008, 10:05pm UTC](https://www.ruby-forum.com/t/rspc-stubbing-out-chained-methods/144814 "2008-08-03T22:05:34Z")

</div>

I’ve just started reading up on Rspec and am trying to write a few specs to test methods in my models. Consider the following class Users has\_many :items def state\_of\_last\_item? case items.active.last.state #uses …

---

## [User accounts and admin accounts, best practices?](https://www.ruby-forum.com/t/user-accounts-and-admin-accounts-best-practices/144861)

<div class="topic-metadata">

**Author:** [@perezda](https://www.ruby-forum.com/u/perezda)\
**Replies:** 4\
**Last updated:** [August 3, 2008, 9:34pm UTC](https://www.ruby-forum.com/t/user-accounts-and-admin-accounts-best-practices/144861 "2008-08-03T21:34:34Z")

</div>

Hello, what are some techniques people are using to keep user accounts and admin accounts separate? Meaning, I am going to create a paid service website and I am going to have general users (free accounts) premium m…

---

## [Mongrel and Apache](https://www.ruby-forum.com/t/mongrel-and-apache/144870)

<div class="topic-metadata">

**Author:** [@geolev](https://www.ruby-forum.com/u/geolev)\
**Replies:** 2\
**Last updated:** [August 3, 2008, 9:07pm UTC](https://www.ruby-forum.com/t/mongrel-and-apache/144870 "2008-08-03T21:07:02Z")

</div>

Can someone tell me if Mongrel and Apache can coexist on the same VPS? Thanks, geolev

---

## [Weird query on development log](https://www.ruby-forum.com/t/weird-query-on-development-log/144854)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 3\
**Last updated:** [August 3, 2008, 8:59pm UTC](https://www.ruby-forum.com/t/weird-query-on-development-log/144854 "2008-08-03T20:59:59Z")

</div>

Hi I have the following query which looks for events which are private and public. I want to show first till what point the development log shows the query as it should be: \[code=\] @events = Event.paginate(:all, :i…

---

## [How to install activescaffold from .ZIP file?](https://www.ruby-forum.com/t/how-to-install-activescaffold-from-zip-file/111452)

<div class="topic-metadata">

**Author:** [@demoversion](https://www.ruby-forum.com/u/demoversion)\
**Replies:** 8\
**Last updated:** [August 3, 2008, 7:15pm UTC](https://www.ruby-forum.com/t/how-to-install-activescaffold-from-zip-file/111452 "2008-08-03T19:15:30Z")

</div>

Hello, please tell me how to install active scaffold from zip file, that i downloaded from activescaffold.com? Tnx

---

## [ActiveRecord DateTime type search range](https://www.ruby-forum.com/t/activerecord-datetime-type-search-range/144834)

<div class="topic-metadata">

**Author:** [@morgan](https://www.ruby-forum.com/u/morgan)\
**Replies:** 2\
**Last updated:** [August 3, 2008, 6:58pm UTC](https://www.ruby-forum.com/t/activerecord-datetime-type-search-range/144834 "2008-08-03T18:58:14Z")

</div>

i have a table full of entries that each have a datetime field with a date and timestamp… how would i use activerecord to get all entries from say 2008-08-12 12:00:00 to 2009-08-12 12:00:00… i’ve tried searching the…

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

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