somehow updating to master leads to wrong nesting: instead of subprograms nested link shows the same record, but in nested div (CORRECTED 1 line of previous message)
2010/7/27 Andrey Voronkov <[email protected]> > somehow updating to master leads to wrong nesting: instead of subprograms > nested link shows the same as nested. > This is the different log pieces, second is correct: > > Processing FcpsController#nested (for 127.0.0.1 at 2010-07-27 22:31:30) > [GET] > Parameters: {"adapter"=>"_list_inline_adapter", "id"=>"163", > "associations"=>"subprograms"} > User Columns (0.6ms) SHOW FIELDS FROM `users` > User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 1) LIMIT > 1 > Fcp Load (0.2ms) SELECT * FROM `programs` WHERE (`programs`.`id` = 163) > AND ( (`programs`.`type` = 'Fcp' ) ) > Start rendering component ({:action=>"index", :params=>{:nested=>true, > :parent_column=>"subprograms", :format=>"html", > :eid=>"919d75b473d33f95bfaed1c4d8d8e903", :parent_model=>"Fcp"}, > :controller=>"fcps"}): > > > Processing FcpsController#index to html (for 127.0.0.1 at 2010-07-27 > 22:31:30) [GET] > Parameters: {"parent_column"=>"subprograms", > "eid"=>"919d75b473d33f95bfaed1c4d8d8e903", "nested"=>true, "id"=>nil, > "parent_model"=>"Fcp"} > CACHE (0.0ms) SELECT * FROM `users` WHERE (`users`.`id` = 1) LIMIT 1 > SQL (0.4ms) SELECT count(DISTINCT `programs`.id) AS count_all FROM > `programs` LEFT OUTER JOIN `programs` subprograms_programs ON > subprograms_programs.parent_id = programs.id AND > (`subprograms_programs`.`type` = 'Fcp' ) WHERE (((programs.id = '163'))) > AND ( (`programs`.`type` = 'Fcp' ) ) > Fcp Load (0.1ms) SELECT `programs`.* FROM `programs` WHERE ((( > programs.id = '163'))) AND ( (`programs`.`type` = 'Fcp' ) ) ORDER BY > `programs`.`name` ASC LIMIT 0, 30 > Fcp Load (0.3ms) SELECT `programs`.* FROM `programs` WHERE > (`programs`.parent_id = 163) AND ( (`programs`.`type` = 'Fcp' ) ) > > > > -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- > Processing FcpsController#nested (for 127.0.0.1 at 2010-07-27 22:33:56) > [GET] > Parameters: {"adapter"=>"_list_inline_adapter", "id"=>"138", > "associations"=>"subprograms"} > User Columns (0.7ms) SHOW FIELDS FROM `users` > User Load (0.2ms) SELECT * FROM `users` WHERE (`users`.`id` = 1) LIMIT > 1 > Fcp Load (0.2ms) SELECT * FROM `programs` WHERE (`programs`.`id` = 138) > AND ( (`programs`.`type` = 'Fcp' ) ) > Start rendering component ({:action=>"index", :params=>{:nested=>true, > :parent_column=>"subprograms", :format=>"html", > :eid=>"ece3727dc1ddffdcc1445e58d5c47a4d", :parent_model=>"Fcp"}, > :controller=>"fcps"}): > > > Processing FcpsController#index to html (for 127.0.0.1 at 2010-07-27 > 22:33:56) [GET] > Parameters: {"parent_column"=>"subprograms", > "eid"=>"ece3727dc1ddffdcc1445e58d5c47a4d", "nested"=>true, "id"=>nil, > "parent_model"=>"Fcp"} > CACHE (0.0ms) SELECT * FROM `users` WHERE (`users`.`id` = 1) LIMIT 1 > SQL (0.5ms) SELECT count(DISTINCT `programs`.id) AS count_all FROM > `programs` LEFT OUTER JOIN `programs` parents_programs ON > `parents_programs`.id = `programs`.parent_id AND (`parents_programs`.`type` > = 'Fcp' ) WHERE (((programs.parent_id = '138'))) AND ( (`programs`.`type` = > 'Fcp' ) ) > Fcp Load (0.4ms) SELECT `programs`.* FROM `programs` WHERE > (((programs.parent_id = '138'))) AND ( (`programs`.`type` = 'Fcp' ) ) ORDER > BY `programs`.`name` ASC LIMIT 0, 30 > CACHE (0.0ms) SELECT * FROM `programs` WHERE (`programs`.`id` = 138) > AND ( (`programs`.`type` = 'Fcp' ) ) > > 2010/7/27 Sergio Cambra .:: entreCables S.L. ::. <[email protected]> > > On Martes, 27 de Julio de 2010 11:12:10 Andrey Voronkov escribió: >> > I have model with self referrental relation: Program. >> > so it has subprograms and for AS it is: >> > config.nested.add_link('Subprograms', [:subprograms]) >> > >> > and for each program I have this set of a link: >> > config.columns[:name].set_link :name, :action => 'list', :popup => true >> > >> > conditions_for_collection method captures the id from this request and >> just >> > finds this record so it is only one in list. >> > >> > The problem is: when I follow the link from normal list - all is ok - >> style >> > preserved, but when I follow nested link first and follow by :name link >> > from any of nesdet records I have no any style just ugly html itself. >> >> I have just fixed it in master branch. >> >> > And source code of the page starts with: >> > <div id="as_ece3727dc1ddffdcc1445e58d5c47a4d-active-scaffold" >> > class="active-scaffold >> > active-scaffold-as_ece3727dc1ddffdcc1445e58d5c47a4d fcps-view >> default-theme >> > "> >> > But in normal list all is normal: >> > <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> >> > <head> <meta >> > http-equiv="content-type" content="text/html;charset=UTF-8" /> >> > <title>Автоматизированная >> > система обработки баз данных долгосрочных целевых программ >> > Aries</title> <script >> > src="/javascripts/prototype.js?1280034133" >> > type="text/javascript"></script> <script >> > src="/javascripts/effects.js?1280034133" >> > type="text/javascript"></script> <script >> > src="/javascripts/dragdrop.js?1280034133" >> > type="text/javascript"></script> <script >> > src="/javascripts/controls.js?1280034133" >> > type="text/javascript"></script> <script >> > src="/javascripts/application.js?1261277058" type="text/javascript"> >> > </script> <script src=" >> > /javascripts/active_scaffold/default/form_enhancements.js?1280220729" >> > type=" text/javascript"></script> <script src=" >> > /javascripts/active_scaffold/default/active_scaffold.js?1280220729" >> type=" >> > text/javascript"></script> <script src=" >> > /javascripts/active_scaffold/default/dhtml_history.js?1280220729" type=" >> > text/javascript"></script> <script src=" >> > /javascripts/active_scaffold/default/rico_corner.js?1280220729" type=" >> > text/javascript"></script> <link href=" >> > /stylesheets/active_scaffold/default/stylesheet.css?1280220729" media=" >> > screen" rel="stylesheet" type="text/css" /> <!--[if IE]><link >> > href="/stylesheets/active_scaffold/default/stylesheet-ie.css?1280220729" >> > media="screen" rel="stylesheet" type= and so on >> >> -- >> Sergio Cambra .:: entreCables S.L. ::. >> Mariana Pineda 23, 50.018 Zaragoza >> T) 902 021 404 F) 976 52 98 07 E) [email protected] >> >> -- >> 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]<activescaffold%[email protected]> >> . >> For more options, visit this group at >> http://groups.google.com/group/activescaffold?hl=en. >> >> > -- 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.
