Lets say I have 2 classes with a 1:N relation, e.g. Building / Rooms .
Using AS I display the list of records of the sub class (i.e. rooms).
One of the columns shows the building that this room is linked to. Per
default it is a link to that room which opens the room in edit mode.

How do I change this from an edit mode to a display mode.

Code:
class BuildingController < ApplicationController
  layout "standard"
  active_scaffold :building do |config|
    config.columns =        [:name]
    config.list.columns =   [:name]
  end
end
class RoomController < ApplicationController
  layout "standard"
  active_scaffold :room do |config|
    config.columns[:building].form_ui = :select
  end
end
class Building < ActiveRecord::Base
  has_many :rooms
end
class Room < ActiveRecord::Base
  belongs_to :building
end




--~--~---------~--~----~------------~-------~--~----~
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