# Rails

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

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

---

## [:group usage](https://www.ruby-forum.com/t/group-usage/195399)

<div class="topic-metadata">

**Author:** [@icel](https://www.ruby-forum.com/u/icel)\
**Replies:** 0\
**Last updated:** [September 22, 2010, 6:03pm UTC](https://www.ruby-forum.com/t/group-usage/195399 "2010-09-22T18:03:19Z")

</div>

Hi, I have the following code that is close to working the way I want it to: Dispatch.find(:all, :group =\> :order\_id, :conditions =\> \[“ex\_factory\_date \< ?”, (Date.today + 1.month)\], :order =\> :ex\_factory\_date) So …

---

## [Not seeing error message from validates\_format\_of](https://www.ruby-forum.com/t/not-seeing-error-message-from-validates-format-of/195397)

<div class="topic-metadata">

**Author:** [@stillgar71](https://www.ruby-forum.com/u/stillgar71)\
**Replies:** 0\
**Last updated:** [September 22, 2010, 5:08pm UTC](https://www.ruby-forum.com/t/not-seeing-error-message-from-validates-format-of/195397 "2010-09-22T17:08:07Z")

</div>

Hi all any help at all on this is much appreciated. Code is below: I have a module with the standard Validate for email format and several validates in it. I have a form with the f.error.messages in it. I submit the …

---

## [Bundler picking up wrong version of Ruby with Rails 3 ( possible bundler bug )](https://www.ruby-forum.com/t/bundler-picking-up-wrong-version-of-ruby-with-rails-3-possible-bundler-bug/195378)

<div class="topic-metadata">

**Author:** [@manishchaks](https://www.ruby-forum.com/u/manishchaks)\
**Replies:** 1\
**Last updated:** [September 22, 2010, 5:07pm UTC](https://www.ruby-forum.com/t/bundler-picking-up-wrong-version-of-ruby-with-rails-3-possible-bundler-bug/195378 "2010-09-22T17:07:42Z")

</div>

Hello All, I am developing a JRuby on Rails 3 application. Standard stuff. I am facing problems getting autotest to run. Here’s the trace: % autotest loading autotest/rails\_rspec2 bundle exec /Users/manish/Foo/Foo…

---

## [Instances in an array](https://www.ruby-forum.com/t/instances-in-an-array/195385)

<div class="topic-metadata">

**Author:** [@mercurius](https://www.ruby-forum.com/u/mercurius)\
**Replies:** 5\
**Last updated:** [September 22, 2010, 4:17pm UTC](https://www.ruby-forum.com/t/instances-in-an-array/195385 "2010-09-22T16:17:12Z")

</div>

I’ve got a form that has several checkboxes on it with labels and values of A - E. I want to display the most commonly selected values. I also need to consider the possibility that a user may select equal numbers of e…

---

## [About uncomment â€œ match ':controller(/:act ion(/:id(.:format)))' â€](https://www.ruby-forum.com/t/about-uncomment-a-oe-match-controller-act-ion-id-format-a/195393)

<div class="topic-metadata">

**Author:** [@john-anes](https://www.ruby-forum.com/u/john-anes)\
**Replies:** 3\
**Last updated:** [September 22, 2010, 4:05pm UTC](https://www.ruby-forum.com/t/about-uncomment-a-oe-match-controller-act-ion-id-format-a/195393 "2010-09-22T16:05:02Z")

</div>

I am reading Agile Web D. with Rails, Edition 3. which is based on Rails 2.X now I am coding on Rails 3 So I go to the author’s website to see the difference between ver 2 and ver 3 In this webpage, 4.1 Creating …

---

## [Newbie: Instant rails =\> scaffold creation problem](https://www.ruby-forum.com/t/newbie-instant-rails-scaffold-creation-problem/195391)

<div class="topic-metadata">

**Author:** [@tanawatl](https://www.ruby-forum.com/u/tanawatl)\
**Replies:** 2\
**Last updated:** [September 22, 2010, 3:51pm UTC](https://www.ruby-forum.com/t/newbie-instant-rails-scaffold-creation-problem/195391 "2010-09-22T15:51:34Z")

</div>

I try to create scaffold in Instan-rails lastest version but the problem in the picture was found.What’s wrong and what should I do Thanks

---

## [Undifined method! driving me insane!](https://www.ruby-forum.com/t/undifined-method-driving-me-insane/195383)

<div class="topic-metadata">

**Author:** [@arowan](https://www.ruby-forum.com/u/arowan)\
**Replies:** 3\
**Last updated:** [September 22, 2010, 2:42pm UTC](https://www.ruby-forum.com/t/undifined-method-driving-me-insane/195383 "2010-09-22T14:42:16Z")

</div>

Hi all, im new to ruby on rails, this is my first project and im stuck on a rather (i expect) simple problem. :frowning: ive made a link \<%= link\_to “Profile”, show\_profile\_path %\> in my main application.html.erb i…

---

## [Performing field calculations](https://www.ruby-forum.com/t/performing-field-calculations/195377)

<div class="topic-metadata">

**Author:** [@swengineer](https://www.ruby-forum.com/u/swengineer)\
**Replies:** 12\
**Last updated:** [September 22, 2010, 2:32pm UTC](https://www.ruby-forum.com/t/performing-field-calculations/195377 "2010-09-22T14:32:52Z")

</div>

I have a small Rails application I’m creating. I have for example a field called “sales\_result”. I also have another two fields, namely, “price” and “quantity\_sold”. I have the following formula: sales\_result = price…

---

## [Is ruby-1.8.6 supports the japanese strings as filenames](https://www.ruby-forum.com/t/is-ruby-1-8-6-supports-the-japanese-strings-as-filenames/195386)

<div class="topic-metadata">

**Author:** [@bujji](https://www.ruby-forum.com/u/bujji)\
**Replies:** 0\
**Last updated:** [September 22, 2010, 2:21pm UTC](https://www.ruby-forum.com/t/is-ruby-1-8-6-supports-the-japanese-strings-as-filenames/195386 "2010-09-22T14:21:57Z")

</div>

Hi, my requirement is actually my filename is in japanese when i download the file the file name becomes garbled.i am using ruby-1.8.6 on windows.please help me thanks in advance

---

## [Replicate with different tables/fields names](https://www.ruby-forum.com/t/replicate-with-different-tables-fields-names/195384)

<div class="topic-metadata">

**Author:** [@AndrSSSS\_Martins](https://www.ruby-forum.com/u/AndrSSSS_Martins)\
**Replies:** 0\
**Last updated:** [September 22, 2010, 2:13pm UTC](https://www.ruby-forum.com/t/replicate-with-different-tables-fields-names/195384 "2010-09-22T14:13:10Z")

</div>

Hi everyone. I have a project that I have the arduous task of doing a replication system from a database with headquarters units. I tested and works very well with Rubyrep if the databases are identical. But the prob…

---

## [Dev server -- which Ruby?](https://www.ruby-forum.com/t/dev-server-which-ruby/195329)

<div class="topic-metadata">

**Author:** [@walterdavis](https://www.ruby-forum.com/u/walterdavis)\
**Replies:** 11\
**Last updated:** [September 22, 2010, 2:01pm UTC](https://www.ruby-forum.com/t/dev-server-which-ruby/195329 "2010-09-22T14:01:27Z")

</div>

I have a development server running Mac OS X Server 10.5, using Ruby 1.8.6. It’s been quite a while since I set this up, but I think I built it with Dan Benjamin’s recipe, so it might be a compiled from scratch Ruby, …

---

## [Iterate HashWithIndifferentAccess](https://www.ruby-forum.com/t/iterate-hashwithindifferentaccess/195334)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 6\
**Last updated:** [September 22, 2010, 1:29pm UTC](https://www.ruby-forum.com/t/iterate-hashwithindifferentaccess/195334 "2010-09-22T13:29:14Z")

</div>

How do I iterate a HashWithIndifferentAccess? I need to set the order using a sortable\_element.

---

## [Non-greedy matching in routes?](https://www.ruby-forum.com/t/non-greedy-matching-in-routes/195381)

<div class="topic-metadata">

**Author:** [@mksys](https://www.ruby-forum.com/u/mksys)\
**Replies:** 0\
**Last updated:** [September 22, 2010, 1:25pm UTC](https://www.ruby-forum.com/t/non-greedy-matching-in-routes/195381 "2010-09-22T13:25:43Z")

</div>

I am trying to create a route in Rails 3 that matching a url that consists of a country region and the title of the story. So a url would look something like this: http://www.website.com/gb-this-is-the-title-of-the-st…

---

## [How to skip x-axis in gruff line-graph](https://www.ruby-forum.com/t/how-to-skip-x-axis-in-gruff-line-graph/195382)

<div class="topic-metadata">

**Author:** [@venkat\_ruby](https://www.ruby-forum.com/u/venkat_ruby)\
**Replies:** 1\
**Last updated:** [September 22, 2010, 1:14pm UTC](https://www.ruby-forum.com/t/how-to-skip-x-axis-in-gruff-line-graph/195382 "2010-09-22T13:14:48Z")

</div>

Please open the below link… http://nubyonrails.com/pages/gruff In “Multi-Line Graph Test 400” graph. How to make white-color-line to start from 5/24(x-axis) instead of 5/6?

---

## [Calling a non-default method of my controller in my views?](https://www.ruby-forum.com/t/calling-a-non-default-method-of-my-controller-in-my-views/195342)

<div class="topic-metadata">

**Author:** [@rodrigo3n](https://www.ruby-forum.com/u/rodrigo3n)\
**Replies:** 2\
**Last updated:** [September 22, 2010, 1:09pm UTC](https://www.ruby-forum.com/t/calling-a-non-default-method-of-my-controller-in-my-views/195342 "2010-09-22T13:09:55Z")

</div>

Hello everyone, I have a messages\_controller, inside this controller, among all the default methods I have a tweet method that sends the message to twitter, and aside the ‘edit’ and ‘destroy’ links I want a 'tweet

---

## [ActiveRecord#touch behaviour in Rails 3](https://www.ruby-forum.com/t/activerecord-touch-behaviour-in-rails-3/195380)

<div class="topic-metadata">

**Author:** [@coriordan](https://www.ruby-forum.com/u/coriordan)\
**Replies:** 0\
**Last updated:** [September 22, 2010, 12:34pm UTC](https://www.ruby-forum.com/t/activerecord-touch-behaviour-in-rails-3/195380 "2010-09-22T12:34:12Z")

</div>

In Rails 2.x, calling touch on an ActiveRecord model would update the ‘lock\_version’ on the model, if it were present. It would produce something like this in SQL: UPDATE foo SET updated\_at = ‘2010-07-23 10:44:19’, \`l…

---

## [Api.rubyonrails.org](https://www.ruby-forum.com/t/api-rubyonrails-org/195305)

<div class="topic-metadata">

**Author:** [@retro](https://www.ruby-forum.com/u/retro)\
**Replies:** 4\
**Last updated:** [September 22, 2010, 9:42am UTC](https://www.ruby-forum.com/t/api-rubyonrails-org/195305 "2010-09-22T09:42:06Z")

</div>

Hello. Where I can find old template of api.rubyonrails.org ? I’m still developing 2.3.9 rails project and I want to generate that APIdoc style and use it on my localhost. Thanks, retro.

---

## [Problem in downloading large file apche+mongrel](https://www.ruby-forum.com/t/problem-in-downloading-large-file-apche-mongrel/195369)

<div class="topic-metadata">

**Author:** [@amit-singh](https://www.ruby-forum.com/u/amit-singh)\
**Replies:** 0\
**Last updated:** [September 22, 2010, 9:27am UTC](https://www.ruby-forum.com/t/problem-in-downloading-large-file-apche-mongrel/195369 "2010-09-22T09:27:53Z")

</div>

hii all, am using apache as frontend to mongrel and loaded xsendfile module in apache ,am looking for 1 GB of download .this is download routine def download @stream = Stream.find(params\[:id\]) send\_file(@stream.loca…

---

## [Who are using jruby?](https://www.ruby-forum.com/t/who-are-using-jruby/195367)

<div class="topic-metadata">

**Author:** [@msan](https://www.ruby-forum.com/u/msan)\
**Replies:** 0\
**Last updated:** [September 22, 2010, 9:05am UTC](https://www.ruby-forum.com/t/who-are-using-jruby/195367 "2010-09-22T09:05:48Z")

</div>

Hello. I would know if someone use jruby with rails for development. I’m using it and I’ve noticed no differences with classic ruby. I chose jruby because the deployment with war is easiest.

---

## [After\_update should not be called](https://www.ruby-forum.com/t/after-update-should-not-be-called/195363)

<div class="topic-metadata">

**Author:** [@crossblaim](https://www.ruby-forum.com/u/crossblaim)\
**Replies:** 0\
**Last updated:** [September 22, 2010, 8:22am UTC](https://www.ruby-forum.com/t/after-update-should-not-be-called/195363 "2010-09-22T08:22:17Z")

</div>

Hello, consider this code: http://pastie.org/1173871 Why after\_update in Subscription model gets called? I’m using Rails 3. Thanks

---

## [Change databaase column](https://www.ruby-forum.com/t/change-databaase-column/195303)

<div class="topic-metadata">

**Author:** [@hemantborole](https://www.ruby-forum.com/u/hemantborole)\
**Replies:** 2\
**Last updated:** [September 22, 2010, 8:13am UTC](https://www.ruby-forum.com/t/change-databaase-column/195303 "2010-09-22T08:13:44Z")

</div>

Guys, I have create this database column a while ago- t.date :interview\_date, :null =\> false means that this column can not have null value and then i deployed it on my server. Now i want this column to be changed as …

---

## [How to fetch fresh html for an Elabel map object](https://www.ruby-forum.com/t/how-to-fetch-fresh-html-for-an-elabel-map-object/195362)

<div class="topic-metadata">

**Author:** [@nephish](https://www.ruby-forum.com/u/nephish)\
**Replies:** 0\
**Last updated:** [September 22, 2010, 8:00am UTC](https://www.ruby-forum.com/t/how-to-fetch-fresh-html-for-an-elabel-map-object/195362 "2010-09-22T08:00:13Z")

</div>

Hey all, i am working with google maps and a function in the Elabel that i am using to put data on a map. In the docs for the Elabel, there is a function label.setContents(html) where html is what will go inside the …

---

## [Relaxation on Ruby on Rails Requirement](https://www.ruby-forum.com/t/relaxation-on-ruby-on-rails-requirement/195360)

<div class="topic-metadata">

**Author:** [@sunil](https://www.ruby-forum.com/u/sunil)\
**Replies:** 0\
**Last updated:** [September 22, 2010, 7:35am UTC](https://www.ruby-forum.com/t/relaxation-on-ruby-on-rails-requirement/195360 "2010-09-22T07:35:03Z")

</div>

Hi, We will consider the consultants even if they do not have Ruby/Ruby on Rails skills. So, a hard-core Java developer who has worked in an Opensource environment and are looking to learn and apply a new technology …

---

## [Upload form with uploadify jquery plugin](https://www.ruby-forum.com/t/upload-form-with-uploadify-jquery-plugin/195348)

<div class="topic-metadata">

**Author:** [@df-sean](https://www.ruby-forum.com/u/df-sean)\
**Replies:** 0\
**Last updated:** [September 22, 2010, 1:33am UTC](https://www.ruby-forum.com/t/upload-form-with-uploadify-jquery-plugin/195348 "2010-09-22T01:33:25Z")

</div>

I would like to integrate the uploadify plugin with a standard rails form. However I can’t figure out how to add a new field and have it get submitted with the file upload. I added a name field into the form, but th…

---

## [Calling a non-default method of my controller in my views?](https://www.ruby-forum.com/t/calling-a-non-default-method-of-my-controller-in-my-views/195343)

<div class="topic-metadata">

**Author:** [@rodrigo3n](https://www.ruby-forum.com/u/rodrigo3n)\
**Replies:** 1\
**Last updated:** [September 22, 2010, 12:22am UTC](https://www.ruby-forum.com/t/calling-a-non-default-method-of-my-controller-in-my-views/195343 "2010-09-22T00:22:24Z")

</div>

Hello everyone, I have a messages\_controller, inside this controller, among all the default methods I have a tweet method that sends the message to twitter, and aside the ‘edit’ and ‘destroy’ links I want a ‘tweet’ on…

---

## [Validates\_uniqueness\_of problem](https://www.ruby-forum.com/t/validates-uniqueness-of-problem/195344)

<div class="topic-metadata">

**Author:** [@giorgio](https://www.ruby-forum.com/u/giorgio)\
**Replies:** 0\
**Last updated:** [September 21, 2010, 11:36pm UTC](https://www.ruby-forum.com/t/validates-uniqueness-of-problem/195344 "2010-09-21T23:36:10Z")

</div>

I have an after\_save callback when I save an Organisation record. def after\_save #create an admin user for this organisation if self.users.size.zero? user=User.new(:organisation\_id=\>self.id, :first\_name =\> “Admin”, …

---

## [Background Task: How to?](https://www.ruby-forum.com/t/background-task-how-to/194541)

<div class="topic-metadata">

**Author:** [@rodrigo3n](https://www.ruby-forum.com/u/rodrigo3n)\
**Replies:** 2\
**Last updated:** [September 21, 2010, 11:05pm UTC](https://www.ruby-forum.com/t/background-task-how-to/194541 "2010-09-21T23:05:08Z")

</div>

Hello everyone, my app is Twitter based, and all I have to do is get the tweets of a given user and retweet it in other twitter profile… so when user1 tweets, user2 must automatically retweet. I think I must write som…

---

## [Ajax CSRF in Rails3](https://www.ruby-forum.com/t/ajax-csrf-in-rails3/195306)

<div class="topic-metadata">

**Author:** [@Ft51](https://www.ruby-forum.com/u/Ft51)\
**Replies:** 7\
**Last updated:** [September 21, 2010, 10:28pm UTC](https://www.ruby-forum.com/t/ajax-csrf-in-rails3/195306 "2010-09-21T22:28:15Z")

</div>

I’m using rails3. It does not seem to check the authenticity\_token when doing a POST using Ajax. I traced this to: module ActionDispatch class Request \< Rack::Request … def forgery\_whitelisted? get? || xhr? || cont…

---

## [Rails-2.3.8 routing question](https://www.ruby-forum.com/t/rails-2-3-8-routing-question/195336)

<div class="topic-metadata">

**Author:** [@byrnejb](https://www.ruby-forum.com/u/byrnejb)\
**Replies:** 1\
**Last updated:** [September 21, 2010, 10:04pm UTC](https://www.ruby-forum.com/t/rails-2-3-8-routing-question/195336 "2010-09-21T22:04:11Z")

</div>

I have a controller, customs\_shipment\_pars\_checks\_controller, that has an action :new. I wish to provide a shortcut url to this action tha bypasses any frontend pages and embedded links. In my routes.rb file I tried …

---

## [Sortable\_element and new ul](https://www.ruby-forum.com/t/sortable-element-and-new-ul/195285)

<div class="topic-metadata">

**Author:** [@paulbutcher](https://www.ruby-forum.com/u/paulbutcher)\
**Replies:** 5\
**Last updated:** [September 21, 2010, 10:03pm UTC](https://www.ruby-forum.com/t/sortable-element-and-new-ul/195285 "2010-09-21T22:03:25Z")

</div>

I have a sortable\_element, as a tree. I works great to add and remove from an existing sub list. But how do you create a new list under one element that doesn’t have a sub list before?

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

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