Forum: Ruby Jan 8th, 2009 |
| Replies: 2 Views: 1,796 In your controller do you have
@user = User.find(:first)
or something similar? Could you post your controller code? |
Forum: Ruby Apr 15th, 2008 |
| Replies: 5 Solved: Hi Views: 3,148 Did your source file definitely have a .rb extension? Did anything at all appear in the output window? |
Forum: Ruby Jan 1st, 2008 |
| Replies: 3 Views: 3,151 Looking at your code I can't see whats wrong.
What happens if in your view you do
<% for st in @stocks -%>
<%= h(st.inspect) %><br />
<% end %> |
Forum: Ruby Jun 12th, 2007 |
| Replies: 2 Views: 3,149 You should find the method described here (http://www.kanthak.net/opensource/file_column/) suitable. It works for any file type. |
Forum: Ruby Apr 23rd, 2007 |
| Replies: 5 Views: 5,834 "w+" is a mode string; it truncates the file (or creates a new one if it doesn't exist)
|f| is a block. Basically it means that in the following code f refers to the file.
A quick example of a... |
Forum: Ruby Apr 22nd, 2007 |
| Replies: 5 Views: 5,834 For some reason the rubycentral site seems to be down so the original (http://www.rubycentral.com/book/ospace.html) article I'd link to isn't available, however it's in the google cache... |
Forum: Ruby Apr 16th, 2007 |
| Replies: 29 Views: 10,344 The rails framework is based on Basecamp |
Forum: Ruby Apr 12th, 2007 |
| Replies: 3 Views: 13,224 You need to give more information. What do you want to be selected and when?
If you want a default value put
t.column :favourite_colour_id, :integer, :default => 1
in your migration.
If you... |
Forum: Ruby Mar 8th, 2007 |
| Replies: 2 Views: 5,415 quick example using action_mailer.
If you don't have it already gem install 'action_mailer'
require 'action_mailer'
ActionMailer::Base.server_settings = {
:address =>... |