# Rails

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

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

---

## [How to use .rb in ROR](https://www.ruby-forum.com/t/how-to-use-rb-in-ror/88866)

<div class="topic-metadata">

**Author:** [@rama](https://www.ruby-forum.com/u/rama)\
**Replies:** 0\
**Last updated:** [March 15, 2007, 4:17am UTC](https://www.ruby-forum.com/t/how-to-use-rb-in-ror/88866 "2007-03-15T04:17:33Z")

</div>

I want to use IceRuby in RubyOnRail. I got success in getting output using IceRuby in “tst.rb” example file. but i get output in my command prompt. My prob, is i want to use my example script “tst.rb” in my RubyonRail …

---

## [Scalability: numerous servers vs. powerful servers](https://www.ruby-forum.com/t/scalability-numerous-servers-vs-powerful-servers/88460)

<div class="topic-metadata">

**Author:** [@pjay](https://www.ruby-forum.com/u/pjay)\
**Replies:** 5\
**Last updated:** [March 15, 2007, 2:41am UTC](https://www.ruby-forum.com/t/scalability-numerous-servers-vs-powerful-servers/88460 "2007-03-15T02:41:49Z")

</div>

Hi all, I’ve been the sysadmin for a Rails site hosted on four dedicated servers. One front-end which serves static files and dispatches dynamic requests to two application servers. And one DB server. This split arch…

---

## [Url\_for\_file\_column error](https://www.ruby-forum.com/t/url-for-file-column-error/88861)

<div class="topic-metadata">

**Author:** [@abon](https://www.ruby-forum.com/u/abon)\
**Replies:** 0\
**Last updated:** [March 15, 2007, 2:40am UTC](https://www.ruby-forum.com/t/url-for-file-column-error/88861 "2007-03-15T02:40:10Z")

</div>

Hi, I’m using file\_column to upload image. Upload works. But displaying the image seems to be a problem, since the url generated by file\_column all includes a question mark like Anyone knows what’s wrong in the p…

---

## [Technical Cofounder(s) wanted. Big Plus if you've Been divor](https://www.ruby-forum.com/t/technical-cofounder-s-wanted-big-plus-if-youve-been-divor/88860)

<div class="topic-metadata">

**Author:** [@davidvGoliath](https://www.ruby-forum.com/u/davidvGoliath)\
**Replies:** 0\
**Last updated:** [March 15, 2007, 2:32am UTC](https://www.ruby-forum.com/t/technical-cofounder-s-wanted-big-plus-if-youve-been-divor/88860 "2007-03-15T02:32:49Z")

</div>

NOTE: IF this is not for you, but you find us the cofounder-engineer, we will give you $30k in equity (if fullttime, or half if half time) TECHNICAL COFOUNDERS Needed: PART TIME OK: Skilled Web App Chief Engineer CoF…

---

## [Model Question - First Rails Project](https://www.ruby-forum.com/t/model-question-first-rails-project/88734)

<div class="topic-metadata">

**Author:** [@billbell52](https://www.ruby-forum.com/u/billbell52)\
**Replies:** 2\
**Last updated:** [March 15, 2007, 2:27am UTC](https://www.ruby-forum.com/t/model-question-first-rails-project/88734 "2007-03-15T02:27:48Z")

</div>

I am trying to do my first Rails project. I am having a problem understanding how to create the model. The project will track parts that are used in building an item. It will be hierarchical. For example a bicycle…

---

## [\[ANN\] ActiveRecord::Extensions 0.5.0 Released!](https://www.ruby-forum.com/t/ann-activerecord-extensions-0-5-0-released/88757)

<div class="topic-metadata">

**Author:** [@zdennis](https://www.ruby-forum.com/u/zdennis)\
**Replies:** 4\
**Last updated:** [March 15, 2007, 2:23am UTC](https://www.ruby-forum.com/t/ann-activerecord-extensions-0-5-0-released/88757 "2007-03-15T02:23:48Z")

</div>

ActiveRecord::Extensions 0.5.0 is released! It includes better finder support for Time objects when operating against DATE or DATETIME columns. http://www.continuousthinking.com/2007/3/14/activerecord-extensions-0-5-0…

---

## [Association Methods Not Working - No SQL!](https://www.ruby-forum.com/t/association-methods-not-working-no-sql/88858)

<div class="topic-metadata">

**Author:** [@hunter\_h](https://www.ruby-forum.com/u/hunter_h)\
**Replies:** 0\
**Last updated:** [March 15, 2007, 1:57am UTC](https://www.ruby-forum.com/t/association-methods-not-working-no-sql/88858 "2007-03-15T01:57:46Z")

</div>

Hey All, I have some associations that seem to be messed up as their methods (i.e. clear, delete) don’t do anything - no errors, no SQL, nothing! It’s a polymorphic has\_many :through. Here goes: class Connection \< Ac…

---

## [Is it possible to determine the file size before an actual u](https://www.ruby-forum.com/t/is-it-possible-to-determine-the-file-size-before-an-actual-u/88829)

<div class="topic-metadata">

**Author:** [@dan\_kuwachi](https://www.ruby-forum.com/u/dan_kuwachi)\
**Replies:** 2\
**Last updated:** [March 15, 2007, 1:45am UTC](https://www.ruby-forum.com/t/is-it-possible-to-determine-the-file-size-before-an-actual-u/88829 "2007-03-15T01:45:45Z")

</div>

I am doing a file upload where I want to constrain the maximum size to 1 mb, and I can check this data after the upload has completed. Is there a way to check this before the upload actually starts?

---

## [A place to put common partial templates and RJS files?](https://www.ruby-forum.com/t/a-place-to-put-common-partial-templates-and-rjs-files/88847)

<div class="topic-metadata">

**Author:** [@PSSS\_S](https://www.ruby-forum.com/u/PSSS_S)\
**Replies:** 3\
**Last updated:** [March 15, 2007, 12:10am UTC](https://www.ruby-forum.com/t/a-place-to-put-common-partial-templates-and-rjs-files/88847 "2007-03-15T00:10:39Z")

</div>

Greetings, I have a partial template file (acutally, it is an RJS file but the same principle is in question here) which I wish to “share” between multiple controllers. Does anyone know where in the directory tree I …

---

## [ANN: new plugin - ResourceFu](https://www.ruby-forum.com/t/ann-new-plugin-resourcefu/88845)

<div class="topic-metadata">

**Author:** [@tsmith](https://www.ruby-forum.com/u/tsmith)\
**Replies:** 1\
**Last updated:** [March 14, 2007, 11:32pm UTC](https://www.ruby-forum.com/t/ann-new-plugin-resourcefu/88845 "2007-03-14T23:32:34Z")

</div>

Hey all, I’ve decided to collect various hacks and techniques I’ve been using in my projects to make nested and polymorphic resources a little less painful to use. So, while refactoring everything into a single plugi…

---

## [Pick a specific item from a list with objects](https://www.ruby-forum.com/t/pick-a-specific-item-from-a-list-with-objects/88732)

<div class="topic-metadata">

**Author:** [@leonb](https://www.ruby-forum.com/u/leonb)\
**Replies:** 10\
**Last updated:** [March 14, 2007, 11:30pm UTC](https://www.ruby-forum.com/t/pick-a-specific-item-from-a-list-with-objects/88732 "2007-03-14T23:30:34Z")

</div>

Hi, When I do this: debug user.declarations\_payers I get this: !ruby/object:DeclarationsPayer attributes: declaration\_id: “1” id: “1” additional\_persons: “3” user\_id: “1” !ruby/object:DeclarationsPayer attribu…

---

## [RJS renders ... sometimes](https://www.ruby-forum.com/t/rjs-renders-sometimes/88804)

<div class="topic-metadata">

**Author:** [@wesgarrison](https://www.ruby-forum.com/u/wesgarrison)\
**Replies:** 3\
**Last updated:** [March 14, 2007, 10:47pm UTC](https://www.ruby-forum.com/t/rjs-renders-sometimes/88804 "2007-03-14T22:47:27Z")

</div>

I’ve googled around for a solution for this, but no luck. I have a simple form. It submits to a controller. The controller action passes through to an .rjs template. The page is updated and all is well. I wanted to…

---

## [Before\_destroy return false, but dependent are destroyed](https://www.ruby-forum.com/t/before-destroy-return-false-but-dependent-are-destroyed/88842)

<div class="topic-metadata">

**Author:** [@Tomasz\_Bak](https://www.ruby-forum.com/u/Tomasz_Bak)\
**Replies:** 0\
**Last updated:** [March 14, 2007, 10:43pm UTC](https://www.ruby-forum.com/t/before-destroy-return-false-but-dependent-are-destroyed/88842 "2007-03-14T22:43:25Z")

</div>

I have a problem with before\_destroy deleting by dependent records, even through I return flase. … has\_many :users, :class\_name =\> ‘Editor’, :as =\> :editable, :dependent =\> :destroy … def before\_destroy unless s…

---

## [Date validations](https://www.ruby-forum.com/t/date-validations/88840)

<div class="topic-metadata">

**Author:** [@wpwood](https://www.ruby-forum.com/u/wpwood)\
**Replies:** 0\
**Last updated:** [March 14, 2007, 10:23pm UTC](https://www.ruby-forum.com/t/date-validations/88840 "2007-03-14T22:23:26Z")

</div>

I’m looking for some experienced assessments of how / whether I need to bother to validate dates in my Rails app. I’ve Googled the topic but what I’m finding doesn’t tell me what I want to know. I’m not concerned wit…

---

## [Number.find() shall only return unique values](https://www.ruby-forum.com/t/number-find-shall-only-return-unique-values/88833)

<div class="topic-metadata">

**Author:** [@msojka](https://www.ruby-forum.com/u/msojka)\
**Replies:** 3\
**Last updated:** [March 14, 2007, 10:11pm UTC](https://www.ruby-forum.com/t/number-find-shall-only-return-unique-values/88833 "2007-03-14T22:11:24Z")

</div>

Hi, I got an address book with a list-column, and I want this dropdown to display the unique values I have used. So I can sort on e.g. “work” or “friend”. \<%= select(“post”, “list”, Number.find(:all, :order =\> “list…

---

## [Re: Accessing model info](https://www.ruby-forum.com/t/re-accessing-model-info/88838)

<div class="topic-metadata">

**Author:** [@Tyler\_MacDonald](https://www.ruby-forum.com/u/Tyler_MacDonald)\
**Replies:** 0\
**Last updated:** [March 14, 2007, 9:55pm UTC](https://www.ruby-forum.com/t/re-accessing-model-info/88838 "2007-03-14T21:55:17Z")

</div>

Mick removed\_email\_address@domain.invalid wrote: I have a model called Subscription which contains (and therefore links) a user\_id and an event\_id (both User and Event being additional models themselves). When I cal…

---

## [Accessing model info](https://www.ruby-forum.com/t/accessing-model-info/88835)

<div class="topic-metadata">

**Author:** [@mick](https://www.ruby-forum.com/u/mick)\
**Replies:** 1\
**Last updated:** [March 14, 2007, 9:50pm UTC](https://www.ruby-forum.com/t/accessing-model-info/88835 "2007-03-14T21:50:16Z")

</div>

Hi there, I have a model called Subscription which contains (and therefore links) a user\_id and an event\_id (both User and Event being additional models themselves). When I call Subscription.find(user\_id = 1) for exa…

---

## [Validates\_presence\_of?](https://www.ruby-forum.com/t/validates-presence-of/88834)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 2\
**Last updated:** [March 14, 2007, 9:34pm UTC](https://www.ruby-forum.com/t/validates-presence-of/88834 "2007-03-14T21:34:14Z")

</div>

I have a situation in which I would like it to be possible to create a user. But also allow an administrator to modify certain values associated with that user (username, email, privileges). I have created my own aut…

---

## [Can someone explain this code to me?](https://www.ruby-forum.com/t/can-someone-explain-this-code-to-me/88824)

<div class="topic-metadata">

**Author:** [@treebeard](https://www.ruby-forum.com/u/treebeard)\
**Replies:** 6\
**Last updated:** [March 14, 2007, 9:30pm UTC](https://www.ruby-forum.com/t/can-someone-explain-this-code-to-me/88824 "2007-03-14T21:30:13Z")

</div>

taken from here using acts\_as\_fu, possible work for acts as attachment as well http://beast.caboo.se/forums/2/topics/870 Image.transaction do images = params\[:image\].collect { |img| Image.create(:uploaded\_data =\> im…

---

## [Simple authorization setup](https://www.ruby-forum.com/t/simple-authorization-setup/88762)

<div class="topic-metadata">

**Author:** [@jim](https://www.ruby-forum.com/u/jim)\
**Replies:** 11\
**Last updated:** [March 14, 2007, 9:26pm UTC](https://www.ruby-forum.com/t/simple-authorization-setup/88762 "2007-03-14T21:26:13Z")

</div>

I’m using single table inheritance to handle several types/roles of users within my application. I want to be able to authorize certain actions based on user type. I’ve seen Chad F.'s recipe for users|roles|rights, bu…

---

## [Using &block](https://www.ruby-forum.com/t/using-block/88830)

<div class="topic-metadata">

**Author:** [@marcelo](https://www.ruby-forum.com/u/marcelo)\
**Replies:** 2\
**Last updated:** [March 14, 2007, 8:53pm UTC](https://www.ruby-forum.com/t/using-block/88830 "2007-03-14T20:53:07Z")

</div>

I am wanting make a helper for tag . I am make follow. def tabela(&block) s = '\<table\>' t = concat(s, block.binding) t \<\< '\</table\>' end And call this: \<% tabela do %\> teste\</br\> teste2\</br\> \<% end %\> …

---

## [No auto-increment field](https://www.ruby-forum.com/t/no-auto-increment-field/88813)

<div class="topic-metadata">

**Author:** [@technodolt](https://www.ruby-forum.com/u/technodolt)\
**Replies:** 3\
**Last updated:** [March 14, 2007, 8:52pm UTC](https://www.ruby-forum.com/t/no-auto-increment-field/88813 "2007-03-14T20:52:07Z")

</div>

I have a table that has no primary key… it is a cross-ref table with some extra data stored in it. I’d prefer not to use a primary key because the size of this table will grow so rapidly that I’m afraid, over time, …

---

## [SOS, how to get the parameters introduced in a form](https://www.ruby-forum.com/t/sos-how-to-get-the-parameters-introduced-in-a-form/88822)

<div class="topic-metadata">

**Author:** [@burbu](https://www.ruby-forum.com/u/burbu)\
**Replies:** 1\
**Last updated:** [March 14, 2007, 8:04pm UTC](https://www.ruby-forum.com/t/sos-how-to-get-the-parameters-introduced-in-a-form/88822 "2007-03-14T20:04:35Z")

</div>

I’m studying at university and I have being asked to do an application with ruby on rails that given a web page where you have to subscribe introducing some information in a form, later, after registering, you can see…

---

## [Script/server script](https://www.ruby-forum.com/t/script-server-script/88406)

<div class="topic-metadata">

**Author:** [@seb](https://www.ruby-forum.com/u/seb)\
**Replies:** 2\
**Last updated:** [March 14, 2007, 7:21pm UTC](https://www.ruby-forum.com/t/script-server-script/88406 "2007-03-14T19:21:37Z")

</div>

Hi all, I’m new to rails (and ruby) so bear with me. I’ve analysed script/server (and subsequent scripts) and as far as I can tell, the actions performed in a newly created rails app (on my GNU/Linux box running ligh…

---

## [SOS, huge doubt about ruby on rails](https://www.ruby-forum.com/t/sos-huge-doubt-about-ruby-on-rails/88818)

<div class="topic-metadata">

**Author:** [@burbu](https://www.ruby-forum.com/u/burbu)\
**Replies:** 3\
**Last updated:** [March 14, 2007, 6:34pm UTC](https://www.ruby-forum.com/t/sos-huge-doubt-about-ruby-on-rails/88818 "2007-03-14T18:34:42Z")

</div>

Hi, I have to do a web application where I have to use ruby on rails. I have read some about it, but a partner told me something that I don’t know if it is true. He told that creating a table of a data base ruby on ra…

---

## [REST and AJAX Validators](https://www.ruby-forum.com/t/rest-and-ajax-validators/88799)

<div class="topic-metadata">

**Author:** [@Fluffy\_Hippo](https://www.ruby-forum.com/u/Fluffy_Hippo)\
**Replies:** 2\
**Last updated:** [March 14, 2007, 5:32pm UTC](https://www.ruby-forum.com/t/rest-and-ajax-validators/88799 "2007-03-14T17:32:27Z")

</div>

So what’s the ‘right’ way to deal with AJAXY validators under REST? Say I have an observe\_field that checks against taken usernames, where do I stick the available\_user method? … it doesn’t seem to fit in the RESTful …

---

## [What's my problem ? named resources](https://www.ruby-forum.com/t/whats-my-problem-named-resources/88811)

<div class="topic-metadata">

**Author:** [@fbeausoleil](https://www.ruby-forum.com/u/fbeausoleil)\
**Replies:** 2\
**Last updated:** [March 14, 2007, 5:15pm UTC](https://www.ruby-forum.com/t/whats-my-problem-named-resources/88811 "2007-03-14T17:15:25Z")

</div>

Hi all, I really have a bad problem. I can’t make named resource paths to work. If I use this: def test\_can\_show get :show, :party\_id =\> @bob.id, :id =\> @address.id assert\_select “#address\_contact\_route\_#{@address…

---

## [New RAILS blog](https://www.ruby-forum.com/t/new-rails-blog/88812)

<div class="topic-metadata">

**Author:** [@eizesus](https://www.ruby-forum.com/u/eizesus)\
**Replies:** 0\
**Last updated:** [March 14, 2007, 5:06pm UTC](https://www.ruby-forum.com/t/new-rails-blog/88812 "2007-03-14T17:06:57Z")

</div>

Hi all, my blog is finally up, show me what you think.

---

## [Multiple File Uploads](https://www.ruby-forum.com/t/multiple-file-uploads/88628)

<div class="topic-metadata">

**Author:** [@plewizard](https://www.ruby-forum.com/u/plewizard)\
**Replies:** 5\
**Last updated:** [March 14, 2007, 4:31pm UTC](https://www.ruby-forum.com/t/multiple-file-uploads/88628 "2007-03-14T16:31:15Z")

</div>

Hey, I’m looking for a good and complete how to to implement multiple file uploads in a form. I’ve been looking for hours now, trying a few snippets or bits or various forums, and I’d love it if someone who had a rea…

---

## [SOS: PROBLEMA formulario web en ruby](https://www.ruby-forum.com/t/sos-problema-formulario-web-en-ruby/88797)

<div class="topic-metadata">

**Author:** [@burbu](https://www.ruby-forum.com/u/burbu)\
**Replies:** 2\
**Last updated:** [March 14, 2007, 4:21pm UTC](https://www.ruby-forum.com/t/sos-problema-formulario-web-en-ruby/88797 "2007-03-14T16:21:14Z")

</div>

Hola, Somos estudiantes de universidad y nos has pedido la traducciÃ³n de un cÃ³digo de php a ruby y la verdad es q no tenemos ni idea :S. La idea es que tenemos una web con un formulario de subscripciÃ³n a algo… Nue…

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

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