# Rails

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

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

---

## [Specify Rails version for Rage db:migrate](https://www.ruby-forum.com/t/specify-rails-version-for-rage-db-migrate/143100)

<div class="topic-metadata">

**Author:** [@hildegunst](https://www.ruby-forum.com/u/hildegunst)\
**Replies:** 0\
**Last updated:** [July 15, 2008, 9:18am UTC](https://www.ruby-forum.com/t/specify-rails-version-for-rage-db-migrate/143100 "2008-07-15T09:18:46Z")

</div>

Hi all, I have a problem while trying to migrate using Rake. I have two versions of Rails on the server and want to specify the one (the older in this case) to be used by rake. I tried rake migrate RAILS\_GEM\_VERSION…

---

## [Dynamic dropdown](https://www.ruby-forum.com/t/dynamic-dropdown/143097)

<div class="topic-metadata">

**Author:** [@jaiganez](https://www.ruby-forum.com/u/jaiganez)\
**Replies:** 1\
**Last updated:** [July 15, 2008, 8:18am UTC](https://www.ruby-forum.com/t/dynamic-dropdown/143097 "2008-07-15T08:18:01Z")

</div>

im working on the code in this link… PullMonkey Blog » Blog Archive » Dynamic Select Boxes – Ruby on Rails… i cant able to dynamically select values in second and third dropdown using onchange event … any suggestions …

---

## [Restful\_authentication vs "from scratch"](https://www.ruby-forum.com/t/restful-authentication-vs-from-scratch/142953)

<div class="topic-metadata">

**Author:** [@snitko](https://www.ruby-forum.com/u/snitko)\
**Replies:** 1\
**Last updated:** [July 15, 2008, 7:46am UTC](https://www.ruby-forum.com/t/restful-authentication-vs-from-scratch/142953 "2008-07-15T07:46:25Z")

</div>

I’ve never done authentication in rails, so please don’t be rigorous. The first thought was to use restful\_authentication plugin. Since I found no api online, and all instructions said, I have to use generator (which …

---

## [Active record - sorting (ordering) of results](https://www.ruby-forum.com/t/active-record-sorting-ordering-of-results/142990)

<div class="topic-metadata">

**Author:** [@unni123](https://www.ruby-forum.com/u/unni123)\
**Replies:** 2\
**Last updated:** [July 15, 2008, 7:15am UTC](https://www.ruby-forum.com/t/active-record-sorting-ordering-of-results/142990 "2008-07-15T07:15:15Z")

</div>

I have a model User. User has\_one Profile. Profile has a field first\_name. I want to get users from User table, ordered by his first\_name (which is a field in Profile table). Is it possible? how do i do it? Thanks U…

---

## [Predicate Builder form for Rails..?](https://www.ruby-forum.com/t/predicate-builder-form-for-rails/143096)

<div class="topic-metadata">

**Author:** [@dhmspector](https://www.ruby-forum.com/u/dhmspector)\
**Replies:** 0\
**Last updated:** [July 15, 2008, 7:04am UTC](https://www.ruby-forum.com/t/predicate-builder-form-for-rails/143096 "2008-07-15T07:04:33Z")

</div>

I am trying to build a search form that allow the user to specify various conditions for the search - anyone seen an OSX-like predicate builder form for Rails? (think iTunes smart play lists or Mail.app’s smart mailbo…

---

## [How to justify text in text\_field\_tag](https://www.ruby-forum.com/t/how-to-justify-text-in-text-field-tag/142918)

<div class="topic-metadata">

**Author:** [@alexd](https://www.ruby-forum.com/u/alexd)\
**Replies:** 4\
**Last updated:** [July 15, 2008, 4:30am UTC](https://www.ruby-forum.com/t/how-to-justify-text-in-text-field-tag/142918 "2008-07-15T04:30:34Z")

</div>

I would like to have the text in a text\_field\_tag right justified instead of left justified. Is there a way to do this? Thanks, Alex

---

## [Is Rails DRY?](https://www.ruby-forum.com/t/is-rails-dry/143028)

<div class="topic-metadata">

**Author:** [@llinklater](https://www.ruby-forum.com/u/llinklater)\
**Replies:** 4\
**Last updated:** [July 15, 2008, 3:54am UTC](https://www.ruby-forum.com/t/is-rails-dry/143028 "2008-07-15T03:54:49Z")

</div>

I note that every time a new rails app is made, there is a huge bunch of directories and files generated. As this is the same thing every time, is it really DRY? It just seems that there would be a way to have a sta…

---

## [Html formatting of json objects for email output](https://www.ruby-forum.com/t/html-formatting-of-json-objects-for-email-output/143088)

<div class="topic-metadata">

**Author:** [@joel](https://www.ruby-forum.com/u/joel)\
**Replies:** 0\
**Last updated:** [July 15, 2008, 3:48am UTC](https://www.ruby-forum.com/t/html-formatting-of-json-objects-for-email-output/143088 "2008-07-15T03:48:57Z")

</div>

Hello, just wanted to know if you knew a way of formatting json objects for ht;l output in a mail. I mean indentation and/or atributes highlighting… Thanks in advance, Joel

---

## [Scaffold and Money Error?](https://www.ruby-forum.com/t/scaffold-and-money-error/143041)

<div class="topic-metadata">

**Author:** [@GabrielG1976](https://www.ruby-forum.com/u/GabrielG1976)\
**Replies:** 1\
**Last updated:** [July 15, 2008, 2:24am UTC](https://www.ruby-forum.com/t/scaffold-and-money-error/143041 "2008-07-15T02:24:56Z")

</div>

this is the error Im Getting I generated a scaffold with a decimal when it generated it does this error /staff\_scheduler/app/controllers/log\_entries\_controller.rb:28: formal argument cannot be a constant def newql(Mo…

---

## [Googlebot crawls parameter to Ajax.Autocompleter](https://www.ruby-forum.com/t/googlebot-crawls-parameter-to-ajax-autocompleter/143070)

<div class="topic-metadata">

**Author:** [@chovy](https://www.ruby-forum.com/u/chovy)\
**Replies:** 1\
**Last updated:** [July 15, 2008, 1:30am UTC](https://www.ruby-forum.com/t/googlebot-crawls-parameter-to-ajax-autocompleter/143070 "2008-07-15T01:30:16Z")

</div>

I’m using the autocomplete plugin for Rails, and have this code in all pages (within tags): var product\_title\_auto\_completer = new Ajax.Autocompleter(‘product\_title’, ‘product\_title\_auto\_complete’, ‘/store/auto\_comp…

---

## [Radio Show - Agile Development](https://www.ruby-forum.com/t/radio-show-agile-development/143078)

<div class="topic-metadata">

**Author:** [@avix](https://www.ruby-forum.com/u/avix)\
**Replies:** 0\
**Last updated:** [July 15, 2008, 12:33am UTC](https://www.ruby-forum.com/t/radio-show-agile-development/143078 "2008-07-15T00:33:49Z")

</div>

‘Please join Steve and renowned Agile development expert Paul Kilpp; this Wednesday at 12pm EST as they discuss Agile Estimation, on “Steve on Spec Radio” (Avity Radio Online Radio | BlogTalkRadio)’

---

## [Help needed in rails view](https://www.ruby-forum.com/t/help-needed-in-rails-view/143053)

<div class="topic-metadata">

**Author:** [@mitkok](https://www.ruby-forum.com/u/mitkok)\
**Replies:** 5\
**Last updated:** [July 14, 2008, 11:41pm UTC](https://www.ruby-forum.com/t/help-needed-in-rails-view/143053 "2008-07-14T23:41:02Z")

</div>

Hi, guys. I’m new in Rails and now I’m playing around with it. I’m writing simple test system. The basic stuff is at http://pastie.org/233197 The thing is I don’t know how to get the answer and the suggestions and p…

---

## [Using ActiveRecord validations on a non ActiveRecord Model](https://www.ruby-forum.com/t/using-activerecord-validations-on-a-non-activerecord-model/143015)

<div class="topic-metadata">

**Author:** [@fipa](https://www.ruby-forum.com/u/fipa)\
**Replies:** 10\
**Last updated:** [July 14, 2008, 11:19pm UTC](https://www.ruby-forum.com/t/using-activerecord-validations-on-a-non-activerecord-model/143015 "2008-07-14T23:19:06Z")

</div>

Hi, In order to keep code clean and well organized using MVC, I have created a model which doesn’t inherit from ActiveRecord as it doesn’t use the database. What I would like to do is use ActiveRecord validation such…

---

## [Join model between three models, has\_many :through with parameters (add join condition)](https://www.ruby-forum.com/t/join-model-between-three-models-has-many-through-with-parameters-add-join-condition/143071)

<div class="topic-metadata">

**Author:** [@eduardo](https://www.ruby-forum.com/u/eduardo)\
**Replies:** 0\
**Last updated:** [July 14, 2008, 11:07pm UTC](https://www.ruby-forum.com/t/join-model-between-three-models-has-many-through-with-parameters-add-join-condition/143071 "2008-07-14T23:07:31Z")

</div>

I have a join model (context) that ties three models together (files, versions, sentences). Sentences have a translation. translation \<-- sentences | | files----(context)----versions files-\> has\_many :sentences, :…

---

## [Capistrano option "--apply-to" is invalid](https://www.ruby-forum.com/t/capistrano-option-apply-to-is-invalid/143068)

<div class="topic-metadata">

**Author:** [@alexd](https://www.ruby-forum.com/u/alexd)\
**Replies:** 2\
**Last updated:** [July 14, 2008, 10:58pm UTC](https://www.ruby-forum.com/t/capistrano-option-apply-to-is-invalid/143068 "2008-07-14T22:58:01Z")

</div>

I’m attempting to follow the instructions in “Agile Web D. with Rails” for deploying a Rails application. On page 625 it tells me to type “cap --apply-to /local/project/path \[applicationname\]” My application is calle…

---

## [Mongrel freeze](https://www.ruby-forum.com/t/mongrel-freeze/143039)

<div class="topic-metadata">

**Author:** [@billv](https://www.ruby-forum.com/u/billv)\
**Replies:** 1\
**Last updated:** [July 14, 2008, 10:55pm UTC](https://www.ruby-forum.com/t/mongrel-freeze/143039 "2008-07-14T22:55:13Z")

</div>

Hi, I have had trouble with mongrel freezing after a period of inactivity. Following the advice from the mongrel FAQ, I added: ActiveRecord::Base.verification\_timeout = 14400 to my environment.rb file. Unfortunatel…

---

## [Render :text =\> ... encoding error?](https://www.ruby-forum.com/t/render-text-encoding-error/143054)

<div class="topic-metadata">

**Author:** [@jimc](https://www.ruby-forum.com/u/jimc)\
**Replies:** 2\
**Last updated:** [July 14, 2008, 10:25pm UTC](https://www.ruby-forum.com/t/render-text-encoding-error/143054 "2008-07-14T22:25:34Z")

</div>

render :text =\> “stuff \<#{@app || ‘no app’}\>” displays in browser as “stuff” (no quotes) this occurs independent of whether @app has a value, and either way, the “\<” and “\>” should be rendered. i haven’t an idea what…

---

## [Limit the data displayed in the index view with a select box](https://www.ruby-forum.com/t/limit-the-data-displayed-in-the-index-view-with-a-select-box/143044)

<div class="topic-metadata">

**Author:** [@oldbug](https://www.ruby-forum.com/u/oldbug)\
**Replies:** 1\
**Last updated:** [July 14, 2008, 10:03pm UTC](https://www.ruby-forum.com/t/limit-the-data-displayed-in-the-index-view-with-a-select-box/143044 "2008-07-14T22:03:53Z")

</div>

Hello, Please be prepared for some very basic, very newbie, very HTML-beginner, knows-nothing-about-AJAX questions… I have a (RESTful, if it makes any difference) application that displays a ton of data (names of doc…

---

## [How to Loop through mulitple field data no model](https://www.ruby-forum.com/t/how-to-loop-through-mulitple-field-data-no-model/142833)

<div class="topic-metadata">

**Author:** [@mitch\_newbie](https://www.ruby-forum.com/u/mitch_newbie)\
**Replies:** 6\
**Last updated:** [July 14, 2008, 9:39pm UTC](https://www.ruby-forum.com/t/how-to-loop-through-mulitple-field-data-no-model/142833 "2008-07-14T21:39:15Z")

</div>

I am creating a form for users to add part information. I want to include 5 text fields to gather part numbers. The user then submits the forms. Question: Is there a ruby way to loop through the form fields info and …

---

## [Ajax form](https://www.ruby-forum.com/t/ajax-form/143059)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 1\
**Last updated:** [July 14, 2008, 9:36pm UTC](https://www.ruby-forum.com/t/ajax-form/143059 "2008-07-14T21:36:45Z")

</div>

\<% form\_remote\_for :user, @user, :url =\> { :action =\> “create” } do |f| %\> . . \<%= submit\_tag “Add user” %\> controller: def create @user = User.new(params\[:user\]) if @user.save if(request.xhr?) flash\[:…

---

## [IText PDF Won't Permit Encryption?](https://www.ruby-forum.com/t/itext-pdf-wont-permit-encryption/143052)

<div class="topic-metadata">

**Author:** [@ror\_arch](https://www.ruby-forum.com/u/ror_arch)\
**Replies:** 0\
**Last updated:** [July 14, 2008, 8:50pm UTC](https://www.ruby-forum.com/t/itext-pdf-wont-permit-encryption/143052 "2008-07-14T20:50:53Z")

</div>

I am attempting to encrypt the file that is generated by Itext: def download str = Rjb::import(“java.lang.String”); pw = Rjb::import(“com.lowagie.text.pdf.PdfWriter”) d = Rjb::import(“com.lowagie.text.Document”) ba…

---

## [Insert select statements from different database](https://www.ruby-forum.com/t/insert-select-statements-from-different-database/143037)

<div class="topic-metadata">

**Author:** [@monsterag](https://www.ruby-forum.com/u/monsterag)\
**Replies:** 3\
**Last updated:** [July 14, 2008, 8:22pm UTC](https://www.ruby-forum.com/t/insert-select-statements-from-different-database/143037 "2008-07-14T20:22:46Z")

</div>

Hello, i want to insert a select field into my form. The fields of the select-field should come from a database that is created in a different modell in the same project. I donÂ´t need relations simply the content fr…

---

## [Live search](https://www.ruby-forum.com/t/live-search/143047)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 0\
**Last updated:** [July 14, 2008, 7:50pm UTC](https://www.ruby-forum.com/t/live-search/143047 "2008-07-14T19:50:49Z")

</div>

def get\_results if request.xhr? if params\[‘search\_text’\].strip.length \> 0 terms = params\[‘search\_text’\].split.collect do |word| “%#{word.downcase}%” end @users = User.find( :all, :conditions =\> \[ ( \["(LOWER(emai…

---

## [NoMethodError in UserController#login](https://www.ruby-forum.com/t/nomethoderror-in-usercontroller-login/143040)

<div class="topic-metadata">

**Author:** [@morgan](https://www.ruby-forum.com/u/morgan)\
**Replies:** 3\
**Last updated:** [July 14, 2008, 7:23pm UTC](https://www.ruby-forum.com/t/nomethoderror-in-usercontroller-login/143040 "2008-07-14T19:23:53Z")

</div>

this is the bit of code i’m having a problem with… the odd thing… if i remove all the code in the def login, reload the page so the view actually shows up put the code back in the def login and submit the form… it…

---

## [How can i use link\_to\_remote with in form\_for](https://www.ruby-forum.com/t/how-can-i-use-link-to-remote-with-in-form-for/143032)

<div class="topic-metadata">

**Author:** [@palani](https://www.ruby-forum.com/u/palani)\
**Replies:** 5\
**Last updated:** [July 14, 2008, 6:45pm UTC](https://www.ruby-forum.com/t/how-can-i-use-link-to-remote-with-in-form-for/143032 "2008-07-14T18:45:59Z")

</div>

Hi anybody plz help me how can i use link\_to\_remote with in form\_for… i tried but no luck… if i use form\_tag i can able to use link\_to\_remote and made ajax call.but i need to use form\_for …can anyone help me how can …

---

## [Deployment strategy to multiple servers with differing roles](https://www.ruby-forum.com/t/deployment-strategy-to-multiple-servers-with-differing-roles/142002)

<div class="topic-metadata">

**Author:** [@s0nspark](https://www.ruby-forum.com/u/s0nspark)\
**Replies:** 4\
**Last updated:** [July 14, 2008, 6:28pm UTC](https://www.ruby-forum.com/t/deployment-strategy-to-multiple-servers-with-differing-roles/142002 "2008-07-14T18:28:24Z")

</div>

I am in the process of migrating several rails apps from a single server that runs nginx, mongrel, and mysql to separate (virtual) servers and am wondering if I am, perhaps, overthinking my new deployment strategy. I …

---

## [RJS visual effect](https://www.ruby-forum.com/t/rjs-visual-effect/142967)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 3\
**Last updated:** [July 14, 2008, 6:26pm UTC](https://www.ruby-forum.com/t/rjs-visual-effect/142967 "2008-07-14T18:26:37Z")

</div>

def show\_add\_user if(request.xhr?) render :update do |rjs| rjs.replace\_html :add\_user\_form, :partial =\> ‘form’ end else redirect\_to\_index end end How do I add a visual effect to that? Thanks

---

## [Stylesheet\_link\_tag doesn't work suddently](https://www.ruby-forum.com/t/stylesheet-link-tag-doesnt-work-suddently/142921)

<div class="topic-metadata">

**Author:** [@itkin](https://www.ruby-forum.com/u/itkin)\
**Replies:** 2\
**Last updated:** [July 14, 2008, 6:26pm UTC](https://www.ruby-forum.com/t/stylesheet-link-tag-doesnt-work-suddently/142921 "2008-07-14T18:26:33Z")

</div>

hi ! \<%= stylesheet\_link\_tag ‘source’ %\> generate instead of was working fine untill now i don’t understand what happened…

---

## [Allow users to embed video](https://www.ruby-forum.com/t/allow-users-to-embed-video/143012)

<div class="topic-metadata">

**Author:** [@dino\_d](https://www.ruby-forum.com/u/dino_d)\
**Replies:** 3\
**Last updated:** [July 14, 2008, 6:26pm UTC](https://www.ruby-forum.com/t/allow-users-to-embed-video/143012 "2008-07-14T18:26:02Z")

</div>

Hi - Anyone have any experience with safely allowing users to enter a YouTube or other such embed link safely into a form for later display? Is there a simple way to selective sanitize/escape and only allow embedded…

---

## [Making a row a link?](https://www.ruby-forum.com/t/making-a-row-a-link/142960)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 7\
**Last updated:** [July 14, 2008, 6:14pm UTC](https://www.ruby-forum.com/t/making-a-row-a-link/142960 "2008-07-14T18:14:53Z")

</div>

How can I make a clickable, to invoke an action? Thanks!

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

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