Sorry I send you wrong puts line, I wanted to use same line as AS code. Also, to print in log logger.info must be used instead of puts. Anyway, hrefs are right, it's setting right scope, so I consider it's already fixed. Thanks for your help
El Miércoles, 21 de mayo de 2014 16:10:14 'Andrey Korobkov' via ActiveScaffold : Ruby on Rails Gem escribió: > On Fri, 16 May 2014 08:46:06 +0200 > > Sergio Cambra <[email protected]> wrote: > > You should use > > puts > > html_options[:name].scan(/^record((\[[^\]]*\])*)\[#{column.name[1]}\]/).i > > nspect if html_options[:name] Becuase previous regexp was wrong, I changed > > AS to use this one. > > > > Also, you can check href on refresh link and look for scope there. > > Here is how it's now: > > def active_scaffold_refresh_link(column, html_options, record) > super > rescue > puts html_options[:name] > puts > html_options[:name].scan(/^record((\[[^\]]*\])*)\[#{column.name[1]}\]/).ins > pect if html_options[:name] raise > end > > It prints nothing into the log. The scope hrefs on refresh links are: > http://localhost:3000/fremantle/resources/render_field?column=resource_type& > parent_controller=fremantle%2Fresources&scope= > > http://localhost:3000/fremantle/person_resources/render_field?column=person& > parent_controller=fremantle%2Fresources&scope=%5Bperson_resources%5D%5B14006 > 73924837%5D > > http://localhost:3000/fremantle/subdivision_resources/render_field?column=su > bdivision&parent_controller=fremantle%2Fresources&scope=%5Bsubdivision_resou > rces%5D%5B1400673925005%5D > > > But actual AS code in the master still uses slightly different scope finder: > > scope = > html_options[:name].scan(/^record((\[[^\]]*\])*)\[#{column.name}\]/)[0].try > (:first) if html_options[:name] > > How do you consider all this? Is it OK or not? I'm ready to continue debug > ;) > > -- > Andrey -- You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails Gem" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/activescaffold. For more options, visit https://groups.google.com/d/optout.
