OK, the problem is still with the last version of AS, (2/1/2009) (I
redo everything... the SystemStackError disappear...)
My only patch in the AS code is:
<% if active_scaffold_config.actions.include?(:create) &&
active_scaffold_config.create.show_on_list # MYPATCHES %>
<%# if active_scaffold_config.create.show_on_list %>
AND, I have also a RJS error: Element is null, when I click on a many
to one relation in an embedded scaffold:
<%= render :active_scaffold => "Demos",
:label => "Demos" %>
class Kind < ActiveRecord::Base
has_many :apps
class DemosController < DmoController
active_scaffold :app do |config|
config.actions.exclude :show
config.label = "Demos"
config.columns = [:kind, :title, :concepts, :description]
list.sorting = {:name => 'ASC'}
end
(...)
end
Thus, the demosController/index list apps, with a column for the kinds
and the problem appears when I click on kind...
I just give you these information as is for the moment but I am trying
to isolate better the problem to maybe present a more structured
issue...
On 7 jan, 16:12, "mr.gaffo" <[email protected]> wrote:
> What version of AS?
> What version of Rails?
>
> 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
-~----------~----~----~----~------~----~------~--~---