# Rails

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

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

---

## [Redirect\_to and reloading the browser woes](https://www.ruby-forum.com/t/redirect-to-and-reloading-the-browser-woes/158114)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 0\
**Last updated:** [January 19, 2009, 2:07pm UTC](https://www.ruby-forum.com/t/redirect-to-and-reloading-the-browser-woes/158114 "2009-01-19T14:07:02Z")

</div>

Hi, I am experiencing a big problem: I a form using a POST request to a create action. In create action, if everything goes on well, then redirect\_to some\_pages\_url When page is loaded, if I refresh the browser, Fire…

---

## [Patching](https://www.ruby-forum.com/t/patching/158105)

<div class="topic-metadata">

**Author:** [@nilez](https://www.ruby-forum.com/u/nilez)\
**Replies:** 0\
**Last updated:** [January 19, 2009, 1:33pm UTC](https://www.ruby-forum.com/t/patching/158105 "2009-01-19T13:33:50Z")

</div>

hi I have a patch and i want to apply it to image\_science.rb, how can i apply please inform me…

---

## [Adding conditions (if-else) to RJS template](https://www.ruby-forum.com/t/adding-conditions-if-else-to-rjs-template/158089)

<div class="topic-metadata">

**Author:** [@gte351s](https://www.ruby-forum.com/u/gte351s)\
**Replies:** 6\
**Last updated:** [January 19, 2009, 1:32pm UTC](https://www.ruby-forum.com/t/adding-conditions-if-else-to-rjs-template/158089 "2009-01-19T13:32:26Z")

</div>

I tried following Ryan B.’ railscast on rjs tips (#45 RJS Tips - RailsCasts) and apply his method of using if-else inside the rjs template, but can’t seem to get it to work. Basically, I’m trying to toggle the text on…

---

## [Were there audio/mp3's available for the RailsConf 2008 sessions (can't seem to see them)](https://www.ruby-forum.com/t/were-there-audio-mp3s-available-for-the-railsconf-2008-sessions-cant-seem-to-see-them/158107)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 2\
**Last updated:** [January 19, 2009, 1:26pm UTC](https://www.ruby-forum.com/t/were-there-audio-mp3s-available-for-the-railsconf-2008-sessions-cant-seem-to-see-them/158107 "2009-01-19T13:26:33Z")

</div>

Anyone know if there are audio/mp3’s available for the RailsConf 2008 sessions (can’t seem to see them like there are for 2007)? – Greg http://blog.gregnet.org/

---

## [Explain this migrate line?](https://www.ruby-forum.com/t/explain-this-migrate-line/158076)

<div class="topic-metadata">

**Author:** [@typemismatch](https://www.ruby-forum.com/u/typemismatch)\
**Replies:** 2\
**Last updated:** [January 19, 2009, 12:30pm UTC](https://www.ruby-forum.com/t/explain-this-migrate-line/158076 "2009-01-19T12:30:23Z")

</div>

So I have this code in a migration file … create\_table :books do |t| t.column "Title", :string t.column "Price", :decimal t.timestamps end Are “Title” and :string just parameters being passed to the method t…

---

## [Patch - mysql double datatype](https://www.ruby-forum.com/t/patch-mysql-double-datatype/158104)

<div class="topic-metadata">

**Author:** [@jzimmek](https://www.ruby-forum.com/u/jzimmek)\
**Replies:** 0\
**Last updated:** [January 19, 2009, 12:28pm UTC](https://www.ruby-forum.com/t/patch-mysql-double-datatype/158104 "2009-01-19T12:28:36Z")

</div>

while porting some parts of our java-based plattform to rails i encounter some problems while using migrations and db:schema:dump. the database schema uses several “double” column types which are not supported nativel…

---

## [Extend form\_for](https://www.ruby-forum.com/t/extend-form-for/158097)

<div class="topic-metadata">

**Author:** [@tatyree](https://www.ruby-forum.com/u/tatyree)\
**Replies:** 1\
**Last updated:** [January 19, 2009, 12:16pm UTC](https://www.ruby-forum.com/t/extend-form-for/158097 "2009-01-19T12:16:13Z")

</div>

I’m trying to extend form\_for to add a hidden field to certain forms but not others. I realize that I need to push it on to the end of the &proc, but have yet to find an elegant way of doing it and was wondering if a…

---

## [Jruby Application with hibernate](https://www.ruby-forum.com/t/jruby-application-with-hibernate/158101)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [January 19, 2009, 11:58am UTC](https://www.ruby-forum.com/t/jruby-application-with-hibernate/158101 "2009-01-19T11:58:36Z")

</div>

hello friends, I want to create a jruby on rails application with hibernate as back- end and rails as front-end with mysql as db, can anybody help me, i have got an jruby application with hibernate but it doesn’t hav…

---

## [Form doesn't appear in the view.. why?](https://www.ruby-forum.com/t/form-doesnt-appear-in-the-view-why/158040)

<div class="topic-metadata">

**Author:** [@gte351s](https://www.ruby-forum.com/u/gte351s)\
**Replies:** 6\
**Last updated:** [January 19, 2009, 11:56am UTC](https://www.ruby-forum.com/t/form-doesnt-appear-in-the-view-why/158040 "2009-01-19T11:56:50Z")

</div>

Hi - I have a strange thing happening in my app. I’m trying to replace a table row with a form row using link\_to\_remote and form\_for. In my index view I have a call to edit: \<%= link\_to\_remote ‘edit vendor’, :url =\> {…

---

## [To use model method](https://www.ruby-forum.com/t/to-use-model-method/158082)

<div class="topic-metadata">

**Author:** [@angaps](https://www.ruby-forum.com/u/angaps)\
**Replies:** 1\
**Last updated:** [January 19, 2009, 11:56am UTC](https://www.ruby-forum.com/t/to-use-model-method/158082 "2009-01-19T11:56:14Z")

</div>

class ApplicationController \< ActionController::Base helper :all # include all helpers, all the time model :cart model :line\_item end I want to use model class only(cart and line\_item), so created without scaffold. …

---

## [Can I get an ActiveRecord.find to do this query... "Get all Articles which have only been published](https://www.ruby-forum.com/t/can-i-get-an-activerecord-find-to-do-this-query-get-all-articles-which-have-only-been-published/158084)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 5\
**Last updated:** [January 19, 2009, 11:54am UTC](https://www.ruby-forum.com/t/can-i-get-an-activerecord-find-to-do-this-query-get-all-articles-which-have-only-been-published/158084 "2009-01-19T11:54:29Z")

</div>

Hi, Can I get an ActiveRecord.find to do this query?: Get all Articles which have only been published in less than X Magazines. Model Relationship: “Magazine” has\_and\_belongs\_to\_many "Articles"s. thanks – Greg …

---

## [Namespaced and nested controllers/resouces](https://www.ruby-forum.com/t/namespaced-and-nested-controllers-resouces/157807)

<div class="topic-metadata">

**Author:** [@Dmitrij\_S](https://www.ruby-forum.com/u/Dmitrij_S)\
**Replies:** 5\
**Last updated:** [January 19, 2009, 8:17am UTC](https://www.ruby-forum.com/t/namespaced-and-nested-controllers-resouces/157807 "2009-01-19T08:17:15Z")

</div>

Hello, My controllers: ForumsController Forum::TopicsController Forum::Topic::PostsController Resources: map.resources :forums do |forums| forums.resources :topics, :controller =\> “forum/topics” do |topics| topics…

---

## [Ruby 1.9.1, dll files missing](https://www.ruby-forum.com/t/ruby-1-9-1-dll-files-missing/158078)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [January 19, 2009, 5:53am UTC](https://www.ruby-forum.com/t/ruby-1-9-1-dll-files-missing/158078 "2009-01-19T05:53:51Z")

</div>

I install ruby 1.9.1 and I do gem install rails or mongrel and I keeps saying dll file after dll file is missing. I am on windows anyne know what to do other than install every dll it is saying it is missing??

---

## [Unicode most common way to handle?](https://www.ruby-forum.com/t/unicode-most-common-way-to-handle/158075)

<div class="topic-metadata">

**Author:** [@artchrst](https://www.ruby-forum.com/u/artchrst)\
**Replies:** 0\
**Last updated:** [January 19, 2009, 3:59am UTC](https://www.ruby-forum.com/t/unicode-most-common-way-to-handle/158075 "2009-01-19T03:59:04Z")

</div>

We are applying Unicode to the Rails project. Now, As I found in http://wiki.rubyonrails.org/rails/pages/howtouseunicodestrings, it seems that we can either use abc.jlength (using jcode) or abc.chars.length. From h…

---

## [Automated Tests in Eclipse?](https://www.ruby-forum.com/t/automated-tests-in-eclipse/157760)

<div class="topic-metadata">

**Author:** [@artchrst](https://www.ruby-forum.com/u/artchrst)\
**Replies:** 3\
**Last updated:** [January 19, 2009, 3:50am UTC](https://www.ruby-forum.com/t/automated-tests-in-eclipse/157760 "2009-01-19T03:50:28Z")

</div>

Hi Guys, I planned to run automated tests in background schedulely. Is there any plugins in Eclipse that can run Rails tests? Or is there any better way to do scheduled background tests? Thanks, Arthur

---

## [Meaning of \<%%](https://www.ruby-forum.com/t/meaning-of/158073)

<div class="topic-metadata">

**Author:** [@chero](https://www.ruby-forum.com/u/chero)\
**Replies:** 1\
**Last updated:** [January 19, 2009, 3:14am UTC](https://www.ruby-forum.com/t/meaning-of/158073 "2009-01-19T03:14:45Z")

</div>

What does this syntax in an erb file mean?

---

## [How can I customize the "rdoc" stylesheet? (i.e. so it doesn't get overwritten each time)](https://www.ruby-forum.com/t/how-can-i-customize-the-rdoc-stylesheet-i-e-so-it-doesnt-get-overwritten-each-time/158068)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 0\
**Last updated:** [January 19, 2009, 12:56am UTC](https://www.ruby-forum.com/t/how-can-i-customize-the-rdoc-stylesheet-i-e-so-it-doesnt-get-overwritten-each-time/158068 "2009-01-19T00:56:43Z")

</div>

Hi, Any know how to customize the “rdoc” stylesheet? (i.e. so it doesn’t get overwritten each time). I basically want to use the rails stylesheet instead of the default. The rdoc rake command replaces the content…

---

## [Defining A model that have two has\_many](https://www.ruby-forum.com/t/defining-a-model-that-have-two-has-many/158064)

<div class="topic-metadata">

**Author:** [@builtbysimple](https://www.ruby-forum.com/u/builtbysimple)\
**Replies:** 1\
**Last updated:** [January 18, 2009, 11:40pm UTC](https://www.ruby-forum.com/t/defining-a-model-that-have-two-has-many/158064 "2009-01-18T23:40:01Z")

</div>

Dear all, I am currently confused with defining model in Rails that has two has\_many relationship. I have a model that is called Category, and this model will be used by two model which is Product and Blog. Would th…

---

## [Remote browser screen capture with Rials?](https://www.ruby-forum.com/t/remote-browser-screen-capture-with-rials/158038)

<div class="topic-metadata">

**Author:** [@Schalk\_N](https://www.ruby-forum.com/u/Schalk_N)\
**Replies:** 5\
**Last updated:** [January 18, 2009, 10:06pm UTC](https://www.ruby-forum.com/t/remote-browser-screen-capture-with-rials/158038 "2009-01-18T22:06:46Z")

</div>

Hi everyone, Does anyone know of a solution that will work with Rails that can capture remote screen shots of website a.k.a Magnolia, DZone etc? Thanks, Schalk

---

## [Convert images with attachment\_fu](https://www.ruby-forum.com/t/convert-images-with-attachment-fu/157986)

<div class="topic-metadata">

**Author:** [@stratboy](https://www.ruby-forum.com/u/stratboy)\
**Replies:** 1\
**Last updated:** [January 18, 2009, 9:56pm UTC](https://www.ruby-forum.com/t/convert-images-with-attachment-fu/157986 "2009-01-18T21:56:45Z")

</div>

Hi, i’m using attachment fu plugin and mini magick for upload images. class Photo \< ActiveRecord::Base has\_attachment :content\_type =\> :image, :storage =\> :file\_system, :max\_size =\> 4.megabytes, :resize\_to =\> ‘700x…

---

## [How do I add a new font for my RoR website (hosted on linux, developed on Mac)?](https://www.ruby-forum.com/t/how-do-i-add-a-new-font-for-my-ror-website-hosted-on-linux-developed-on-mac/158014)

<div class="topic-metadata">

**Author:** [@greg](https://www.ruby-forum.com/u/greg)\
**Replies:** 7\
**Last updated:** [January 18, 2009, 9:54pm UTC](https://www.ruby-forum.com/t/how-do-i-add-a-new-font-for-my-ror-website-hosted-on-linux-developed-on-mac/158014 "2009-01-18T21:54:24Z")

</div>

Hi, Any pointers where to start digging re how I could use some fonts (e.g. Iconian Fonts ) in my Rails web site? I develop on Mac, but deploy to a Linux box. Does this mean I have to work out how to install fonts …

---

## [Subdomains question](https://www.ruby-forum.com/t/subdomains-question/157952)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 1\
**Last updated:** [January 18, 2009, 8:43pm UTC](https://www.ruby-forum.com/t/subdomains-question/157952 "2009-01-18T20:43:06Z")

</div>

Hello, I have followed http://www.robbyonrails.com/articles/2009/01/11/subdomain-accounts-with-ruby-on-rails-explained and posts on working with subdomains (without the use of subomain-fu and other plugins). In tho…

---

## [Self referential many to many join?](https://www.ruby-forum.com/t/self-referential-many-to-many-join/157997)

<div class="topic-metadata">

**Author:** [@thepanu](https://www.ruby-forum.com/u/thepanu)\
**Replies:** 2\
**Last updated:** [January 18, 2009, 8:42pm UTC](https://www.ruby-forum.com/t/self-referential-many-to-many-join/157997 "2009-01-18T20:42:38Z")

</div>

I am trying to create active record schema that includes self referential many to many. Example. I have models Group and Person. Person can belong to multiple groups and that isn’t the problem here. Problem is that I…

---

## [Query performance boost](https://www.ruby-forum.com/t/query-performance-boost/157869)

<div class="topic-metadata">

**Author:** [@ukarick](https://www.ruby-forum.com/u/ukarick)\
**Replies:** 4\
**Last updated:** [January 18, 2009, 8:41pm UTC](https://www.ruby-forum.com/t/query-performance-boost/157869 "2009-01-18T20:41:20Z")

</div>

I’ve a table with structure like this: id: int field1: varchar(255) field2: int(11) field3: text field4: text field5: varchar(255) field6: varchar(255) assume that this table contains massive contents on field 3 …

---

## [How to build a new blog program with ruby?](https://www.ruby-forum.com/t/how-to-build-a-new-blog-program-with-ruby/158054)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 1\
**Last updated:** [January 18, 2009, 8:34pm UTC](https://www.ruby-forum.com/t/how-to-build-a-new-blog-program-with-ruby/158054 "2009-01-18T20:34:53Z")

</div>

Would you please tell me how to build a blog program by Ruby on Rails? Is it very difficult? Compare RoR with PHP, witch is more easier for beginners? Thanks!

---

## [Helper for model?](https://www.ruby-forum.com/t/helper-for-model/157761)

<div class="topic-metadata">

**Author:** [@rpardee](https://www.ruby-forum.com/u/rpardee)\
**Replies:** 6\
**Last updated:** [January 18, 2009, 8:21pm UTC](https://www.ruby-forum.com/t/helper-for-model/157761 "2009-01-18T20:21:59Z")

</div>

Hey All, I find I’m writing a ton of nearly identical model methods to support mass creation/update of child objects (a la the ‘complex forms’ series of railscasts). Stuff like: def existing\_child\_attributes=(update…

---

## [Why this error?](https://www.ruby-forum.com/t/why-this-error/158007)

<div class="topic-metadata">

**Author:** [@tharrisx](https://www.ruby-forum.com/u/tharrisx)\
**Replies:** 9\
**Last updated:** [January 18, 2009, 4:57pm UTC](https://www.ruby-forum.com/t/why-this-error/158007 "2009-01-18T16:57:56Z")

</div>

Hi there, can somebody enlighten me why this throws an error (when this code is called): \<% form\_remote\_tag :url =\> ‘/user/agents’ do -%\> \<%= button\_to\_function ‘Personal account’ do |page| page.replace\_html ‘newage…

---

## [Mysql column type set](https://www.ruby-forum.com/t/mysql-column-type-set/158045)

<div class="topic-metadata">

**Author:** [@dave](https://www.ruby-forum.com/u/dave)\
**Replies:** 2\
**Last updated:** [January 18, 2009, 4:16pm UTC](https://www.ruby-forum.com/t/mysql-column-type-set/158045 "2009-01-18T16:16:41Z")

</div>

Is it possible to use Mysql column type SET within RoR migration files?

---

## [Routing error for application](https://www.ruby-forum.com/t/routing-error-for-application/158035)

<div class="topic-metadata">

**Author:** [@ramya](https://www.ruby-forum.com/u/ramya)\
**Replies:** 1\
**Last updated:** [January 18, 2009, 3:59pm UTC](https://www.ruby-forum.com/t/routing-error-for-application/158035 "2009-01-18T15:59:50Z")

</div>

Hi, I am to learning Ruby on Rails with Rolling with Ruby on Rails orilley handout. I created an empty application by using rails command. Then i created my own controller using the command. ruby script \\generate c…

---

## [Unique field](https://www.ruby-forum.com/t/unique-field/158044)

<div class="topic-metadata">

**Author:** [@dave](https://www.ruby-forum.com/u/dave)\
**Replies:** 1\
**Last updated:** [January 18, 2009, 2:17pm UTC](https://www.ruby-forum.com/t/unique-field/158044 "2009-01-18T14:17:24Z")

</div>

Anyone point me in the direction of a tutorial to explain how I can add a checker to a form field to see whether it is already used within the database, i.e. check whether the username entered is unique

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

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