Hi y'all,
I'm sorry, if the this questions has been asked a thousand times
before, but I'm just getting started with AS and I couldn't find an
appropriate answer in this group's discussions so far.
-------------------------------------------------------------------------
I have two models:
-------------------------------------------------------------------------
class MediaFormat < ActiveRecord::Base
belongs_to :employee, :class_name => "Employee", :foreign_key =>
"employee_id"
end
class Employee < ActiveRecord::Base
has_many :customers
end
-------------------------------------------------------------------------
and the two following controllers:
-------------------------------------------------------------------------
class CustomersController < ApplicationController
active_scaffold
end
class EmployeesController < ApplicationController
active_scaffold :employees do |config|
config.columns[:customers].form_ui = :select
end
end
-------------------------------------------------------------------------
Now when I try to create a new Customer, everything looks as I expect
it to: Next to the fields, which let me create a new employee right on
the spot, I get a nice dropdown menu, where I can pick an existing
employee from.
However, things look different when I try to create a new employee.
With the line "config.columns[:customers].form_ui = :select" I'd
expect a drop-down menu, which I could multi-select existing customers
from. Instead, I get "no options" printed where I'd expect the drop-
down menu to be.
When I comment out the "form_ui"-line I get fields to create a new
customer, which I also don't want.
I'd like to get the same thing, which I already get for the "Create a
new customer" form: a drop-down menu where I can multi-select from,
next to fields where I can add a new customer on the spot. If that
isn't possible, I'd at least like to have a drop-down menu where I can
multi-select existing customers from.
Is there a way to configure AS to do these things?
Regards,
Sebastian
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---