Hi All,
I''m having what I think is a really newbie problem. Have a parent
table (technologies) and a child table (positions) in my db, with
foreign key set and all.
class Technology < ActiveRecord::Base
has_many :positions
end
class Position < ActiveRecord::Base
belongs_to :technology
end
class TechnologiesController < ApplicationController
layout "technologies"
active_scaffold :technology do |config|
config.actions = [:list, :create, :update, :delete]
config.actions.exclude :nested
end
end
class PositionsController < ApplicationController
layout "positions"
active_scaffold :position do |config|
config.actions = [:create, :update, :list, :show, :delete, :search]
config.label = "Positions"
config.columns[:name].label = "Position Title"
config.list.label = "All Positions"
config.create.label = "Add New Position"
config.show.label = "Position Details"
end
end
With this conf I can create new positions thru the AS, but no new
technologies. The trail log looks like:
Technology Columns (0.001088) SHOW FIELDS FROM `technologies`
...
Rendered technologies/_form_attribute (0.00171)
Position Columns (0.000790) SHOW FIELDS FROM `positions`
ActionView::TemplateError (Unknown form_ui `'' for column
`positions'')
on line #7 of vendor/plugins/active_scaffold/frontends/default/views/
_form_attribute.rhtml:
So, I''m understanding that when trying to create a technology, AS is
trying also to bring the form to create a new position. I just want
the technology creation to be isolated from the positions. And when
creating a position, user should be able to pick using a combo which
technology it belongs to.
Simple Master Table example.
Any ideas?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Core" group.
To post to this group, send email to rubyonrails-core@googlegroups.com
To unsubscribe from this group, send email to
rubyonrails-core-unsubscribe@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/rubyonrails-core?hl=en
-~----------~----~----~----~------~----~------~--~---