# Rails

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

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

---

## [GET the next INPUT element in a table TR](https://www.ruby-forum.com/t/get-the-next-input-element-in-a-table-tr/142881)

<div class="topic-metadata">

**Author:** [@flaubert](https://www.ruby-forum.com/u/flaubert)\
**Replies:** 2\
**Last updated:** [July 12, 2008, 11:35pm UTC](https://www.ruby-forum.com/t/get-the-next-input-element-in-a-table-tr/142881 "2008-07-12T23:35:34Z")

</div>

Hello, My app has an order. This order has products, which is chosen in a select list. each product is added by a partial like this: product1 “Onchange” a product, the price is updated via a…

---

## [Routes](https://www.ruby-forum.com/t/routes/142895)

<div class="topic-metadata">

**Author:** [@thor](https://www.ruby-forum.com/u/thor)\
**Replies:** 0\
**Last updated:** [July 12, 2008, 11:12pm UTC](https://www.ruby-forum.com/t/routes/142895 "2008-07-12T23:12:51Z")

</div>

I have an action: myapp/new to create a new record in the db. the form calls the create action which, if validation fails, returns the user to myapp/create is there a way to route the user back to myapp/new so they…

---

## [What's the meaning of @@?](https://www.ruby-forum.com/t/whats-the-meaning-of/142894)

<div class="topic-metadata">

**Author:** [@lz-coelho](https://www.ruby-forum.com/u/lz-coelho)\
**Replies:** 2\
**Last updated:** [July 12, 2008, 10:35pm UTC](https://www.ruby-forum.com/t/whats-the-meaning-of/142894 "2008-07-12T22:35:54Z")

</div>

I’m reading several files from RubyOnRails package, and this code: @@default\_error\_messages = { :inclusion =\> "is not included in the list", :exclusion =\> "is reserved", :invalid =\> "is invalid", :confirmation =\>…

---

## [Calculations on nested resources](https://www.ruby-forum.com/t/calculations-on-nested-resources/142880)

<div class="topic-metadata">

**Author:** [@roa](https://www.ruby-forum.com/u/roa)\
**Replies:** 3\
**Last updated:** [July 12, 2008, 10:23pm UTC](https://www.ruby-forum.com/t/calculations-on-nested-resources/142880 "2008-07-12T22:23:56Z")

</div>

Hi, I can’t seem to find a solution to the folowing problem. I have 3 resources that are all bound to eachother like this: class Item \< ActiveRecord::Base belongs\_to :item\_category // has a date and amount attr end …

---

## [No script/console](https://www.ruby-forum.com/t/no-script-console/142887)

<div class="topic-metadata">

**Author:** [@Jables](https://www.ruby-forum.com/u/Jables)\
**Replies:** 1\
**Last updated:** [July 12, 2008, 10:12pm UTC](https://www.ruby-forum.com/t/no-script-console/142887 "2008-07-12T22:12:29Z")

</div>

Hey, I was having problems which I though might be related to the version of rails I had so I deleted rails in the /vendor folder. My app works fine but I get this error when trying to go to console: Loading develop…

---

## [Forms](https://www.ruby-forum.com/t/forms/142893)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 1\
**Last updated:** [July 12, 2008, 10:11pm UTC](https://www.ruby-forum.com/t/forms/142893 "2008-07-12T22:11:54Z")

</div>

Hi, I have a form with two inputs, user and password. How do I access these two fields after a user fills them out and presses on the submit button? I want to pass these two values to an action, add\_user. How do I do …

---

## [Act as Taggable with Rails 2.0](https://www.ruby-forum.com/t/act-as-taggable-with-rails-2-0/142869)

<div class="topic-metadata">

**Author:** [@elle](https://www.ruby-forum.com/u/elle)\
**Replies:** 4\
**Last updated:** [July 12, 2008, 10:03pm UTC](https://www.ruby-forum.com/t/act-as-taggable-with-rails-2-0/142869 "2008-07-12T22:03:07Z")

</div>

I’ve posted a different question just before – but before I can try and get a better idea of my error message, I was trying to start my application and ran into other problems. My application was developed last year i…

---

## [SOS. How can I use dispatch.cgi from command line?](https://www.ruby-forum.com/t/sos-how-can-i-use-dispatch-cgi-from-command-line/142862)

<div class="topic-metadata">

**Author:** [@comopasta](https://www.ruby-forum.com/u/comopasta)\
**Replies:** 6\
**Last updated:** [July 12, 2008, 9:42pm UTC](https://www.ruby-forum.com/t/sos-how-can-i-use-dispatch-cgi-from-command-line/142862 "2008-07-12T21:42:25Z")

</div>

Hi, Arrgg. I’m getting nasty Premature end of script headers: dispatch.cgi, referer: http://www.myapp.com If I go to http://www.myapp.com I can get to the main page perfectly. But when I try to get to the login page h…

---

## [Displaying pdf file](https://www.ruby-forum.com/t/displaying-pdf-file/142890)

<div class="topic-metadata">

**Author:** [@arunraj](https://www.ruby-forum.com/u/arunraj)\
**Replies:** 1\
**Last updated:** [July 12, 2008, 9:06pm UTC](https://www.ruby-forum.com/t/displaying-pdf-file/142890 "2008-07-12T21:06:21Z")

</div>

hi I want to create a page which ll be able to display a pdf file. how to do tat?

---

## [Datetime\_select options! Where can I see them listed?](https://www.ruby-forum.com/t/datetime-select-options-where-can-i-see-them-listed/142889)

<div class="topic-metadata">

**Author:** [@elioncho](https://www.ruby-forum.com/u/elioncho)\
**Replies:** 1\
**Last updated:** [July 12, 2008, 8:48pm UTC](https://www.ruby-forum.com/t/datetime-select-options-where-can-i-see-them-listed/142889 "2008-07-12T20:48:48Z")

</div>

Hi I am trying to show a datetime through the datetime\_select method. I want to show a datetime input from the current year and month onward, but I need to know the options available for this method to do this. datet…

---

## [Json to ruby, clean up hashes and arrays](https://www.ruby-forum.com/t/json-to-ruby-clean-up-hashes-and-arrays/142886)

<div class="topic-metadata">

**Author:** [@scottnj](https://www.ruby-forum.com/u/scottnj)\
**Replies:** 1\
**Last updated:** [July 12, 2008, 8:42pm UTC](https://www.ruby-forum.com/t/json-to-ruby-clean-up-hashes-and-arrays/142886 "2008-07-12T20:42:22Z")

</div>

i am trying to convert a json object to a ruby object in a format that is easy to work with. i use the json.decode and that converts it to ruby as hashes and arrays like it should. the part i am trying to figure out i…

---

## [To\_json in Rails 2.0.2 not generating proper json?](https://www.ruby-forum.com/t/to-json-in-rails-2-0-2-not-generating-proper-json/142891)

<div class="topic-metadata">

**Author:** [@victor](https://www.ruby-forum.com/u/victor)\
**Replies:** 0\
**Last updated:** [July 12, 2008, 8:40pm UTC](https://www.ruby-forum.com/t/to-json-in-rails-2-0-2-not-generating-proper-json/142891 "2008-07-12T20:40:36Z")

</div>

I am using Rails 2.0.2 and trying to use to\_json to generate json. I notice several problems. datetime field such as created\_at mapped to “created\_at”: {} :except does not work, @post.to\_json(:except =\> \[:created\_at,…

---

## [Limits on Postgresql integers not respected](https://www.ruby-forum.com/t/limits-on-postgresql-integers-not-respected/142885)

<div class="topic-metadata">

**Author:** [@raam](https://www.ruby-forum.com/u/raam)\
**Replies:** 0\
**Last updated:** [July 12, 2008, 8:15pm UTC](https://www.ruby-forum.com/t/limits-on-postgresql-integers-not-respected/142885 "2008-07-12T20:15:26Z")

</div>

Hi, I find that limits on postgresql integers are not respected in Rails 2.1. For example setting t.integer :employee\_id, :limit =\> 8 resolves to a regular int in schema.rb: t.integer :employee\_id Is there a quick…

---

## [Expected ... to define](https://www.ruby-forum.com/t/expected-to-define/65260)

<div class="topic-metadata">

**Author:** [@juan](https://www.ruby-forum.com/u/juan)\
**Replies:** 10\
**Last updated:** [July 12, 2008, 5:10pm UTC](https://www.ruby-forum.com/t/expected-to-define/65260 "2008-07-12T17:10:50Z")

</div>

Hi, I have edge frozen on vendor, and getting these errors logged: Expected …/config/…/app/controllers/store\_controller.rb to define StoreController …/config/…/vendor/rails/activerecord/lib/…/…/activesupport/lib/acti…

---

## [Looking for suggestions](https://www.ruby-forum.com/t/looking-for-suggestions/142879)

<div class="topic-metadata">

**Author:** [@sadeesh\_kumar](https://www.ruby-forum.com/u/sadeesh_kumar)\
**Replies:** 0\
**Last updated:** [July 12, 2008, 4:09pm UTC](https://www.ruby-forum.com/t/looking-for-suggestions/142879 "2008-07-12T16:09:39Z")

</div>

Anyone could follow this topic(url) which i posted some time before and suggest me? http://groups.google.com/group/rubyonrails-talk/browse\_thread/thread/f2e6c2638c04aa8d/04b47250f9203ee4#04b47250f9203ee4 please? Than…

---

## [Might be ORM problem](https://www.ruby-forum.com/t/might-be-orm-problem/196740)

<div class="topic-metadata">

**Author:** [@sadeesh\_kumar](https://www.ruby-forum.com/u/sadeesh_kumar)\
**Replies:** 0\
**Last updated:** [July 12, 2008, 11:23am UTC](https://www.ruby-forum.com/t/might-be-orm-problem/196740 "2008-07-12T11:23:34Z")

</div>

Hi, I have a model user.rb, a controller userdata\_controller, methods in the controller and respective .rhtml files. I created a registration page. Saved into users table and it works fine. But sometimes its throwing…

---

## [Might be ORM problem](https://www.ruby-forum.com/t/might-be-orm-problem/142865)

<div class="topic-metadata">

**Author:** [@sadeesh\_kumar](https://www.ruby-forum.com/u/sadeesh_kumar)\
**Replies:** 0\
**Last updated:** [July 12, 2008, 11:21am UTC](https://www.ruby-forum.com/t/might-be-orm-problem/142865 "2008-07-12T11:21:48Z")

</div>

Hi, I have a model user.rb, a controller userdata\_controller, methods in the controller and respective .rhtml files. I created a registration page. Saved into users table and it works fine. But sometimes its throwing…

---

## [Might be ORM problem](https://www.ruby-forum.com/t/might-be-orm-problem/197081)

<div class="topic-metadata">

**Author:** [@sadeesh\_kumar](https://www.ruby-forum.com/u/sadeesh_kumar)\
**Replies:** 0\
**Last updated:** [July 12, 2008, 11:20am UTC](https://www.ruby-forum.com/t/might-be-orm-problem/197081 "2008-07-12T11:20:38Z")

</div>

Hi, I have a model user.rb, a controller userdata\_controller, methods in the controller and respective .rhtml files. I created a registration page. Saved into users table and it works fine. But sometimes its throwing…

---

## [Create db row in my partial template](https://www.ruby-forum.com/t/create-db-row-in-my-partial-template/142850)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 6\
**Last updated:** [July 12, 2008, 9:26am UTC](https://www.ruby-forum.com/t/create-db-row-in-my-partial-template/142850 "2008-07-12T09:26:23Z")

</div>

Hi, When I use script/generate scaffold for my db it automatically creates that page where I can select to add a new item to the database. In the controller, the create method looks like this: def create @user = Use…

---

## [One to Many Relational database](https://www.ruby-forum.com/t/one-to-many-relational-database/142708)

<div class="topic-metadata">

**Author:** [@advait](https://www.ruby-forum.com/u/advait)\
**Replies:** 2\
**Last updated:** [July 12, 2008, 8:16am UTC](https://www.ruby-forum.com/t/one-to-many-relational-database/142708 "2008-07-12T08:16:41Z")

</div>

Hi All, I have established the relationship and everything is working well, but I need to display as descried below. I have two tables Student and Teacher. In my application one teacher has several students under h…

---

## [Resolv.getname](https://www.ruby-forum.com/t/resolv-getname/142857)

<div class="topic-metadata">

**Author:** [@giorgio](https://www.ruby-forum.com/u/giorgio)\
**Replies:** 0\
**Last updated:** [July 12, 2008, 6:28am UTC](https://www.ruby-forum.com/t/resolv-getname/142857 "2008-07-12T06:28:10Z")

</div>

Hi, I have been using Resolv.getname to verify that a callback has come from our secure payments processor. If I do: nslookup 155.136.68.24 I get: Non-authoritative answer: 24.68.136.155.in-addr.arpa name = w…

---

## [Models in folders weirdness](https://www.ruby-forum.com/t/models-in-folders-weirdness/142855)

<div class="topic-metadata">

**Author:** [@dcarneiro](https://www.ruby-forum.com/u/dcarneiro)\
**Replies:** 0\
**Last updated:** [July 12, 2008, 5:36am UTC](https://www.ruby-forum.com/t/models-in-folders-weirdness/142855 "2008-07-12T05:36:15Z")

</div>

Some of my models are in folders to add some organization to what will eventually be hundreds of models. Somewhere I read that if you put config.load\_paths += Dir\[RAILS\_ROOT + ‘/app/models/\*/’\] in your environment.rb …

---

## [Rails 2 fixtures not working](https://www.ruby-forum.com/t/rails-2-fixtures-not-working/142852)

<div class="topic-metadata">

**Author:** [@yetanothergeek](https://www.ruby-forum.com/u/yetanothergeek)\
**Replies:** 2\
**Last updated:** [July 12, 2008, 5:02am UTC](https://www.ruby-forum.com/t/rails-2-fixtures-not-working/142852 "2008-07-12T05:02:22Z")

</div>

I upgraded my 1.2.6 app to 2.0.2 with all tests passing. I then rewrote the fixtures with the new rails 2 ‘foxy fixtures’ style, e.g. referencing fixture names instead of ids. I’m now getting a ton of errors like the …

---

## [Fun JSON question](https://www.ruby-forum.com/t/fun-json-question/142851)

<div class="topic-metadata">

**Author:** [@Jeff.Corcoran](https://www.ruby-forum.com/u/Jeff.Corcoran)\
**Replies:** 1\
**Last updated:** [July 12, 2008, 4:52am UTC](https://www.ruby-forum.com/t/fun-json-question/142851 "2008-07-12T04:52:51Z")

</div>

Ok, I have the following JSON string (some things are removed for privacy): addresses = \[{“address”: {“lng”: “-178.7098”,“lat”: “43.2818”}}, {“address”: {“lng”: “-178.7041”,“lat”: “43.2789”}}, {“address”: {“lng”: “-1…

---

## [ArgumentError when setting ActionMailer](https://www.ruby-forum.com/t/argumenterror-when-setting-actionmailer/142847)

<div class="topic-metadata">

**Author:** [@adinda\_p](https://www.ruby-forum.com/u/adinda_p)\
**Replies:** 1\
**Last updated:** [July 12, 2008, 4:30am UTC](https://www.ruby-forum.com/t/argumenterror-when-setting-actionmailer/142847 "2008-07-12T04:30:38Z")

</div>

Hi all, I don’ know what’s wrong in my setting. I put as it said in books, tutorials and recheck it in the api ref. ActionMailer::Base.delivery\_method :sendmail When i start the server (Mongrel), i got this error: c…

---

## [CSS question](https://www.ruby-forum.com/t/css-question/142843)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 1\
**Last updated:** [July 12, 2008, 3:49am UTC](https://www.ruby-forum.com/t/css-question/142843 "2008-07-12T03:49:05Z")

</div>

\#user-header A:link So I have a div id ‘user-header’ and i want to make a new class of A:link, how would I do this?? Thanks

---

## [Display 5 instead of 5.00 with decimals](https://www.ruby-forum.com/t/display-5-instead-of-5-00-with-decimals/142845)

<div class="topic-metadata">

**Author:** [@arvias](https://www.ruby-forum.com/u/arvias)\
**Replies:** 1\
**Last updated:** [July 12, 2008, 2:27am UTC](https://www.ruby-forum.com/t/display-5-instead-of-5-00-with-decimals/142845 "2008-07-12T02:27:09Z")

</div>

Hi, Is there a rails wide solution that would show decimals like “5.00” as “5” in both views and forms? I guess it would presume overwriting the BigDecimal class, but I have no idea how. – M.

---

## [Strange error message](https://www.ruby-forum.com/t/strange-error-message/142796)

<div class="topic-metadata">

**Author:** [@snantz](https://www.ruby-forum.com/u/snantz)\
**Replies:** 1\
**Last updated:** [July 12, 2008, 12:04am UTC](https://www.ruby-forum.com/t/strange-error-message/142796 "2008-07-12T00:04:30Z")

</div>

I have this link for an expiration date of a credit card and when you click on that link you can edit that expiration date of the credit card through two drop-downs. On the year drop down when u select a year a remote…

---

## [Curling REST controllers behind restful\_authentication](https://www.ruby-forum.com/t/curling-rest-controllers-behind-restful-authentication/142807)

<div class="topic-metadata">

**Author:** [@thejackal](https://www.ruby-forum.com/u/thejackal)\
**Replies:** 4\
**Last updated:** [July 11, 2008, 11:56pm UTC](https://www.ruby-forum.com/t/curling-rest-controllers-behind-restful-authentication/142807 "2008-07-11T23:56:18Z")

</div>

Hello, I am trying to access a REST controller from a Native C# Windows Mobile client and I am having some problems since I am using the restful\_authentication plug in. I decided to test the availability of the resou…

---

## [Does anyone know how to build the SHOW template as Fieldname (left side) -\> value (right side)?](https://www.ruby-forum.com/t/does-anyone-know-how-to-build-the-show-template-as-fieldname-left-side-value-right-side/142826)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 5\
**Last updated:** [July 11, 2008, 11:01pm UTC](https://www.ruby-forum.com/t/does-anyone-know-how-to-build-the-show-template-as-fieldname-left-side-value-right-side/142826 "2008-07-11T23:01:49Z")

</div>

I am a self admitted .css bumbler in Rails. I steal bits of .css stylesheets from assorted projects and have completed some large projects, but their .css is a mystery to me. My goal is to make my SHOW view(s) show th…

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

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