It sounds like your column name is incorrect. You didn't paste you're 
code so I can't say for sure. You should be doing something like
config.columns[:project_type].form_ui = :select  #belongs_to
or
config.columns[:regions].form_ui = :select   #has_many
it shouldn't be "_id" - it's the association name, not the column name.

There are examples on the wiki e.g Getting Started;
http://wiki.github.com/activescaffold/active_scaffold

You don't need to build the select.

I think there's a more or less complete set of controller, model and 
helper code for what you are trying to do in the thread previously sent.

http://groups.google.com/group/activescaffold/browse_thread/thread/2ae130edb1d0e2d2


Regards,
Kerry


Me wrote:
> Bare with me here.  I'm a little slow. So I tried the code, and I get:
>
> You have a nil object when you didn't expect it!
> The error occurred while evaluating nil.form_ui=
>
> Is there enough smarts built-in to populate the select boxes? Or do I
> need something like:
>
> a= Author.find(:all).collect { |a| a.name  }
>
> If that kind of code is required, do I put that in the helper form
> override?  Any chance I can see one complete example that works?  I've
> been banging my head on this for a while.  When I Google, I just come
> across more people that have been banging there heads on this.
>
> Thanks! Paul
>
> On Aug 19, 1:58 pm, Kerry Foley <[email protected]> wrote:
>   
>> http://groups.google.com/group/activescaffold/browse_thread/thread/2a...
>>
>> Regards,
>> Kerry
>>
>> Me wrote:
>>     
>>> Greetings!  First post.
>>>       
>>> I've been greping the web for an AS example of populating a parent
>>> select box, and then dynamically changing a child select box through
>>> an "onchange" event.  I've seen the observer approach, but not with
>>> AS.  Is there support for such a thing?
>>>       
>>> I found this thread where this same question was asked.
>>>       
>>> http://www.mail-archive.com/[email protected]/msg00108....
>>>       
>>> The poor guy got a rather prickly response.  He eventually posted his
>>> solution in the last msg of the thread.  Unfortunately, I can't get
>>> that solution to work.  The example [in plain English] was, "Surveys
>>> have many survey_questions and surveys have_many survey_options."  If
>>> options are meant to be answers to questions, then it should be
>>> "Surveys have many questions.  Questions have many options [multiple
>>> choice]."   That would be three levels.  I tried looking at the
>>> survey_options table as some type of join with both foreign keys
>>> [survey_id, survey_question_id].  If that were the case, then survey
>>> "has many questions through survey_options."  That wasn't listed in
>>> the example.  Clearly, I'm confused somewhere.
>>>       
>>> I would appreciate it if someone could explain the example referenced
>>> in the last message of the thread linked to above.  Alternatively. I
>>> would appreciate a clear example of this pattern.  I think that this
>>> is a common situation where some documentation would benefit many
>>> people.
>>>       
>>> Thanks! Paul
>>>       
> >
>
>   


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to