# Rails

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

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

---

## [Link\_to and link\_to\_remote](https://www.ruby-forum.com/t/link-to-and-link-to-remote/144345)

<div class="topic-metadata">

**Author:** [@jdrietz](https://www.ruby-forum.com/u/jdrietz)\
**Replies:** 0\
**Last updated:** [July 28, 2008, 9:56pm UTC](https://www.ruby-forum.com/t/link-to-and-link-to-remote/144345 "2008-07-28T21:56:31Z")

</div>

Hi First problem: onmouseover=“this.style.background-image=‘url(/images/test.jpg)’;” Not sure what I’m doing wrong here. Secondly, how does one specify css styles for link\_to\_remote. A:link, A:visited, and A:hover d…

---

## [Paginating](https://www.ruby-forum.com/t/paginating/144342)

<div class="topic-metadata">

**Author:** [@jdrietz](https://www.ruby-forum.com/u/jdrietz)\
**Replies:** 2\
**Last updated:** [July 28, 2008, 9:54pm UTC](https://www.ruby-forum.com/t/paginating/144342 "2008-07-28T21:54:46Z")

</div>

Hey, anybody know how to set will\_paginate to find only the :first match? def self.search(search, page) paginate :per\_page =\> 15, :page =\> page, :conditions =\> \[‘title like ?’, “%#{search}%”\], :order =\> ‘thread\_id …

---

## [Automating a ruby script](https://www.ruby-forum.com/t/automating-a-ruby-script/143944)

<div class="topic-metadata">

**Author:** [@Blakes](https://www.ruby-forum.com/u/Blakes)\
**Replies:** 2\
**Last updated:** [July 28, 2008, 9:27pm UTC](https://www.ruby-forum.com/t/automating-a-ruby-script/143944 "2008-07-28T21:27:55Z")

</div>

I have been working on an application that takes a text file and parses information from it. I have the script in my script folder, and can run it if I enter ‘script/parser file.txt’. I am using the ‘attachment\_fu’ …

---

## [Problem with built-in named scope all](https://www.ruby-forum.com/t/problem-with-built-in-named-scope-all/144330)

<div class="topic-metadata">

**Author:** [@cah4i](https://www.ruby-forum.com/u/cah4i)\
**Replies:** 1\
**Last updated:** [July 28, 2008, 9:27pm UTC](https://www.ruby-forum.com/t/problem-with-built-in-named-scope-all/144330 "2008-07-28T21:27:55Z")

</div>

Hello, I’m having a problem with the built-in all scope. For example in my Subscription model, Subscription.all.count NoMethodError: undefined method \`count’ for #Array:0xb5dce7f8 from (irb):46 from :0 Howeve…

---

## [Auto-complete speed](https://www.ruby-forum.com/t/auto-complete-speed/144118)

<div class="topic-metadata">

**Author:** [@pepe](https://www.ruby-forum.com/u/pepe)\
**Replies:** 13\
**Last updated:** [July 28, 2008, 9:13pm UTC](https://www.ruby-forum.com/t/auto-complete-speed/144118 "2008-07-28T21:13:52Z")

</div>

Hello. I have created my first auto-complete fields (text\_field\_with\_auto\_complete) and I find the feature a little slow. It takes about a second to see the values pop up on screen. I have tried to play with the :fre…

---

## [Text\_area value](https://www.ruby-forum.com/t/text-area-value/144339)

<div class="topic-metadata">

**Author:** [@jdrietz](https://www.ruby-forum.com/u/jdrietz)\
**Replies:** 0\
**Last updated:** [July 28, 2008, 8:16pm UTC](https://www.ruby-forum.com/t/text-area-value/144339 "2008-07-28T20:16:29Z")

</div>

Hey, I have existing threads with two fields: title and text. When a user clicks “edit”, I say, in the new thread form: \<% form.text\_area :text, :value =\> params\[:text\] %\> params\[:text\] = the text in the thread which…

---

## [How to Observe a Habtm relationship?](https://www.ruby-forum.com/t/how-to-observe-a-habtm-relationship/144328)

<div class="topic-metadata">

**Author:** [@Phlip](https://www.ruby-forum.com/u/Phlip)\
**Replies:** 3\
**Last updated:** [July 28, 2008, 8:10pm UTC](https://www.ruby-forum.com/t/how-to-observe-a-habtm-relationship/144328 "2008-07-28T20:10:02Z")

</div>

Railsters: ActiveRecord::Observer is a cute little class that lets you bundle groups of after\_create and before\_update calls together. Don’t call us we’ll call you. How can it observe a has\_and\_belongs\_to\_many relat…

---

## [Cannot register a new user](https://www.ruby-forum.com/t/cannot-register-a-new-user/144324)

<div class="topic-metadata">

**Author:** [@invincibledevil](https://www.ruby-forum.com/u/invincibledevil)\
**Replies:** 5\
**Last updated:** [July 28, 2008, 7:24pm UTC](https://www.ruby-forum.com/t/cannot-register-a-new-user/144324 "2008-07-28T19:24:55Z")

</div>

Hello… I wanted to extend my webpage’s user interaction by allowing users to register themselves. The account controller method “register” takes care of the process. This is the register.rhtml code i wrote in apps/vie…

---

## [:path\_prefix on resources not passing to actions?](https://www.ruby-forum.com/t/path-prefix-on-resources-not-passing-to-actions/144290)

<div class="topic-metadata">

**Author:** [@phil](https://www.ruby-forum.com/u/phil)\
**Replies:** 8\
**Last updated:** [July 28, 2008, 6:09pm UTC](https://www.ruby-forum.com/t/path-prefix-on-resources-not-passing-to-actions/144290 "2008-07-28T18:09:20Z")

</div>

I am experiencing some difficulties using :path\_prefix on resources. I do the following $ rails pathtest $ cd pathtest $ script/generate scaffold thing title:string $ rake db:migrate Then in routes.rb I change: ma…

---

## ["deprecated" error message in apache error log](https://www.ruby-forum.com/t/deprecated-error-message-in-apache-error-log/144321)

<div class="topic-metadata">

**Author:** [@pedz](https://www.ruby-forum.com/u/pedz)\
**Replies:** 0\
**Last updated:** [July 28, 2008, 5:41pm UTC](https://www.ruby-forum.com/t/deprecated-error-message-in-apache-error-log/144321 "2008-07-28T17:41:38Z")

</div>

I am seeing the “warning: Object#id will be deprecated; use Object#object\_id” message coming from ActionController in my apache error log. I do not see it anywhere else – neither the production nor development rails …

---

## [Introduction to Ruby](https://www.ruby-forum.com/t/introduction-to-ruby/144295)

<div class="topic-metadata">

**Author:** [@Rajat\_Gupta](https://www.ruby-forum.com/u/Rajat_Gupta)\
**Replies:** 2\
**Last updated:** [July 28, 2008, 5:07pm UTC](https://www.ruby-forum.com/t/introduction-to-ruby/144295 "2008-07-28T17:07:10Z")

</div>

Hi Everybody, I am novice at Ruby and definitely not a programmer. Basically a sales guy, i am with this web 2.0 company which is into Drupal and RoR web development. I think RoR is fantastic because of reasons purel…

---

## [Navbar: what's the "Rails Way"?](https://www.ruby-forum.com/t/navbar-whats-the-rails-way/144263)

<div class="topic-metadata">

**Author:** [@unknown](https://www.ruby-forum.com/u/unknown)\
**Replies:** 3\
**Last updated:** [July 28, 2008, 4:54pm UTC](https://www.ruby-forum.com/t/navbar-whats-the-rails-way/144263 "2008-07-28T16:54:53Z")

</div>

Hi all. I’ve the following navbar on my site: \<divÂ id=“nav”\> Â Â Â Â Â Â Â Â Â Â Â Â \<%= link\_to “Home”, home\_url %\> Â Â Â Â Â Â Â Â \<%= link\_to “Link 1”, link1\_url %\> Â Â Â Â Â Â …

---

## [OT: Failing site map](https://www.ruby-forum.com/t/ot-failing-site-map/144282)

<div class="topic-metadata">

**Author:** [@chrisolsen](https://www.ruby-forum.com/u/chrisolsen)\
**Replies:** 1\
**Last updated:** [July 28, 2008, 4:38pm UTC](https://www.ruby-forum.com/t/ot-failing-site-map/144282 "2008-07-28T16:38:34Z")

</div>

For some reason google keeps telling me there is something wrong with my sitemap. After reading the specs over and over of what is required I can’t find what is the problem. Here is the sitemap index file ie contains …

---

## [STI: is it possible to map STI resource?](https://www.ruby-forum.com/t/sti-is-it-possible-to-map-sti-resource/144315)

<div class="topic-metadata">

**Author:** [@gianluca\_t](https://www.ruby-forum.com/u/gianluca_t)\
**Replies:** 0\
**Last updated:** [July 28, 2008, 4:28pm UTC](https://www.ruby-forum.com/t/sti-is-it-possible-to-map-sti-resource/144315 "2008-07-28T16:28:30Z")

</div>

Hi to all, someone can tell me if are there some ways to map STI model into a resource map ? (restful) I cannot figure out how to implement a single controller/views to handle STI resources… Ex.: Model : Category =\>…

---

## [A Very huge list of Ruby, Rails, IronRuby Books](https://www.ruby-forum.com/t/a-very-huge-list-of-ruby-rails-ironruby-books/144279)

<div class="topic-metadata">

**Author:** [@webreservoir](https://www.ruby-forum.com/u/webreservoir)\
**Replies:** 2\
**Last updated:** [July 28, 2008, 4:13pm UTC](https://www.ruby-forum.com/t/a-very-huge-list-of-ruby-rails-ironruby-books/144279 "2008-07-28T16:13:17Z")

</div>

A Very huge list of Ruby, Rails, IronRuby Books arriving in 2008/2009. Have a look at this blog by RubyWorld. Its worth to bookmark this. Hope this would help many students here Thanks

---

## [Time zone problem](https://www.ruby-forum.com/t/time-zone-problem/144314)

<div class="topic-metadata">

**Author:** [@dark-omen](https://www.ruby-forum.com/u/dark-omen)\
**Replies:** 0\
**Last updated:** [July 28, 2008, 3:52pm UTC](https://www.ruby-forum.com/t/time-zone-problem/144314 "2008-07-28T15:52:28Z")

</div>

I am having problems with time zones. For some reason it adds 4 hours onto anytime. And a weird thing is that it sets the timestamped created columns correctly and a datetime column incorrectly. Now if I set the time …

---

## [Help with apache, mysql and rails](https://www.ruby-forum.com/t/help-with-apache-mysql-and-rails/144313)

<div class="topic-metadata">

**Author:** [@pipex](https://www.ruby-forum.com/u/pipex)\
**Replies:** 1\
**Last updated:** [July 28, 2008, 3:49pm UTC](https://www.ruby-forum.com/t/help-with-apache-mysql-and-rails/144313 "2008-07-28T15:49:48Z")

</div>

I have an application running on my pc, localhost but now i have to get it running in a production environment throw the apache server of my office and its database i dont know how to do this please help there also a…

---

## [Mini CMS](https://www.ruby-forum.com/t/mini-cms/144312)

<div class="topic-metadata">

**Author:** [@messismore](https://www.ruby-forum.com/u/messismore)\
**Replies:** 0\
**Last updated:** [July 28, 2008, 3:17pm UTC](https://www.ruby-forum.com/t/mini-cms/144312 "2008-07-28T15:17:22Z")

</div>

Hi, I’m wanting to build a mini CMS in RoR and have got to grips with the terminology, can link up to databases etc. I have 3 pages, Home, About and Portfolio and want these to have an admin area where I can let peop…

---

## [Data redundancy or not?](https://www.ruby-forum.com/t/data-redundancy-or-not/144308)

<div class="topic-metadata">

**Author:** [@remcoh](https://www.ruby-forum.com/u/remcoh)\
**Replies:** 0\
**Last updated:** [July 28, 2008, 3:03pm UTC](https://www.ruby-forum.com/t/data-redundancy-or-not/144308 "2008-07-28T15:03:34Z")

</div>

Hi, perhaps a bit off topic but i realy want to know what you rails people think of the following situation: i am building a shift trading application, so i have a table with shifts and a table with transactions. in…

---

## [Need to change attr-value when model is loaded](https://www.ruby-forum.com/t/need-to-change-attr-value-when-model-is-loaded/144293)

<div class="topic-metadata">

**Author:** [@jeanluca](https://www.ruby-forum.com/u/jeanluca)\
**Replies:** 3\
**Last updated:** [July 28, 2008, 2:19pm UTC](https://www.ruby-forum.com/t/need-to-change-attr-value-when-model-is-loaded/144293 "2008-07-28T14:19:57Z")

</div>

He All I have a situation in which I store all prices excl VAT. Now, this module needs to have the price incl VAT. How do I do this, for example, in the controllers I do something like my\_model = Xyz.find(:first) … …

---

## [Does ruby-prof actually work?](https://www.ruby-forum.com/t/does-ruby-prof-actually-work/143437)

<div class="topic-metadata">

**Author:** [@phil](https://www.ruby-forum.com/u/phil)\
**Replies:** 8\
**Last updated:** [July 28, 2008, 2:15pm UTC](https://www.ruby-forum.com/t/does-ruby-prof-actually-work/143437 "2008-07-28T14:15:58Z")

</div>

I am running rails 2.1 and cannot get ruby-prof, or more acurately, the script/performance/request to work. Installing ruby-prof I get this: sudo gem install ruby-prof Building native extensions. This could take a w…

---

## [REST and extra actions](https://www.ruby-forum.com/t/rest-and-extra-actions/144258)

<div class="topic-metadata">

**Author:** [@roa](https://www.ruby-forum.com/u/roa)\
**Replies:** 3\
**Last updated:** [July 28, 2008, 1:09pm UTC](https://www.ruby-forum.com/t/rest-and-extra-actions/144258 "2008-07-28T13:09:37Z")

</div>

Hi, I’m trying to implement some charts in my REST application. But I can’t seem to use an extra action like “chart” in my controller. Becouse of the rest approach, it sees the action name as an id. Does anyone know …

---

## [Issues with config.gem](https://www.ruby-forum.com/t/issues-with-config-gem/144297)

<div class="topic-metadata">

**Author:** [@camerony](https://www.ruby-forum.com/u/camerony)\
**Replies:** 0\
**Last updated:** [July 28, 2008, 1:03pm UTC](https://www.ruby-forum.com/t/issues-with-config-gem/144297 "2008-07-28T13:03:45Z")

</div>

Hi all, I’m using Rails and Engines 2.1.0 and ran into a problem while setting up some config.gem dependencies. From my test.rb environment Gems specifically required for testing config.gem ‘rspec’, :lib =\> …

---

## [Authentication](https://www.ruby-forum.com/t/authentication/144286)

<div class="topic-metadata">

**Author:** [@bishal](https://www.ruby-forum.com/u/bishal)\
**Replies:** 1\
**Last updated:** [July 28, 2008, 1:02pm UTC](https://www.ruby-forum.com/t/authentication/144286 "2008-07-28T13:02:34Z")

</div>

can somebody explain how the toke based authentication works over HTTP ? I need its implementation in REST.

---

## [Named routes in admin namespace](https://www.ruby-forum.com/t/named-routes-in-admin-namespace/143842)

<div class="topic-metadata">

**Author:** [@giorgio](https://www.ruby-forum.com/u/giorgio)\
**Replies:** 3\
**Last updated:** [July 28, 2008, 12:03pm UTC](https://www.ruby-forum.com/t/named-routes-in-admin-namespace/143842 "2008-07-28T12:03:23Z")

</div>

Hi, I have a controller Admin::Categories in folder controllers/admin I have a views/admin/categories/index.html.erb which contains: \<%= link\_to ‘New category’, new\_category\_path %\> now if my routes.rb contains: map…

---

## [Dhtml\_calendar Plugin and dates](https://www.ruby-forum.com/t/dhtml-calendar-plugin-and-dates/144261)

<div class="topic-metadata">

**Author:** [@thor](https://www.ruby-forum.com/u/thor)\
**Replies:** 1\
**Last updated:** [July 28, 2008, 10:43am UTC](https://www.ruby-forum.com/t/dhtml-calendar-plugin-and-dates/144261 "2008-07-28T10:43:47Z")

</div>

Man I am frustrated. 4 hours working on this and i can’t find an answer. Here it goes. I had some simple date select fields on a form. Then I wanted to add some additional datetime fields on a form with a nice widg…

---

## [Timed\_fragment\_cache always expires](https://www.ruby-forum.com/t/timed-fragment-cache-always-expires/105850)

<div class="topic-metadata">

**Author:** [@tuktuk](https://www.ruby-forum.com/u/tuktuk)\
**Replies:** 8\
**Last updated:** [July 28, 2008, 10:35am UTC](https://www.ruby-forum.com/t/timed-fragment-cache-always-expires/105850 "2008-07-28T10:35:52Z")

</div>

I have downloaded the latest version of the plugin timed\_fragment\_cache. Which makes timed cache expiration possible in the filesystem. My first experiment was this: In my controller I have the following code: when\_f…

---

## [Display image problem](https://www.ruby-forum.com/t/display-image-problem/144184)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 2\
**Last updated:** [July 28, 2008, 10:16am UTC](https://www.ruby-forum.com/t/display-image-problem/144184 "2008-07-28T10:16:04Z")

</div>

Hi I have to read a logo from DB and set in each page…I ahve a table named company with a BLOB field company\_logo So i wrote application controller code like after\_filter :logo\_set, :except =\> \[:login,:process\_login…

---

## [No route found to match "/cookbook/recipe/list" with {:metho](https://www.ruby-forum.com/t/no-route-found-to-match-cookbook-recipe-list-with-metho/89212)

<div class="topic-metadata">

**Author:** [@VolteFace](https://www.ruby-forum.com/u/VolteFace)\
**Replies:** 8\
**Last updated:** [July 28, 2008, 9:33am UTC](https://www.ruby-forum.com/t/no-route-found-to-match-cookbook-recipe-list-with-metho/89212 "2008-07-28T09:33:42Z")

</div>

Hi, I ve just spent about three hours trying to figure this out, so any help would be appreciated. I ve followed these steps: Downloaded Instant Rails Unzipped it Ran “InstantRails.exe” to configure it. (path is c:\\…

---

## [How to render a template in a popup window from a controller action?](https://www.ruby-forum.com/t/how-to-render-a-template-in-a-popup-window-from-a-controller-action/144285)

<div class="topic-metadata">

**Author:** [@athem](https://www.ruby-forum.com/u/athem)\
**Replies:** 0\
**Last updated:** [July 28, 2008, 8:39am UTC](https://www.ruby-forum.com/t/how-to-render-a-template-in-a-popup-window-from-a-controller-action/144285 "2008-07-28T08:39:09Z")

</div>

I’m trying to render a template in a popup window from a controller action. it would be equivalent to: \<%= link\_to ‘Manage Documents and Photos’, { :action =\> ‘manage\_photos\_documents\_popup’ }, :popup =\> \[ ‘Manage Ph…

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

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