Embedded active scaffold loading problem

247 views
Skip to first unread message

praveen

unread,
Oct 9, 2012, 10:16:07 AM10/9/12
to actives...@googlegroups.com
Using AS 3.2.3 ,rails 3.2, ruby 1.9.3
I have embedded a active scaffold in view file of an action and this embedded  AS has huge data.So before loading the table, it is showing a link(controller name) but user will thought it is just a link (because its taking 45 sec to load the table).

In AS 2.3, It was loading the table(embedded active scaffold )  before showing the page.
I want old functionality.

Thanks in advance

bencarsal

unread,
Oct 9, 2012, 11:16:01 AM10/9/12
to actives...@googlegroups.com
without more information i think that is the association models. you need change select inputs for record_selects and in the controller with associated models:
conf.columns[:associated_model].actions_for_association_links = [:show]

ser...@entrecables.com

unread,
Oct 10, 2012, 3:45:03 PM10/10/12
to actives...@googlegroups.com
You can add render_component_vho to your Gemfile.

Anyway, you should improve performance for that embedded scaffold, is
too long, that's not good for your users. Try removing some columns
(mainly association columns), displaying less records per page, or
selecting only some columns if table has many columns (with
custom_finder_options). Also you can display only associated records
count and use counter_cache so you can disable eager loading and load
less records (it can be a great improvement for long associations):
conf.columns[:association].associated_limit = 0
conf.columns[:association].includes = nil
> --
> You received this message because you are subscribed to the Google
> Groups "ActiveScaffold : Ruby on Rails plugin" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/activescaffold/-/iT4FQ8egTfQJ [1].
> To post to this group, send email to actives...@googlegroups.com.
> To unsubscribe from this group, send email to
> activescaffol...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/activescaffold?hl=en.
>
>
> Links:
> ------
> [1] https://groups.google.com/d/msg/activescaffold/-/iT4FQ8egTfQJ

ser...@entrecables.com

unread,
Oct 10, 2012, 3:46:01 PM10/10/12
to Activescaffold
Also, you can style those links to display a loading icon for example

praveen

unread,
Oct 11, 2012, 5:48:21 AM10/11/12
to actives...@googlegroups.com

Thanks for your reply and suggestion...i'll give it a try

praveen

unread,
Oct 19, 2012, 2:47:59 AM10/19/12
to actives...@googlegroups.com
 Hi sergio cambra,
    
  My articles index page contains
       
       Embedded AS
       <%= render :active_scaffold => 'comments' %>  
    
 when i reload the page,first its displaying like this

     








Then ,after 2 seconds,it will show the table (table is empty and no association columns)







If table contains more data,then it will take more time.
But in Active scaffold 2.3,it is showing the table directly.
Please I dont want that link to be displayed.

Thanks,
Praveen

Sergio Cambra

unread,
Oct 19, 2012, 6:09:41 AM10/19/12
to actives...@googlegroups.com
You can add render_component_vho to your Gemfile to get 2.3 behaviour.

Without that gem it will use ajax, if your table is slow to load ajax will
take long, you can style link to give some feedback to the user.

If you use render_component_vho and embedded scaffold is slow, all page will
take long too. So anyway, you should improve loading time in both cases.

On Jueves, 18 de octubre de 2012 23:47:59 praveen escribió:
> Hi sergio cambra,
>
> My articles index page contains
>
> Embedded AS
> <%= render :active_scaffold => 'comments' %>
>
> when i reload the page,first its displaying like this
>
> <https://lh3.googleusercontent.com/-7ZLueGxFxCo/UID1eWUx5uI/AAAAAAAAAB4/Td6C
> tppVgrI/s1600/articles.png>
>
>
>
>
>
>
>
>
>
> Then ,after 2 seconds,it will show the table (table is empty and no
> association columns)
>
> <https://lh5.googleusercontent.com/-SFjJ0q5mFHI/UID18uEeV6I/AAAAAAAAACA/e1Z-
> JEya1So/s1600/articles2.png>

praveen

unread,
Oct 19, 2012, 7:41:43 AM10/19/12
to actives...@googlegroups.com
Thank you..its working..
Reply all
Reply to author
Forward
0 new messages