On Sep 3, 12:00 pm, RVince <[email protected]> wrote:
> It doesn;t save and the log reads:
>
> NoMethodError (undefined method `MyB' for #<MyAController:0x664f93c>):
>   app/controllers/mya_controller.rb:174:in `cxl'
>

You could have said that first time round.
Your code reads

MyB myB = MyB.new

I assume you're more familiar with a language where you have to type
and declare variables and this is what you're doing. ruby doesn't do
that though (and probably parses it as MyB(myB = MyB.new)

Fred

> But I DO have a MyB model:
>
> class MyB < ActiveRecord::Base
> end
>
> as well as a MyBsController:
>
> class MyBsController < ApplicationController
> end
>
> Im confused regarding ActiveRecord here -- I'm just trying to add a
> record into the table associate with MyB from MyAsController. -RVince
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to