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]}\]/).inspect
>  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]}\]/).inspect 
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%5B1400673924837%5D

http://localhost:3000/fremantle/subdivision_resources/render_field?column=subdivision&parent_controller=fremantle%2Fresources&scope=%5Bsubdivision_resources%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.
  • ActionView::Templ... 'Andrey Korobkov' via ActiveScaffold : Ruby on Rails Gem
    • Re: ActionVi... 'Andrey Korobkov' via ActiveScaffold : Ruby on Rails Gem
      • Re: Acti... Sergio Cambra
        • Re: ... 'Andrey Korobkov' via ActiveScaffold : Ruby on Rails Gem
          • ... Sergio Cambra
            • ... 'Andrey Korobkov' via ActiveScaffold : Ruby on Rails Gem
              • ... Sergio Cambra
                • ... 'Andrey Korobkov' via ActiveScaffold : Ruby on Rails Gem
                • ... Sergio Cambra

Reply via email to