I've submitted a patch to active scaffold to fix this issue. I will let you know when it is pulled in.
On Jan 5, 9:45 am, Kumala <[email protected]> wrote: > Sounds complicated but easy to replicate. > I have 3 classes: Building, Room, Operator > Building has many rooms / Room Belongs to Building > Operator has many rooms / Room belongs to Operator > > I use > config.columns[:building].form_ui = :select > config.columns[:operator].form_ui = :select > in the room controller to show a link to the building and the operator > in the list view. If I click on the operator link, I get the error > message: > RJS Error > TypeError: element is null > > Element.update("room-messages","\n \n\n \n\n \n\n"); > > Once I close the dialog box, everything continues as normal. > > How do I get rid of those error dialog boxes? Is this a bug? > > Here the code I have: > class BuildingController < ApplicationController > layout "standard" > active_scaffold :building do |config| > config.nested.add_link("Rooms", [:rooms]) > end > end > class RoomController < ApplicationController > layout "standard" > active_scaffold :room do |config| > config.list.columns = [:name, :building,:operator] > config.columns[:building].form_ui = :select > config.columns[:operator].form_ui = :select > end > end > class OperatorController < ApplicationController > layout "standard" > active_scaffold :operator do |config| > config.list.columns = [:name] > end > end > class Building < ActiveRecord::Base > has_many :rooms > end > class Room < ActiveRecord::Base > belongs_to :building > belongs_to :operator > end > class Operator < ActiveRecord::Base > has_many :rooms > end > > Regards > Andreas --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---
