# Rails

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

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

---

## [Rspec problem "undefined method \`should\_recieve'"](https://www.ruby-forum.com/t/rspec-problem-undefined-method-should-recieve/142976)

<div class="topic-metadata">

**Author:** [@J\_Poz](https://www.ruby-forum.com/u/J_Poz)\
**Replies:** 1\
**Last updated:** [July 14, 2008, 5:41am UTC](https://www.ruby-forum.com/t/rspec-problem-undefined-method-should-recieve/142976 "2008-07-14T05:41:49Z")

</div>

Hello all, I’ve been bashing my head against the wall this this one, and can find anything about why this would be happening. I keep getting "undefined method \`should\_recieve’ " when ever I’m trying to mock a model w…

---

## [Javascript](https://www.ruby-forum.com/t/javascript/142775)

<div class="topic-metadata">

**Author:** [@jaiganez](https://www.ruby-forum.com/u/jaiganez)\
**Replies:** 4\
**Last updated:** [July 14, 2008, 5:39am UTC](https://www.ruby-forum.com/t/javascript/142775 "2008-07-14T05:39:36Z")

</div>

i’ve written script function ganesh.js inside “public/javascripts/” path… ganesh.js… function gan() { alert(‘hai’); } ive called that function in show.rhtml file like \<%= image\_tag(‘e.image’, {:id =\> e.id, :onl…

---

## [Will\_paginate paginates all instead of subclass](https://www.ruby-forum.com/t/will-paginate-paginates-all-instead-of-subclass/142966)

<div class="topic-metadata">

**Author:** [@THEBIGO](https://www.ruby-forum.com/u/THEBIGO)\
**Replies:** 1\
**Last updated:** [July 14, 2008, 5:00am UTC](https://www.ruby-forum.com/t/will-paginate-paginates-all-instead-of-subclass/142966 "2008-07-14T05:00:19Z")

</div>

I’m still a newb but having fun - Any help on this problem will be much appreciated. I have mymodel Call.rb class Call \< ActiveRecord::Base belongs\_to :user has\_many:visits, :dependent =\> :destroy has\_many:visits d…

---

## [How to use cookie based session?](https://www.ruby-forum.com/t/how-to-use-cookie-based-session/134479)

<div class="topic-metadata">

**Author:** [@zukjimote](https://www.ruby-forum.com/u/zukjimote)\
**Replies:** 2\
**Last updated:** [July 14, 2008, 4:59am UTC](https://www.ruby-forum.com/t/how-to-use-cookie-based-session/134479 "2008-07-14T04:59:29Z")

</div>

I just installed Rails 2.0.2. While moving an application made in Rails 1.2 to Rails 2.0.2, I got a problem of session. I was using the variable @session\[\]. How should I change the old fashioned way to the new way, w…

---

## [Gem install mysql](https://www.ruby-forum.com/t/gem-install-mysql/142824)

<div class="topic-metadata">

**Author:** [@skirkpatrick](https://www.ruby-forum.com/u/skirkpatrick)\
**Replies:** 6\
**Last updated:** [July 14, 2008, 4:41am UTC](https://www.ruby-forum.com/t/gem-install-mysql/142824 "2008-07-14T04:41:46Z")

</div>

I’m trying to to ‘gem install mysql’ because it keeps saying that the libraries i’m using for mysql are not fit for production. the packages i have installed for ubuntu hardy 8.04 are: mysql-client-5.0 mysql-client-5…

---

## [How to debug using rspec stories](https://www.ruby-forum.com/t/how-to-debug-using-rspec-stories/142766)

<div class="topic-metadata">

**Author:** [@ppjunty](https://www.ruby-forum.com/u/ppjunty)\
**Replies:** 4\
**Last updated:** [July 14, 2008, 4:40am UTC](https://www.ruby-forum.com/t/how-to-debug-using-rspec-stories/142766 "2008-07-14T04:40:46Z")

</div>

Hello. I just started to use rspec stories. I followed the following tutorial: http://www.tomtenthij.co.uk/2008/1/25/rspec-plain-text-story-runner-on-a-fresh-rails-app So I implemented my story and some of the steps a…

---

## [How to Send Itext Generated PDF to Browser?](https://www.ruby-forum.com/t/how-to-send-itext-generated-pdf-to-browser/142969)

<div class="topic-metadata">

**Author:** [@ror\_arch](https://www.ruby-forum.com/u/ror_arch)\
**Replies:** 0\
**Last updated:** [July 14, 2008, 3:17am UTC](https://www.ruby-forum.com/t/how-to-send-itext-generated-pdf-to-browser/142969 "2008-07-14T03:17:13Z")

</div>

I am still attempting to figure out how to send an Itext generated pdf Document to the browser. I am looking at the following blog posting where someone is using jruby and iText to create a pdf file and then sending i…

---

## [Partials and Models](https://www.ruby-forum.com/t/partials-and-models/142962)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 5\
**Last updated:** [July 14, 2008, 3:15am UTC](https://www.ruby-forum.com/t/partials-and-models/142962 "2008-07-14T03:15:31Z")

</div>

Hi, I have a partial that needs to output the database data, In partial: \<% for user in @users %\> NoMethodError in Users#create\_user Showing users/\_user\_list.html.erb where line #1 raised: You have a nil object when…

---

## [Get the first character from a string?](https://www.ruby-forum.com/t/get-the-first-character-from-a-string/142919)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 7\
**Last updated:** [July 14, 2008, 2:57am UTC](https://www.ruby-forum.com/t/get-the-first-character-from-a-string/142919 "2008-07-14T02:57:31Z")

</div>

I’ve got a math function where I’m converting a base36 number to a base 10 integer and it works wonderfully, except when the first character is a zero. I could get this method to work if I could look at the first posi…

---

## [Javascript disabled for link\_to\_remote](https://www.ruby-forum.com/t/javascript-disabled-for-link-to-remote/142959)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 3\
**Last updated:** [July 14, 2008, 2:25am UTC](https://www.ruby-forum.com/t/javascript-disabled-for-link-to-remote/142959 "2008-07-14T02:25:34Z")

</div>

Hi, If a user doesn’t have javascript enabled, how would I know with the link\_to\_remote… In my view, I have this: \<%= link\_to\_remote( “Add user”,:url =\> { :action =\> :show\_add\_user } ) %\> And in my action, I have t…

---

## [Disabling rails changing the case of data](https://www.ruby-forum.com/t/disabling-rails-changing-the-case-of-data/142856)

<div class="topic-metadata">

**Author:** [@daniel](https://www.ruby-forum.com/u/daniel)\
**Replies:** 6\
**Last updated:** [July 14, 2008, 12:51am UTC](https://www.ruby-forum.com/t/disabling-rails-changing-the-case-of-data/142856 "2008-07-14T00:51:49Z")

</div>

I’m trying to populate data from a database and assign the data to form.label. The data in the database is in all caps but when it is displayed in my browser it is first character upper and the rest lower. How can I…

---

## [Attachmet fu thumbs not generated](https://www.ruby-forum.com/t/attachmet-fu-thumbs-not-generated/142955)

<div class="topic-metadata">

**Author:** [@Tarscher](https://www.ruby-forum.com/u/Tarscher)\
**Replies:** 0\
**Last updated:** [July 13, 2008, 10:27pm UTC](https://www.ruby-forum.com/t/attachmet-fu-thumbs-not-generated/142955 "2008-07-13T22:27:18Z")

</div>

Hi all, I use attachment fu for image upload. In my model I define 3 thumbs. The orginal image is resized but the thumbnails are not. People have reported this issue before but I have not seen a solution yet. I have…

---

## [\[ANN\] ActionSequence 1.0.1 - Multipage Form Routing](https://www.ruby-forum.com/t/ann-actionsequence-1-0-1-multipage-form-routing/142952)

<div class="topic-metadata">

**Author:** [@Florian\_ASSSSmann](https://www.ruby-forum.com/u/Florian_ASSSSmann)\
**Replies:** 0\
**Last updated:** [July 13, 2008, 10:17pm UTC](https://www.ruby-forum.com/t/ann-actionsequence-1-0-1-multipage-form-routing/142952 "2008-07-13T22:17:19Z")

</div>

Hi Ruby on Rails folks, I wrote ActionSequence (GitHub - boof/action\_sequence: Action Sequencer for Ruby on Rails ) for my company to better handle multipage forms. It comes with a DSL for creating a sequence. Exa…

---

## [How do you deal with sidebars in layouts?](https://www.ruby-forum.com/t/how-do-you-deal-with-sidebars-in-layouts/142949)

<div class="topic-metadata">

**Author:** [@chunkyslink](https://www.ruby-forum.com/u/chunkyslink)\
**Replies:** 0\
**Last updated:** [July 13, 2008, 10:12pm UTC](https://www.ruby-forum.com/t/how-do-you-deal-with-sidebars-in-layouts/142949 "2008-07-13T22:12:09Z")

</div>

I’ve been using the simple sidebar plugin in an app which is still in development. The plugin allows you to specify the sidebars (auxiliary content that often bears no relation to the resource being restfully represen…

---

## [CalendarDateSelect plugin Localize](https://www.ruby-forum.com/t/calendardateselect-plugin-localize/142946)

<div class="topic-metadata">

**Author:** [@gianpero](https://www.ruby-forum.com/u/gianpero)\
**Replies:** 0\
**Last updated:** [July 13, 2008, 9:26pm UTC](https://www.ruby-forum.com/t/calendardateselect-plugin-localize/142946 "2008-07-13T21:26:19Z")

</div>

Hi everyone, I am developing in spanish, am using the CalendarDateSelect plugin using the localize script, as is in the plugin web page, but when When I translate it I can’t save the date to DB because “Enero” it’s no…

---

## [Value for Select](https://www.ruby-forum.com/t/value-for-select/196742)

<div class="topic-metadata">

**Author:** [@chaosbanane](https://www.ruby-forum.com/u/chaosbanane)\
**Replies:** 4\
**Last updated:** [July 13, 2008, 9:22pm UTC](https://www.ruby-forum.com/t/value-for-select/196742 "2008-07-13T21:22:34Z")

</div>

Hi how can i define a preselct value for the Select Tag? \<%= select(:bla, :bla\_id, @blaa.collect {|c| \[c.name, c.id\]}, { :selected =\> ‘2’ } ) %\> Where is the mistake? greetings, chaos

---

## [Problem with ActiveRecord::AssociationTypeMismatch](https://www.ruby-forum.com/t/problem-with-activerecord-associationtypemismatch/142941)

<div class="topic-metadata">

**Author:** [@christoph](https://www.ruby-forum.com/u/christoph)\
**Replies:** 2\
**Last updated:** [July 13, 2008, 9:15pm UTC](https://www.ruby-forum.com/t/problem-with-activerecord-associationtypemismatch/142941 "2008-07-13T21:15:10Z")

</div>

Hi all ! I’ve written a Character model, each character has many Attributes. My schema.rb looks like this: create\_table “characters”, :force =\> true do |t| t.string “first\_name” t.string “last\_name” t.integer …

---

## [Rails gem precedence](https://www.ruby-forum.com/t/rails-gem-precedence/142780)

<div class="topic-metadata">

**Author:** [@msp](https://www.ruby-forum.com/u/msp)\
**Replies:** 2\
**Last updated:** [July 13, 2008, 7:36pm UTC](https://www.ruby-forum.com/t/rails-gem-precedence/142780 "2008-07-13T19:36:02Z")

</div>

Hi folks I am dev’ing a gem from a Github fork and I want to integration test my changes in my Rails project. Previously I had been able to copy the gem into vendor/gems to ensure this took precedence over the locall…

---

## [Scaffold Prbm](https://www.ruby-forum.com/t/scaffold-prbm/142934)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [July 13, 2008, 7:13pm UTC](https://www.ruby-forum.com/t/scaffold-prbm/142934 "2008-07-13T19:13:45Z")

</div>

Hi After scaffolding i am not getting the correct out put. I am using windows and Internet Explorer Please help me i m new to RoR Listing recipes Show http://localhost:3000/recipes/1 Edithttp://localhost:3000/reci…

---

## [Sample application to run](https://www.ruby-forum.com/t/sample-application-to-run/142935)

<div class="topic-metadata">

**Author:** [@casper\_the\_ghost](https://www.ruby-forum.com/u/casper_the_ghost)\
**Replies:** 0\
**Last updated:** [July 13, 2008, 7:13pm UTC](https://www.ruby-forum.com/t/sample-application-to-run/142935 "2008-07-13T19:13:45Z")

</div>

Hi All, I am new to ruby on rails , i tried many tutorials . scaffolding is not working properly. After scaffolding when i run the application it doesnt show the text boxes it gives only the links and create button. …

---

## [RESTFUL Authentification plugin Functional tests - howto?](https://www.ruby-forum.com/t/restful-authentification-plugin-functional-tests-howto/142932)

<div class="topic-metadata">

**Author:** [@kadoudal](https://www.ruby-forum.com/u/kadoudal)\
**Replies:** 0\
**Last updated:** [July 13, 2008, 6:34pm UTC](https://www.ruby-forum.com/t/restful-authentification-plugin-functional-tests-howto/142932 "2008-07-13T18:34:25Z")

</div>

I am trying to write a functional test of my UserController index action require File.dirname(FILE) + ‘/…/test\_helper’ require ‘users\_controller’ class UsersControllerTest \< Test::Unit::TestCase def setup @control…

---

## [Ajax to redisplay](https://www.ruby-forum.com/t/ajax-to-redisplay/142897)

<div class="topic-metadata">

**Author:** [@jturney](https://www.ruby-forum.com/u/jturney)\
**Replies:** 7\
**Last updated:** [July 13, 2008, 4:37pm UTC](https://www.ruby-forum.com/t/ajax-to-redisplay/142897 "2008-07-13T16:37:24Z")

</div>

Hi, I have a button that displays “Show form.” When a user clicks on it, I want the form to be display on the page without having to reload the page. This is what I’ve got so far: controller action #show\_add\_user r…

---

## [Acts\_as\_tree questions/problems](https://www.ruby-forum.com/t/acts-as-tree-questions-problems/142922)

<div class="topic-metadata">

**Author:** [@le\_colibri](https://www.ruby-forum.com/u/le_colibri)\
**Replies:** 0\
**Last updated:** [July 13, 2008, 3:31pm UTC](https://www.ruby-forum.com/t/acts-as-tree-questions-problems/142922 "2008-07-13T15:31:13Z")

</div>

I’m trying to get acts\_as\_tree to work in a project running Rails 2.1.0. The plugin’s documentation is extremely scarse and after some trying and Googling for more info, I gave up. So, the question is: can anybody giv…

---

## [Re: Re\[Rails\] stful\_authentication, Internet Explorer, and unwanted http basic dialog](https://www.ruby-forum.com/t/re-re-rails-stful-authentication-internet-explorer-and-unwanted-http-basic-dialog/142910)

<div class="topic-metadata">

**Author:** [@tardate](https://www.ruby-forum.com/u/tardate)\
**Replies:** 1\
**Last updated:** [July 13, 2008, 12:06pm UTC](https://www.ruby-forum.com/t/re-re-rails-stful-authentication-internet-explorer-and-unwanted-http-basic-dialog/142910 "2008-07-13T12:06:21Z")

</div>

I’m glad I found your post Joshua - it saved me quite a bit of time! To get this to work for me however (IE6), I had to ditch the ||= and do straight assignment: request.format = :html if request.env\[‘HTTP\_USER\_AGENT’…

---

## [Can't convert nil into String](https://www.ruby-forum.com/t/cant-convert-nil-into-string/142900)

<div class="topic-metadata">

**Author:** [@central\_tex](https://www.ruby-forum.com/u/central_tex)\
**Replies:** 4\
**Last updated:** [July 13, 2008, 7:59am UTC](https://www.ruby-forum.com/t/cant-convert-nil-into-string/142900 "2008-07-13T07:59:36Z")

</div>

I have tried to get through this error with no luck. In a form I have a user enter a title and then search the database for any similar titles. I need help with this. It’s like the information isn’t being passed throu…

---

## [ActionView::TemplateError](https://www.ruby-forum.com/t/actionview-templateerror/142864)

<div class="topic-metadata">

**Author:** [@elle](https://www.ruby-forum.com/u/elle)\
**Replies:** 3\
**Last updated:** [July 13, 2008, 7:04am UTC](https://www.ruby-forum.com/t/actionview-templateerror/142864 "2008-07-13T07:04:36Z")

</div>

Hi, I’ve developed an application last year, deployed it to the web server and it worked great. Last week, there were some changes to the hosting plan (changing username mainly …) but for some reason I am experiencin…

---

## [Nested Resources](https://www.ruby-forum.com/t/nested-resources/142860)

<div class="topic-metadata">

**Author:** [@advait](https://www.ruby-forum.com/u/advait)\
**Replies:** 5\
**Last updated:** [July 13, 2008, 7:00am UTC](https://www.ruby-forum.com/t/nested-resources/142860 "2008-07-13T07:00:00Z")

</div>

How to make photo as a nested resource to album, where class Album \< ActiveRecord::Base has\_many :photos end class Photo \< ActiveRecord::Base belongs\_to : album end Such that when I perform a show action an albums…

---

## [Parent's Validations lost via Inheritance](https://www.ruby-forum.com/t/parents-validations-lost-via-inheritance/142906)

<div class="topic-metadata">

**Author:** [@mahadewa](https://www.ruby-forum.com/u/mahadewa)\
**Replies:** 0\
**Last updated:** [July 13, 2008, 6:29am UTC](https://www.ruby-forum.com/t/parents-validations-lost-via-inheritance/142906 "2008-07-13T06:29:00Z")

</div>

I have some simple models that inherit from a parent (using STI). In all but one case, all of the validations are declared in the parent model like: class InfoRequest \< ActiveRecord::Base validates\_presence\_of :full…

---

## [Adding methods to native ruby class within rails](https://www.ruby-forum.com/t/adding-methods-to-native-ruby-class-within-rails/142878)

<div class="topic-metadata">

**Author:** [@itkin](https://www.ruby-forum.com/u/itkin)\
**Replies:** 6\
**Last updated:** [July 13, 2008, 2:40am UTC](https://www.ruby-forum.com/t/adding-methods-to-native-ruby-class-within-rails/142878 "2008-07-13T02:40:19Z")

</div>

hi ! i’d like to add my own method to the ruby string class, do you know how to do this properly in the rails framework? itkin

---

## [Having a base date set for RSpec Testing?](https://www.ruby-forum.com/t/having-a-base-date-set-for-rspec-testing/138330)

<div class="topic-metadata">

**Author:** [@starmaerker](https://www.ruby-forum.com/u/starmaerker)\
**Replies:** 1\
**Last updated:** [July 13, 2008, 12:15am UTC](https://www.ruby-forum.com/t/having-a-base-date-set-for-rspec-testing/138330 "2008-07-13T00:15:55Z")

</div>

I have a quick questions. I’m developing an application with has about 15-20 tables in the DB, with static data that is necessary for the system to operate (everything from US States to various enumerated values). Th…

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

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