# Rails

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

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

---

## [RE lookahead RE problems](https://www.ruby-forum.com/t/re-lookahead-re-problems/126242)

<div class="topic-metadata">

**Author:** [@antonaylward](https://www.ruby-forum.com/u/antonaylward)\
**Replies:** 8\
**Last updated:** [February 4, 2008, 3:49pm UTC](https://www.ruby-forum.com/t/re-lookahead-re-problems/126242 "2008-02-04T15:49:07Z")

</div>

I’ll start by confessing that this comes originally from something I worked on in Perl, and I’ve assumed, rightly or wrongly, that regular expressions are regular expressions are regular expressions. See http://www.i…

---

## [Mysql query, where members = 2, undefined field?](https://www.ruby-forum.com/t/mysql-query-where-members-2-undefined-field/127979)

<div class="topic-metadata">

**Author:** [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Replies:** 5\
**Last updated:** [February 4, 2008, 3:42pm UTC](https://www.ruby-forum.com/t/mysql-query-where-members-2-undefined-field/127979 "2008-02-04T15:42:54Z")

</div>

ok, now i know this isn’t a purely rails problem but if you could help me out that’d be great. coming from a SQL Server background switching over to mysql hasn’t been that much fuss but i’m getting problems with compu…

---

## [Transactional Services on RoR](https://www.ruby-forum.com/t/transactional-services-on-ror/128014)

<div class="topic-metadata">

**Author:** [@bcurtu](https://www.ruby-forum.com/u/bcurtu)\
**Replies:** 1\
**Last updated:** [February 4, 2008, 3:08pm UTC](https://www.ruby-forum.com/t/transactional-services-on-ror/128014 "2008-02-04T15:08:25Z")

</div>

Hi there, I’m pretty new in RoR. I have to deal with 2 different objects from the model, and to do some updates on them… How can I work in an transactional scope? I mean, if second fails, the first rolls back. Where…

---

## [Token\_tag not generated](https://www.ruby-forum.com/t/token-tag-not-generated/127981)

<div class="topic-metadata">

**Author:** [@andy](https://www.ruby-forum.com/u/andy)\
**Replies:** 1\
**Last updated:** [February 4, 2008, 2:51pm UTC](https://www.ruby-forum.com/t/token-tag-not-generated/127981 "2008-02-04T14:51:53Z")

</div>

I’m using Rails2.0.2 and I’d like to use against CSRF feature in my form. This form is generated from the controller using partial rendering. def commentform destination="" render :partial=\>‘forms/commentform’, :loca…

---

## [Copying attachment\_fu file uploads](https://www.ruby-forum.com/t/copying-attachment-fu-file-uploads/103759)

<div class="topic-metadata">

**Author:** [@rob](https://www.ruby-forum.com/u/rob)\
**Replies:** 8\
**Last updated:** [February 4, 2008, 2:09pm UTC](https://www.ruby-forum.com/t/copying-attachment-fu-file-uploads/103759 "2008-02-04T14:09:59Z")

</div>

I’m using attachment\_fu to provide file uploads/processing for a product class. I’d like to create a cloned version of a product with a copy of the initial versions image files. I don’t want the original version to …

---

## [Does Rails run on Windows?](https://www.ruby-forum.com/t/does-rails-run-on-windows/127997)

<div class="topic-metadata">

**Author:** [@hotmailuser](https://www.ruby-forum.com/u/hotmailuser)\
**Replies:** 3\
**Last updated:** [February 4, 2008, 1:58pm UTC](https://www.ruby-forum.com/t/does-rails-run-on-windows/127997 "2008-02-04T13:58:33Z")

</div>

Or do I have to wait for IronRuby? Thanks.

---

## [Database connection per model](https://www.ruby-forum.com/t/database-connection-per-model/127858)

<div class="topic-metadata">

**Author:** [@parki](https://www.ruby-forum.com/u/parki)\
**Replies:** 2\
**Last updated:** [February 4, 2008, 1:31pm UTC](https://www.ruby-forum.com/t/database-connection-per-model/127858 "2008-02-04T13:31:04Z")

</div>

I’ve built database authentication into my app, however once they’re authenticated all their actions are done under the default user account setup in database.yml. I would like to establish a database connection in e…

---

## [Rss Feeds](https://www.ruby-forum.com/t/rss-feeds/127128)

<div class="topic-metadata">

**Author:** [@dhaval\_parikh33](https://www.ruby-forum.com/u/dhaval_parikh33)\
**Replies:** 4\
**Last updated:** [February 4, 2008, 1:28pm UTC](https://www.ruby-forum.com/t/rss-feeds/127128 "2008-02-04T13:28:25Z")

</div>

Hello frnds I want to implement Rss Feeds on my site…I want to fetch data from other sites to my site…and i want to even use some cron job to automatically update is… So is there any plugin to do so? Or is there any …

---

## [Sort notes by category (when category is stored in notes)](https://www.ruby-forum.com/t/sort-notes-by-category-when-category-is-stored-in-notes/127903)

<div class="topic-metadata">

**Author:** [@softf5ajivanet](https://www.ruby-forum.com/u/softf5ajivanet)\
**Replies:** 3\
**Last updated:** [February 4, 2008, 1:02pm UTC](https://www.ruby-forum.com/t/sort-notes-by-category-when-category-is-stored-in-notes/127903 "2008-02-04T13:02:08Z")

</div>

okay, breaks the relationship model but it’s a really simple data model so doesn’t need too much about it. here’s my structure, I have a notes model containing… note: name, date, category so each note will have it’s…

---

## [Link\_to to pass an entire row of a table](https://www.ruby-forum.com/t/link-to-to-pass-an-entire-row-of-a-table/196589)

<div class="topic-metadata">

**Author:** [@sijo](https://www.ruby-forum.com/u/sijo)\
**Replies:** 0\
**Last updated:** [February 4, 2008, 12:30pm UTC](https://www.ruby-forum.com/t/link-to-to-pass-an-entire-row-of-a-table/196589 "2008-02-04T12:30:34Z")

</div>

Hi How can i use link\_to in form to pass an already fetched row of a table to an action.I can pass it by :id…But in action i have to again use the find method to get the rows again in show.rhtml I have \<%= link\_to…

---

## [Sanitizing strings](https://www.ruby-forum.com/t/sanitizing-strings/128022)

<div class="topic-metadata">

**Author:** [@sideshow](https://www.ruby-forum.com/u/sideshow)\
**Replies:** 4\
**Last updated:** [February 4, 2008, 12:20pm UTC](https://www.ruby-forum.com/t/sanitizing-strings/128022 "2008-02-04T12:20:31Z")

</div>

Hey guys this should be an easy one, how do i define a method that i can reuse for strings. eg/ “mystring”.sanitize i know how to write the regex for such a method but where would i put it ??? cheers Adam

---

## [Customizing REST calls](https://www.ruby-forum.com/t/customizing-rest-calls/128015)

<div class="topic-metadata">

**Author:** [@MohsinHijazee](https://www.ruby-forum.com/u/MohsinHijazee)\
**Replies:** 0\
**Last updated:** [February 4, 2008, 9:17am UTC](https://www.ruby-forum.com/t/customizing-rest-calls/128015 "2008-02-04T09:17:28Z")

</div>

Hi! Can we customize a map.resources call so that it calls different methods based on the HTTP verb called? Like: map.resources :posts, :controller =\> ‘admin/blogs’ Would call the Admin::Blogs#index() …

---

## [addEventListenerToButton](https://www.ruby-forum.com/t/addeventlistenertobutton/128011)

<div class="topic-metadata">

**Author:** [@casid](https://www.ruby-forum.com/u/casid)\
**Replies:** 0\
**Last updated:** [February 4, 2008, 7:48am UTC](https://www.ruby-forum.com/t/addeventlistenertobutton/128011 "2008-02-04T07:48:47Z")

</div>

Hi Rails Developers I want to create addEventListener to button. I have two method like def work\_sheet\_csv summary = \[ “site\_name=#{current\_project.site.name}”, “site\_code=#{current\_project.site.m\_site\_config.site\_c…

---

## [Selection?](https://www.ruby-forum.com/t/selection/128010)

<div class="topic-metadata">

**Author:** [@casid](https://www.ruby-forum.com/u/casid)\
**Replies:** 0\
**Last updated:** [February 4, 2008, 7:14am UTC](https://www.ruby-forum.com/t/selection/128010 "2008-02-04T07:14:25Z")

</div>

Hi Rails Developers I want to select template from my folder and add it like a parameter. the plugin needs parameter like a template\_path. I want to supply it from selection and selection get datas from folder. templ…

---

## [10-Minute Quick Start Guide for Facebooker - Create a Facebook App Using Rails in 7 Easy Steps](https://www.ruby-forum.com/t/10-minute-quick-start-guide-for-facebooker-create-a-facebook-app-using-rails-in-7-easy-steps/128005)

<div class="topic-metadata">

**Author:** [@gerald\_b](https://www.ruby-forum.com/u/gerald_b)\
**Replies:** 1\
**Last updated:** [February 4, 2008, 6:37am UTC](https://www.ruby-forum.com/t/10-minute-quick-start-guide-for-facebooker-create-a-facebook-app-using-rails-in-7-easy-steps/128005 "2008-02-04T06:37:36Z")

</div>

Hello, FYI: I’ve published a Facebooker version of the Quick Start Guide that creates a Twitter-style “What are you doing?” message using the Facebook API in seven steps: o Create a Rails application o Install the F…

---

## [Restful dates: from, to](https://www.ruby-forum.com/t/restful-dates-from-to/127746)

<div class="topic-metadata">

**Author:** [@ajaxrussia](https://www.ruby-forum.com/u/ajaxrussia)\
**Replies:** 5\
**Last updated:** [February 4, 2008, 6:23am UTC](https://www.ruby-forum.com/t/restful-dates-from-to/127746 "2008-02-04T06:23:33Z")

</div>

Hello, I’m having trouble making my application restful. I want to show posts between 2 dates. For example posts between march 2007 and may 2007. I don’t know how to represent this timespan a single resource because …

---

## [Extract vowels and consonants using Ruby Regex](https://www.ruby-forum.com/t/extract-vowels-and-consonants-using-ruby-regex/127954)

<div class="topic-metadata">

**Author:** [@dondi](https://www.ruby-forum.com/u/dondi)\
**Replies:** 4\
**Last updated:** [February 4, 2008, 6:01am UTC](https://www.ruby-forum.com/t/extract-vowels-and-consonants-using-ruby-regex/127954 "2008-02-04T06:01:18Z")

</div>

Hello, I am trying to build a regex to extract vowels and consonants from a string. So far, I am able to extract the basic a-e-i-o-u sequence using the following extension to the String class: class String def vowel…

---

## [Attachment\_fu stopped uploading files to S3](https://www.ruby-forum.com/t/attachment-fu-stopped-uploading-files-to-s3/127946)

<div class="topic-metadata">

**Author:** [@rohit](https://www.ruby-forum.com/u/rohit)\
**Replies:** 1\
**Last updated:** [February 4, 2008, 5:37am UTC](https://www.ruby-forum.com/t/attachment-fu-stopped-uploading-files-to-s3/127946 "2008-02-04T05:37:17Z")

</div>

Hey everyone, I’ve been using attachment\_fu to upload large media files to S3 with great success in my rails application. However, it has recently stopped uploading. My app appears to be uploading to somewhere, as m…

---

## [Conditional Ajax request](https://www.ruby-forum.com/t/conditional-ajax-request/127897)

<div class="topic-metadata">

**Author:** [@veeraa2003](https://www.ruby-forum.com/u/veeraa2003)\
**Replies:** 2\
**Last updated:** [February 4, 2008, 5:16am UTC](https://www.ruby-forum.com/t/conditional-ajax-request/127897 "2008-02-04T05:16:02Z")

</div>

Hi Everybody! I have an ajax request, it will replace a div content with partial file like below. render :update do |page| page.replace\_html :track\_info, :partial =\>“shared/trackinfo” end Here i want to check wheth…

---

## [Upgrading project to Rails 2. New generated functional tests fail](https://www.ruby-forum.com/t/upgrading-project-to-rails-2-new-generated-functional-tests-fail/127666)

<div class="topic-metadata">

**Author:** [@apremdas](https://www.ruby-forum.com/u/apremdas)\
**Replies:** 1\
**Last updated:** [February 4, 2008, 5:12am UTC](https://www.ruby-forum.com/t/upgrading-project-to-rails-2-new-generated-functional-tests-fail/127666 "2008-02-04T05:12:40Z")

</div>

When running the command ‘./script/generate scaffold SkillCategory name:text’ in a new Rails project, I get nicely generated code that passes all its tests When running the same code in my updated project the same co…

---

## [Routes in Functional Tests?](https://www.ruby-forum.com/t/routes-in-functional-tests/128001)

<div class="topic-metadata">

**Author:** [@dean](https://www.ruby-forum.com/u/dean)\
**Replies:** 1\
**Last updated:** [February 4, 2008, 5:03am UTC](https://www.ruby-forum.com/t/routes-in-functional-tests/128001 "2008-02-04T05:03:18Z")

</div>

Hello Rails Talk, How do I get named routes in my functional tests? I am testing a mailer and want to check for a URL in the email: :: user\_mailer\_test.rb :: require File.dirname(FILE) + ‘/…/test\_helper’ require ‘u…

---

## [Editing 2 models](https://www.ruby-forum.com/t/editing-2-models/127712)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 5\
**Last updated:** [February 4, 2008, 2:44am UTC](https://www.ruby-forum.com/t/editing-2-models/127712 "2008-02-04T02:44:58Z")

</div>

Hi all, My model: user has many events through statistics and registrations registrations contains whether or not the user was on the event, statistics contains what he did on the event. I think it is better to make…

---

## [Render :text sometimes rendering HTML?](https://www.ruby-forum.com/t/render-text-sometimes-rendering-html/127994)

<div class="topic-metadata">

**Author:** [@fjan](https://www.ruby-forum.com/u/fjan)\
**Replies:** 0\
**Last updated:** [February 4, 2008, 1:51am UTC](https://www.ruby-forum.com/t/render-text-sometimes-rendering-html/127994 "2008-02-04T01:51:39Z")

</div>

This one really stumps me: def hello render :text =\> ‘hi there’ end Renders with content-type ‘html/text’ most of the time. But not always, sometimes it has the type ‘text/plain’. For example: http::localhost:3000…

---

## [Testing helper/view methods from script/console](https://www.ruby-forum.com/t/testing-helper-view-methods-from-script-console/127993)

<div class="topic-metadata">

**Author:** [@galeal](https://www.ruby-forum.com/u/galeal)\
**Replies:** 4\
**Last updated:** [February 4, 2008, 1:37am UTC](https://www.ruby-forum.com/t/testing-helper-view-methods-from-script-console/127993 "2008-02-04T01:37:56Z")

</div>

Hi, Is it possible to test helper/view methods from script/console. I want to test the output of methods like distance\_of\_time\_in\_words. But it won’t let me from the console. What am I missing? TIA Luke

---

## [Backing up via rake - problems with habtm tables](https://www.ruby-forum.com/t/backing-up-via-rake-problems-with-habtm-tables/127960)

<div class="topic-metadata">

**Author:** [@phil](https://www.ruby-forum.com/u/phil)\
**Replies:** 1\
**Last updated:** [February 3, 2008, 11:26pm UTC](https://www.ruby-forum.com/t/backing-up-via-rake-problems-with-habtm-tables/127960 "2008-02-03T23:26:43Z")

</div>

I am trying to write a backup/restore rake process and found the very nice one available on various sites. The problem is that we have a lot of habtm tables - model1\_model2 tables - and they cause the process to fall …

---

## [Rails doesn't create sessions in production](https://www.ruby-forum.com/t/rails-doesnt-create-sessions-in-production/75818)

<div class="topic-metadata">

**Author:** [@bryan](https://www.ruby-forum.com/u/bryan)\
**Replies:** 5\
**Last updated:** [February 3, 2008, 11:15pm UTC](https://www.ruby-forum.com/t/rails-doesnt-create-sessions-in-production/75818 "2008-02-03T23:15:18Z")

</div>

I’m having an issue with sessions in the 1.2 pre-release code. Sessions are created when the site is in development mode, and they are not created when the site is in production mode. I’m using a database store, but …

---

## [Lots of duplicate row (except the id) in database](https://www.ruby-forum.com/t/lots-of-duplicate-row-except-the-id-in-database/127852)

<div class="topic-metadata">

**Author:** [@semyou](https://www.ruby-forum.com/u/semyou)\
**Replies:** 3\
**Last updated:** [February 3, 2008, 10:47pm UTC](https://www.ruby-forum.com/t/lots-of-duplicate-row-except-the-id-in-database/127852 "2008-02-03T22:47:49Z")

</div>

Hi, I have a 2 tables project and task. The task table has a foreign key on projects. Whenever, I create a new task through my view, I see my added task and a new project\_id, but my project table keeps on having dupl…

---

## [Clear persistent model associations for objects in session](https://www.ruby-forum.com/t/clear-persistent-model-associations-for-objects-in-session/127966)

<div class="topic-metadata">

**Author:** [@costi](https://www.ruby-forum.com/u/costi)\
**Replies:** 4\
**Last updated:** [February 3, 2008, 10:32pm UTC](https://www.ruby-forum.com/t/clear-persistent-model-associations-for-objects-in-session/127966 "2008-02-03T22:32:09Z")

</div>

I have an order form that is comprised of a lot of :has\_many and :has\_one associations. I want to load the object into the session, with all associations and edit it. I want the whole submission process to be done ato…

---

## [Great Video Tutorials, Cool Help](https://www.ruby-forum.com/t/great-video-tutorials-cool-help/127986)

<div class="topic-metadata">

**Author:** [@Mario\_Feonands](https://www.ruby-forum.com/u/Mario_Feonands)\
**Replies:** 0\
**Last updated:** [February 3, 2008, 10:13pm UTC](https://www.ruby-forum.com/t/great-video-tutorials-cool-help/127986 "2008-02-03T22:13:34Z")

</div>

Cool Help Videos…Here’s the place to find cool video tutorials like how to get One Way SEO Links,Link building videos,photoshop tutorials,spyware help,computer games help,website traffic help and much more… COOL HELP…

---

## [Africa's Premier Social Network](https://www.ruby-forum.com/t/africas-premier-social-network/127977)

<div class="topic-metadata">

**Author:** [@Mario\_Feonands](https://www.ruby-forum.com/u/Mario_Feonands)\
**Replies:** 0\
**Last updated:** [February 3, 2008, 6:24pm UTC](https://www.ruby-forum.com/t/africas-premier-social-network/127977 "2008-02-03T18:24:30Z")

</div>

I just found a new African site - www.PlentyAfricans.com. I think it is Africaï¿½s premier social networking and community site where Africans could freely socialize, engagingly connect, and proudly unite. Check out h…

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

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