# Rails

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

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

---

## [Rails 2 route oddity](https://www.ruby-forum.com/t/rails-2-route-oddity/125178)

<div class="topic-metadata">

**Author:** [@rubynuby](https://www.ruby-forum.com/u/rubynuby)\
**Replies:** 8\
**Last updated:** [January 15, 2008, 4:58am UTC](https://www.ruby-forum.com/t/rails-2-route-oddity/125178 "2008-01-15T04:58:22Z")

</div>

I have this in my routes.db map.connect ‘posts/tags/:id/:chain’, :requirements =\> { :controller =\> ‘posts’, :action =\> ‘tags’, :chain =\> /chain/ }, :chain =\> nil given this path /posts/tags/onion+funny/chain param…

---

## [Inserting(adding) images into pdf](https://www.ruby-forum.com/t/inserting-adding-images-into-pdf/126063)

<div class="topic-metadata">

**Author:** [@sreekar](https://www.ruby-forum.com/u/sreekar)\
**Replies:** 0\
**Last updated:** [January 15, 2008, 4:49am UTC](https://www.ruby-forum.com/t/inserting-adding-images-into-pdf/126063 "2008-01-15T04:49:45Z")

</div>

Hi Is there any way to insert images into pdf through ror. I have tried pdf:writer and used pd.image.Still I am not getting the result. It is said that images are not supported by the pdfwriter.rb file I am using. E…

---

## [Using saved object in same controller](https://www.ruby-forum.com/t/using-saved-object-in-same-controller/126057)

<div class="topic-metadata">

**Author:** [@gustav](https://www.ruby-forum.com/u/gustav)\
**Replies:** 2\
**Last updated:** [January 15, 2008, 4:14am UTC](https://www.ruby-forum.com/t/using-saved-object-in-same-controller/126057 "2008-01-15T04:14:32Z")

</div>

Hi, I’m having a bit of an IF-statement-problem that produces a NoMethodError if it’s included in my method, although there is a corresponding column in my table. What I want to do is check if an record exists, or els…

---

## [Errors.add\_to\_base not actually adding any errors to base?](https://www.ruby-forum.com/t/errors-add-to-base-not-actually-adding-any-errors-to-base/126044)

<div class="topic-metadata">

**Author:** [@jeffct](https://www.ruby-forum.com/u/jeffct)\
**Replies:** 1\
**Last updated:** [January 15, 2008, 4:10am UTC](https://www.ruby-forum.com/t/errors-add-to-base-not-actually-adding-any-errors-to-base/126044 "2008-01-15T04:10:27Z")

</div>

I checked the API docs and found nothing about add\_to\_base gotchas… but when adding an error to the base of an ActiveRecord object, it essentially does nothing. The save/valid? methods work as if there were no errors,…

---

## [Class constants](https://www.ruby-forum.com/t/class-constants/126030)

<div class="topic-metadata">

**Author:** [@destiney](https://www.ruby-forum.com/u/destiney)\
**Replies:** 7\
**Last updated:** [January 15, 2008, 2:46am UTC](https://www.ruby-forum.com/t/class-constants/126030 "2008-01-15T02:46:50Z")

</div>

If I have: @name = ‘users’ And I want to do @name.singularize.camelize.constantize.find(1) It seems I cannot do so unless the constant User is already present in ObjectSpace. Is there a dynamic way around this? I’…

---

## [\[ANN\] BuildingWebApps.com, new resource site for Rail developers](https://www.ruby-forum.com/t/ann-buildingwebapps-com-new-resource-site-for-rail-developers/126029)

<div class="topic-metadata">

**Author:** [@wickie](https://www.ruby-forum.com/u/wickie)\
**Replies:** 2\
**Last updated:** [January 14, 2008, 11:26pm UTC](https://www.ruby-forum.com/t/ann-buildingwebapps-com-new-resource-site-for-rail-developers/126029 "2008-01-14T23:26:54Z")

</div>

My partner Christopher Haupt and I have been working for several months on a new resource site for Ruby on Rails developers, www.BuildingWebApps.com. This is still very much a work in progress, but we’ve gone ahead an…

---

## [Segfaults with 2.0.2 and named routes](https://www.ruby-forum.com/t/segfaults-with-2-0-2-and-named-routes/126039)

<div class="topic-metadata">

**Author:** [@snacktime](https://www.ruby-forum.com/u/snacktime)\
**Replies:** 0\
**Last updated:** [January 14, 2008, 11:04pm UTC](https://www.ruby-forum.com/t/segfaults-with-2-0-2-and-named-routes/126039 "2008-01-14T23:04:02Z")

</div>

This is a really strange one. Latest ruby stable, rails 2.0.2, debian sid. About a dozen plugins installed which makes it more difficult to track down… In routes.rb I have the following: map.resources :profiles, :c…

---

## [Restful authentication - administrative users?](https://www.ruby-forum.com/t/restful-authentication-administrative-users/126037)

<div class="topic-metadata">

**Author:** [@jimmypalmer](https://www.ruby-forum.com/u/jimmypalmer)\
**Replies:** 1\
**Last updated:** [January 14, 2008, 11:02pm UTC](https://www.ruby-forum.com/t/restful-authentication-administrative-users/126037 "2008-01-14T23:02:51Z")

</div>

I’m using restful authentication to do my user management, but I also need an administrative user. Some would just use an admin\_fl to distinguish between normal users and admin users, but I wonder if this is a good p…

---

## [Controoler/View problem](https://www.ruby-forum.com/t/controoler-view-problem/126038)

<div class="topic-metadata">

**Author:** [@darth\_timeus](https://www.ruby-forum.com/u/darth_timeus)\
**Replies:** 0\
**Last updated:** [January 14, 2008, 11:02pm UTC](https://www.ruby-forum.com/t/controoler-view-problem/126038 "2008-01-14T23:02:51Z")

</div>

Hi i’m new with ruby on rails. And i’m trying to build an application with an authentication method, I’m using the Recipe from the book “Rails Recipes”. The thing is that i wrote the procedure inside the Login control…

---

## [Select](https://www.ruby-forum.com/t/select/125788)

<div class="topic-metadata">

**Author:** [@rnew](https://www.ruby-forum.com/u/rnew)\
**Replies:** 2\
**Last updated:** [January 14, 2008, 10:51pm UTC](https://www.ruby-forum.com/t/select/125788 "2008-01-14T22:51:07Z")

</div>

I’m trying to work through a simple tutorial on rails The tutorial calls for adding the following: \<%= select (“cruncher”, “”, {‘red’ =\> ‘red’, ‘green’ =\> ‘green’, ‘blue’ =\> ‘blue’}, {}, {:multiple =\> true, :size =\> 3…

---

## [CSRF protection](https://www.ruby-forum.com/t/csrf-protection/125938)

<div class="topic-metadata">

**Author:** [@robin](https://www.ruby-forum.com/u/robin)\
**Replies:** 3\
**Last updated:** [January 14, 2008, 10:49pm UTC](https://www.ruby-forum.com/t/csrf-protection/125938 "2008-01-14T22:49:57Z")

</div>

I am uncertain that the auth\_token provides any real protection against CSRF. At best, the auth\_token protects against a blind POST, but it does not provide security because an attack can get a valid auth\_token with a …

---

## [Advanced Rails Recipes](https://www.ruby-forum.com/t/advanced-rails-recipes/126018)

<div class="topic-metadata">

**Author:** [@liberte](https://www.ruby-forum.com/u/liberte)\
**Replies:** 1\
**Last updated:** [January 14, 2008, 10:42pm UTC](https://www.ruby-forum.com/t/advanced-rails-recipes/126018 "2008-01-14T22:42:21Z")

</div>

Hello… i wan’t know if anyone has bought advanced rails recipes, the first book i don’t like but this had some good recipe i think can be usefull. The recipes about rest and upload are cool? Upload recipe use some plu…

---

## [Displaying filtered data in a list - what is the right way?](https://www.ruby-forum.com/t/displaying-filtered-data-in-a-list-what-is-the-right-way/196572)

<div class="topic-metadata">

**Author:** [@macfizz](https://www.ruby-forum.com/u/macfizz)\
**Replies:** 0\
**Last updated:** [January 14, 2008, 10:25pm UTC](https://www.ruby-forum.com/t/displaying-filtered-data-in-a-list-what-is-the-right-way/196572 "2008-01-14T22:25:51Z")

</div>

Hi all, I’d appreciate some guidance in the right way to filter the data displayed in a list. I have two models, school and centre (centre belongs\_to school and school has\_many centres). In the list action for centre…

---

## [1.8.6 or 2.0?](https://www.ruby-forum.com/t/1-8-6-or-2-0/125098)

<div class="topic-metadata">

**Author:** [@Bensoussan\_M](https://www.ruby-forum.com/u/Bensoussan_M)\
**Replies:** 4\
**Last updated:** [January 14, 2008, 10:18pm UTC](https://www.ruby-forum.com/t/1-8-6-or-2-0/125098 "2008-01-14T22:18:44Z")

</div>

Hi we are actually beginning a two-years project which will be developped in rails. Our developers dont know rails, they are learning it, but do you think its a better idea to begin with the 1.8.6 (with a lot of help…

---

## [How do I add autoincrement?](https://www.ruby-forum.com/t/how-do-i-add-autoincrement/126031)

<div class="topic-metadata">

**Author:** [@jbwood](https://www.ruby-forum.com/u/jbwood)\
**Replies:** 1\
**Last updated:** [January 14, 2008, 10:12pm UTC](https://www.ruby-forum.com/t/how-do-i-add-autoincrement/126031 "2008-01-14T22:12:14Z")

</div>

Hello, I am attempting to learn Ruby on Rails. I'm using Instant Rails 2.0 on a Windows computer. I really want the id number to autoincrement, but I am not sure how to do that. The script that’s generated after …

---

## [To get top users?](https://www.ruby-forum.com/t/to-get-top-users/126032)

<div class="topic-metadata">

**Author:** [@vapor](https://www.ruby-forum.com/u/vapor)\
**Replies:** 0\
**Last updated:** [January 14, 2008, 10:11pm UTC](https://www.ruby-forum.com/t/to-get-top-users/126032 "2008-01-14T22:11:31Z")

</div>

user model… has\_many: posts post model… belongs\_to: user I want to get 3 top users that created maximum number of entries today. How do I get that? Thanks

---

## [Letting users print a portion of a view](https://www.ruby-forum.com/t/letting-users-print-a-portion-of-a-view/124956)

<div class="topic-metadata">

**Author:** [@tomn](https://www.ruby-forum.com/u/tomn)\
**Replies:** 4\
**Last updated:** [January 14, 2008, 9:55pm UTC](https://www.ruby-forum.com/t/letting-users-print-a-portion-of-a-view/124956 "2008-01-14T21:55:11Z")

</div>

Any good tips on having a section of a view made printable in a cross browser manner? I’ll have a table with data and formating (data-dependent background colors, tiny images before and after text data in cells) which…

---

## [Woo Hoo! First Rails App Goes Live!](https://www.ruby-forum.com/t/woo-hoo-first-rails-app-goes-live/126024)

<div class="topic-metadata">

**Author:** [@melvinram](https://www.ruby-forum.com/u/melvinram)\
**Replies:** 5\
**Last updated:** [January 14, 2008, 9:40pm UTC](https://www.ruby-forum.com/t/woo-hoo-first-rails-app-goes-live/126024 "2008-01-14T21:40:31Z")

</div>

http://www.savitrifashions.com Hey guys, I just wanted to thank you all for your help. I just put the final features of v1.0 of my very first rails application. It’s an ecommerce- type site without the shopping cart …

---

## [Multiple habtm-join between tables](https://www.ruby-forum.com/t/multiple-habtm-join-between-tables/125782)

<div class="topic-metadata">

**Author:** [@kaeptnhaddock](https://www.ruby-forum.com/u/kaeptnhaddock)\
**Replies:** 4\
**Last updated:** [January 14, 2008, 9:14pm UTC](https://www.ruby-forum.com/t/multiple-habtm-join-between-tables/125782 "2008-01-14T21:14:25Z")

</div>

I have a table with institutions and a table with projects with I would like to join twice with a habtm-relation. \*\*\*Model institution has\_and\_belongs\_to\_many :projects, :join\_table =\> “customerinstitutions” \*\*\*Mode…

---

## [Php proxy exists?](https://www.ruby-forum.com/t/php-proxy-exists/125846)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 6\
**Last updated:** [January 14, 2008, 9:09pm UTC](https://www.ruby-forum.com/t/php-proxy-exists/125846 "2008-01-14T21:09:06Z")

</div>

Wondering if anyone’s heard of a php script that will ‘forward’ your requests on to, say, a mongrel instance, and return it? Kind of a php fcgi? Thoughts? Thanks. -Roger

---

## [Customizing belongs\_to method](https://www.ruby-forum.com/t/customizing-belongs-to-method/125996)

<div class="topic-metadata">

**Author:** [@damaris](https://www.ruby-forum.com/u/damaris)\
**Replies:** 1\
**Last updated:** [January 14, 2008, 9:04pm UTC](https://www.ruby-forum.com/t/customizing-belongs-to-method/125996 "2008-01-14T21:04:20Z")

</div>

Hi you all, I’m working with a legacy database that has: User: id: primary key. dirip: IP address. Bugs: … -dirip: IP address (foreign key referring to User) A user can have generated many bugs, and a bug belongs…

---

## [Problems with versions of rails](https://www.ruby-forum.com/t/problems-with-versions-of-rails/126003)

<div class="topic-metadata">

**Author:** [@lyon](https://www.ruby-forum.com/u/lyon)\
**Replies:** 1\
**Last updated:** [January 14, 2008, 8:26pm UTC](https://www.ruby-forum.com/t/problems-with-versions-of-rails/126003 "2008-01-14T20:26:05Z")

</div>

hello everybody. i have a problem i beggin in ruby on rails 1 year ago and i programed an aplication with the next versions… ruby: 1.8.2 rails 1.1.2 and everithing works very good. but yesterday i tryed to install…

---

## [Ajax, url, browser history](https://www.ruby-forum.com/t/ajax-url-browser-history/126023)

<div class="topic-metadata">

**Author:** [@rubynuby](https://www.ruby-forum.com/u/rubynuby)\
**Replies:** 0\
**Last updated:** [January 14, 2008, 8:06pm UTC](https://www.ruby-forum.com/t/ajax-url-browser-history/126023 "2008-01-14T20:06:32Z")

</div>

I got it into my head that pagination can use ajax calls so I can update the relevant portion of the page without reloading the entire thing ‘.pagination a:click’: function() { new Ajax.Request(this.href, { asynchron…

---

## [Will\_paginate skipping a few](https://www.ruby-forum.com/t/will-paginate-skipping-a-few/125959)

<div class="topic-metadata">

**Author:** [@melvinram](https://www.ruby-forum.com/u/melvinram)\
**Replies:** 1\
**Last updated:** [January 14, 2008, 8:05pm UTC](https://www.ruby-forum.com/t/will-paginate-skipping-a-few/125959 "2008-01-14T20:05:56Z")

</div>

http://www.savitrifashions.com/store/category/6?page=2 At the above page, I have a will\_paginate set up that will have 15 items per page as specified… but on some pages, it has less items (such as page 2 and page 3). …

---

## [Pagination caching](https://www.ruby-forum.com/t/pagination-caching/125818)

<div class="topic-metadata">

**Author:** [@luma](https://www.ruby-forum.com/u/luma)\
**Replies:** 8\
**Last updated:** [January 14, 2008, 7:03pm UTC](https://www.ruby-forum.com/t/pagination-caching/125818 "2008-01-14T19:03:11Z")

</div>

Hi I have the following method: def search products = Product.find(:all, :conditions =\> \[“category = ?”, params\[:category\]\], :limit =\> 1000, :order\_by =\> “float\_rating DESC”) @shown\_items = my\_pagination(products, {…

---

## [Considering Vlad for deployment with nginx](https://www.ruby-forum.com/t/considering-vlad-for-deployment-with-nginx/126017)

<div class="topic-metadata">

**Author:** [@roundabout](https://www.ruby-forum.com/u/roundabout)\
**Replies:** 0\
**Last updated:** [January 14, 2008, 6:48pm UTC](https://www.ruby-forum.com/t/considering-vlad-for-deployment-with-nginx/126017 "2008-01-14T18:48:23Z")

</div>

Considering Vlad for deployment instead of Capistrano. Anyone had success stories or nginx recipes to share? Anything special required, e.g. setting up mongrel processes differently? Cheers, Victor

---

## [Php proxy](https://www.ruby-forum.com/t/php-proxy/126014)

<div class="topic-metadata">

**Author:** [@rogerdpack](https://www.ruby-forum.com/u/rogerdpack)\
**Replies:** 2\
**Last updated:** [January 14, 2008, 6:26pm UTC](https://www.ruby-forum.com/t/php-proxy/126014 "2008-01-14T18:26:59Z")

</div>

will repost this here: Wondering if anyone’s heard of a php script that will ‘forward’ your requests on to, say, a mongrel instance, and return it? Kind of a php fcgi (mongrel) wrapper? Thoughts? I’m trying to figu…

---

## [Mysql::Error: Lost connection to MySQL server during query: SELECT \* FROM sessions WHERE (session\_i](https://www.ruby-forum.com/t/mysql-lost-connection-to-mysql-server-during-query-select-from-sessions-where-session-i/126011)

<div class="topic-metadata">

**Author:** [@chanhuai](https://www.ruby-forum.com/u/chanhuai)\
**Replies:** 0\
**Last updated:** [January 14, 2008, 5:50pm UTC](https://www.ruby-forum.com/t/mysql-lost-connection-to-mysql-server-during-query-select-from-sessions-where-session-i/126011 "2008-01-14T17:50:31Z")

</div>

Hi i keep on getting this error when i try to GET one of the page in my website. any idea where went wrong. was it something wrong with the server? Mysql::Error: Lost connection to MySQL server during query: SELECT \* …

---

## [How is the future for rails?](https://www.ruby-forum.com/t/how-is-the-future-for-rails/125955)

<div class="topic-metadata">

**Author:** [@mokkai](https://www.ruby-forum.com/u/mokkai)\
**Replies:** 1\
**Last updated:** [January 14, 2008, 5:50pm UTC](https://www.ruby-forum.com/t/how-is-the-future-for-rails/125955 "2008-01-14T17:50:31Z")

</div>

how is the future for rails ? is it bight ?

---

## [Two dimensiona forms](https://www.ruby-forum.com/t/two-dimensiona-forms/125944)

<div class="topic-metadata">

**Author:** [@brianspaid](https://www.ruby-forum.com/u/brianspaid)\
**Replies:** 13\
**Last updated:** [January 14, 2008, 5:45pm UTC](https://www.ruby-forum.com/t/two-dimensiona-forms/125944 "2008-01-14T17:45:49Z")

</div>

How would you structure a two dimension form? I have projects along the horizontal axis and users along the vertical axis and then check boxes at the intersections. I have it structured in html, but I can’t figure out…

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

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