I am having a bit of trouble with the error. I hava a product and category table
and wanting to display the categories in a drop down list. Below is the error I
get. Any suggestion on how I can fix this.
undefined method `name'' for #<Category:0x3652448>
9: <select name="product[category_id]">
10: <% @categories.each do |category| %>
11: <option value="<%= category.id %>">
12: <%= category.name %>
13: </option>
14: <% end %>
15: </select>
Thanks
Patrick
-----Original Message-----
From: rails-request@lists.rubyonrails.org
[mailto:rails-request@lists.rubyonrails.org]
Sent: Friday, April 28, 2006 11:35 AM
To: rails@lists.rubyonrails.org
Subject: Rails Digest, Vol 19, Issue 784
Send Rails mailing list submissions to
rails@lists.rubyonrails.org
To subscribe or unsubscribe via the World Wide Web, visit
http://lists.rubyonrails.org/mailman/listinfo/rails
or, via email, send a message with subject or body ''help'' to
rails-request@lists.rubyonrails.org
You can reach the person managing the list at
rails-owner@lists.rubyonrails.org
When replying, please edit your Subject line so it is more specific than
"Re: Contents of Rails digest..."
Today''s Topics:
1. Re: Remember James McGovern? (Steve Longdo)
2. Re: Remember James McGovern? (Giles Bowkett)
3. RE: please explain web services (Rodrigo Dominguez)
4. Re: Sharing RJS Templates (Ron Miles)
5. Re: Remember James McGovern? (Kenneth Lee)
6. Have to restart Webrick when changing a view template/layout
(Wes Hatchett)
7. Re: RE: please explain web services (Josh Kieschnick)
8. Active Record save doesn''t save! (or throw an exception)
(Larry White)
----------------------------------------------------------------------
Message: 1
Date: Fri, 28 Apr 2006 13:06:26 -0500
From: "Steve Longdo" <steve.longdo@gmail.com>
Subject: Re: [Rails] Remember James McGovern?
To: rails@lists.rubyonrails.org
Message-ID:
<cc4e85f30604281106r4debc37aq20c947c51519c22c@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
What a jerk. Who is his employer? I think we should start a fund to boycott
them. If he works for a software company, the quality of their product must
suffer from the contributions of someone as "enterprisey" as James
McGovern.
The title of the posting is conciliatory
"ruby-community-proved-mcgovern-wrong", but the post itself
isn''t at all, in fact he borders on being a troll. Way to contradict
yourself again James.
"Anyway, for the record, the Ruby Community actually didn''t find a
single fact to prove me wrong but at least it generated a lot of discussion.
Hopefully, new insights will emerge and that they will consider alternative
perspectives going forward..."
-Steve
http://www.stevelongdo.com
On 4/28/06, Jon Gretar Borgthorsson <jon.borgthorsson@gmail.com>
wrote:>
> Remember James McGovern and his articles about Rails and enterprise?
>
> Well... Check this one out where he "puts his money where his mouth
is"
>
> http://duckdown.blogspot.com/2006/04/ruby-community-proved-mcgovern-wr
> ong.html
>
> --
> --------------
> Jon Gretar Borgthorsson
> http://www.jongretar.net/
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060428/a03d4edc/attachment-0001.html
------------------------------
Message: 2
Date: Fri, 28 Apr 2006 12:09:41 -0600
From: "Giles Bowkett" <gilesb@gmail.com>
Subject: Re: [Rails] Remember James McGovern?
To: rails@lists.rubyonrails.org
Message-ID:
<2d81dedb0604281109pebb834fn863ef894102ffa4f@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
He''s a total troll. Google Ads. Blog traffic. Waste of time.
It just doesn''t matter.
--
Giles Bowkett
http://www.gilesgoatboy.org
On 4/28/06, Steve Longdo <steve.longdo@gmail.com>
wrote:> What a jerk. Who is his employer? I think we should start a fund to
> boycott them. If he works for a software company, the quality of
> their product must suffer from the contributions of someone as
> "enterprisey" as James McGovern.
>
> The title of the posting is conciliatory
> "ruby-community-proved-mcgovern-wrong", but the post itself
isn''t at
> all, in fact he borders on being a troll. Way to contradict yourself
> again James.
>
> "Anyway, for the record, the Ruby Community actually didn''t
find a
> single fact to prove me wrong but at least it generated a lot of
discussion.
> Hopefully, new insights will emerge and that they will consider
> alternative perspectives going forward..."
>
> -Steve
> http://www.stevelongdo.com
>
>
> On 4/28/06, Jon Gretar Borgthorsson <jon.borgthorsson@gmail.com>
wrote:
> > Remember James McGovern and his articles about Rails and enterprise?
> >
> > Well... Check this one out where he "puts his money where his
mouth is"
> >
> http://duckdown.blogspot.com/2006/04/ruby-community-proved-mcgovern-wr
> ong.html
> >
> > --
> > --------------
> > Jon Gretar Borgthorsson
> > http://www.jongretar.net/
> > _______________________________________________
> > Rails mailing list
> > Rails@lists.rubyonrails.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails
> >
>
>
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
>
>
------------------------------
Message: 3
Date: Fri, 28 Apr 2006 15:10:52 -0300
From: "Rodrigo Dominguez" <rails@rorra.com.ar>
Subject: RE: [Rails] please explain web services
To: <rails@lists.rubyonrails.org>
Message-ID: <004701c66aef$1bfcfb10$7609000a@DELL2600143>
Content-Type: text/plain; charset="iso-8859-1"
A web server is a great technology to communicate applications. It is standard,
and everyone know how to work with web services.
A good example for a web service:
In my company, we have a lot of web applications, for clients and for workers.
All the logins, are local to a web application. So if you log into web
application A, and then you want to go to web application B, you have to put
another user and another password, although you are the same client, big
problem.
So I''m implementing a solution, a login server for all those webs, so I
can store all the logins in the login server, specify in that server what web
applications they can access, metadata associated to each login, etc.
The web applications in the company were programmed mostly in PHP, and there are
some web applications in perl, and some web applications in ROR. So I''m
doing all the login for the login server in ruby on rails, and I''m
implementing a web service to communicate and give an standard API to the others
applications, criptography, etc; and the changes that they have to implement in
their current web applications are very little. And even better, we can now
provide access to the web service to our provideers, so they can use our login
server and we can integrate with our provideers.
--------------------------------------------------------------
Rodrigo Dominguez
Contra la contaminaci?n de las papeleras.
Por el r?o Uruguay.
El 30 de Abril en Gualeguaych?.
Yo Voy.
Iplan Networks Datos Personales
rdominguez@iplan.com.ar rorra@rorra.com.ar
www.iplan.com.ar www.rorra.com.ar
5031-6303 15-5695-6027
-----Mensaje original-----
De: rails-bounces@lists.rubyonrails.org
[mailto:rails-bounces@lists.rubyonrails.org] En nombre de Joe Van Dyk Enviado
el: Viernes, 28 de Abril de 2006 02:57 p.m.
Para: rails@lists.rubyonrails.org
Asunto: Re: [Rails] please explain web services
On 4/28/06, Josh Kieschnick <jjkiesch@gmail.com>
wrote:> could someone explain some of the uses for a web service. i''m
reading
> about how to make them, but i''m still not quite sure what
they''re good
> for.
>
> i have multiple rails apps that i would like to pass user information
> back and forth to. i''m not sure if something like this could help
me
or> not.
Yes, that''s what a web service would be good for.
A webservice is essentially a way for applications to get data from other
applications using HTTP.
Joe
_______________________________________________
Rails mailing list
Rails@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
------------------------------
Message: 4
Date: Fri, 28 Apr 2006 14:14:32 -0400
From: "Ron Miles" <ronald.miles@gmail.com>
Subject: Re: [Rails] Sharing RJS Templates
To: rails@lists.rubyonrails.org
Message-ID:
<f5c897a90604281114u313c0b6ei4fe990fc9370dac7@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Ahhhhhhh, since it''s not a partial, no underscore. Well, no. I must
be doing something wrong still. Actual code:
<%= link_to_remote( image_tag("capsule_public.gif", :size =>
"72x16"),
:url => { :action => ''shared/script_status_cycle'', :id
=> @member.id })
Should go to "shared/_script_status.cycle.rjs," I would think. Or
"shared/script_cycle_rjs." Neither seem to work.
I get this error:
ActionController::UnknownAction (No action responded to
shared/script_status_cycle), which tells me that it''s not actually the
RJS that is the problem, it''s the action. So I think my approach must
be wrong.
I need to go to the "script_status_cycle" method in my controller,
then move to a shared component rather than one in the normal place.
I think I''m over-thinking this, or missing something obvious.
To clarify after all that, I have an rjs template I want to use in 3
controllers. How do I accomplish that without having to keep 3 copies of the
template?
Thanks,
-Ron
On 4/28/06, Cody Fauser <codyfauser@gmail.com>
wrote:> Ron,
>
> You renamed it to _whatever.rjs, but when you do:
>
> render :action => ''shared/whatever''
>
> Rails will look for whatever.rjs and not _whatever.rjs.
>
> On 4/28/06, Ron Miles <ronald.miles@gmail.com> wrote:
> > Hello All,
> >
> > I''m enjoying the simplicity and power of RJS templates in
Rails 1.1,
> > but am perplexed about sharing them. I have several templates that
> > I would like to access in various controllers, but if I moved them
> > to views/shared/whatever.rjs, my app can''t seem to find them.
I
> > changed the name to _whatever.rjs and referenced them as
> > "shared/whatever", but no luck.
> >
> > Am I missing something? Or is it not possible to share them? It
> > seems like it should be simple, and it would conform with DRY.
> >
> > Actually, now that I''ve typed that out, it sorta makes sense
that
> > they can''t be shared like that, since they aren''t
partials. So,
> > maybe the broader question is "How do I go about reusing RJS
> > Templates throughout my application?"
> >
> > Regards,
> >
> > -Ron
> >
> > _______________________________________________
> > Rails mailing list
> > Rails@lists.rubyonrails.org
> > http://lists.rubyonrails.org/mailman/listinfo/rails
> >
> >
> >
>
>
> --
> Cody Fauser
> http://www.codyfauser.com
> _______________________________________________
> Rails mailing list
> Rails@lists.rubyonrails.org
> http://lists.rubyonrails.org/mailman/listinfo/rails
>
--
Ron Miles
ronald.miles@gmail.com
413.329.4277
------------------------------
Message: 5
Date: Fri, 28 Apr 2006 11:27:24 -0700
From: "Kenneth Lee" <klee@klmn.net>
Subject: Re: [Rails] Remember James McGovern?
To: rails@lists.rubyonrails.org
Message-ID:
<32081bf20604281127s4bf7e05co361c3d0081bc9141@mail.gmail.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Unfortunately, James represents the mindsets of many corporate decision makers
out there. While he is trollish, he does have a point. A lot of decisions made
by C-level folk require a Gartner and Forrester report before it ends up as part
of the picture. Look how long it has taken for Linux to become accepted as an
"enterprise"
solution.
Rails will eventually cross that hump, but it''ll be completely
mainstream by then. In the meantime, smaller, more forward thinking companies
can take advantage of the agile development that we enjoy from RoR.
------------------------------
Message: 6
Date: Fri, 28 Apr 2006 20:27:29 +0200
From: Wes Hatchett <wesatl616@yahoo.com>
Subject: [Rails] Have to restart Webrick when changing a view
template/layout
To: rails@lists.rubyonrails.org
Message-ID: <a739079a396d8d67d36174492ffb457e@ruby-forum.com>
Content-Type: text/plain; charset=utf-8
Whenever I change a view template or layout in my application, I have to restart
Webrick for the change to take effect.
I have tried everything i can think of. I am not in production mode (not passing
the "-e production" argument to webrick when I start it,
environment.rb has the production line commented out).
I have cleared caches on all of my web browsers, and gone around and tested this
on all of the computers in my office, but none of them will see the new output
until Webrick has been restarted. Editing controllers is fine, the new code
takes effect right away. But with views, I am dead in the water until I restart
the server. Others don''t seem to have this issue, any ideas?
My server is running OpenSUSE Linux.
--
Posted via http://www.ruby-forum.com/.
------------------------------
Message: 7
Date: Fri, 28 Apr 2006 20:27:28 +0200
From: Josh Kieschnick <jjkiesch@gmail.com>
Subject: [Rails] Re: RE: please explain web services
To: rails@lists.rubyonrails.org
Message-ID: <86e5af8a3c25b567e8d0483422efeb75@ruby-forum.com>
Content-Type: text/plain; charset=utf-8
Rodrigo Dominguez wrote:> A web server is a great technology to communicate applications. It is
> standard, and everyone know how to work with web services.
>
> A good example for a web service:
>
> In my company, we have a lot of web applications, for clients and for
> workers. All the logins, are local to a web application. So if you log
> into web application A, and then you want to go to web application B,
> you have to put another user and another password, although you are the
> same client, big problem.
> So I''m implementing a solution, a login server for all those webs,
so I
> can store all the logins in the login server, specify in that server
> what web applications they can access, metadata associated to each
> login, etc.
> The web applications in the company were programmed mostly in PHP, and
> there are some web applications in perl, and some web applications in
> ROR. So I''m doing all the login for the login server in ruby on
rails,
> and I''m implementing a web service to communicate and give an
standard
> API to the others applications, criptography, etc; and the changes that
> they have to implement in their current web applications are very
> little. And even better, we can now provide access to the web service to
> our provideers, so they can use our login server and we can integrate
> with our provideers.
what you''re talking about is EXACTLY what i would need. is the
development of something like this very hard? are there any pointers you
could give or places to start out for something like this?
your help would be greatly appreciated in any way you can.
--
Posted via http://www.ruby-forum.com/.
------------------------------
Message: 8
Date: Fri, 28 Apr 2006 14:32:34 -0400
From: "Larry White" <ljw1001@gmail.com>
Subject: [Rails] Active Record save doesn''t save! (or throw an
exception)
To: rails@lists.rubyonrails.org
Message-ID:
<d15ea14a0604281132l7fed256dx627ec9516e8c0b66@mail.gmail.com>
Content-Type: text/plain; charset="iso-8859-1"
PLEASE help me - this is making me insane.
Can anyone suggest any reasons for this behavior? It occured previously,
then went away and is now back.
In Task.rb (where task is an active record subclass)
def clear_schedule
puts "clearing schedule for task"
scheduled_end_date= nil #reset the
scheduled end date
save
halt. #this makes
execution stop with an error.
end
This is the console output this produces:
clearing schedule for task
127.0.0.1 - - [28/Apr/2006:13:44:01 Eastern Daylight Time] "POST
/tasks/update/1
06 HTTP/1.1" 500 10736
http://localhost:3000/tasks/edit/106 -> /tasks/update/106
When I query the db, scheduled_end_date is still set to a valid date, even
though in the model I set it to nil, called save and then stopped. There
were no exceptions other than this:
undefined local variable or method `halt'' for #<Task:0x3a23328>
I sometimes have the opposite problem in a related piece of code for this
same object/column (I set it to a real value, save it, retrieve the object
from the database in the very next line of code. When I check the value
it''s
nil.)
Can someone tell me what the expected behavior is within a transaction
versus outside of a transaction? The behavior seems unpredictable in both
situations but I''m not sure. I assumed that if I was inside a
transaction
that I would still see the new value. All of this occurs within a single
http request so I assumed that all the data access was on the same
connection.
Anyway, I''m stumped and resolving this is critical to my project.
Please
help if you can.
-------------- next part --------------
An HTML attachment was scrubbed...
URL:
http://wrath.rubyonrails.org/pipermail/rails/attachments/20060428/6a1085ca/attachment.html
------------------------------
_______________________________________________
Rails mailing list
Rails@lists.rubyonrails.org
http://lists.rubyonrails.org/mailman/listinfo/rails
End of Rails Digest, Vol 19, Issue 784
**************************************