I have commited both fixes to scambra/active_scaffold_export

On Miércoles, 17 de Marzo de 2010 19:41:42 Soren Christensen escribió:
> And if you are on Master then the :table/:record notations is now
> replaced with :collection/:member
>
> So the AS_export code needs to be patched one more place to work on master.
> in active_scaffold_export/lib/active_scaffold/config/export.rb
> replace:
>      @@link =
> ActiveScaffold::DataStructures::ActionLink.new('show_export', :label =>
> 'Export', :type => :table, :security_method => :export_authorized?)
> with:
>      @@link =
> ActiveScaffold::DataStructures::ActionLink.new('show_export', :label =>
> 'Export', :type => :collection, :security_method => :export_authorized?)
>
> With both patches I have AS_Export working again with the latest AS from
> the Master branch.
>
> Patch format:
> index c29ac87..2e8dc65 100755
> @@ -10,7 +10,8 @@ module ActiveScaffold::Config
>       # --------------------------
>       # the ActionLink for this action
>       cattr_accessor :link
> -    @@link =
> ActiveScaffold::DataStructures::ActionLink.new('show_export', :label =>
> 'Export', :type => :table, :security_method => :export_authorized?)
> +    @@link =
> ActiveScaffold::DataStructures::ActionLink.new('show_export', :label =>
> 'Export', :type => :collection, :security_method => :export_authorized?)
>
>       # configures where the plugin itself is located. there is no
> instance version of this.
>       cattr_accessor :plugin_directory
>
> /S
>
> On 3/17/2010 10:38 AM, Nick Rogers wrote:
> > Looks like the active_scaffold_joins method was deprecated:
> >
> >     def active_scaffold_includes
> >       if respond_to? :active_scaffold_joins
> >
> >         ::ActiveSupport::Deprecation.warn("You have defined
> >
> > active_scaffold_joins, but it's deprecated because it's confusing, you
> > should use active_scaffold_includes now", caller)
> >         return active_scaffold_joins
> >       end
> >       @active_scaffold_includes ||= []
> >     end
> >
> > You can easily fix the active_scaffold_export plugin by changing the
> > one call to active_scaffold_joins to call active_scaffold_includes
> > instead.
> >
> > Can someone push this change to the ewildmoss active_scaffold_export?
> >
> > Index: lib/active_scaffold/actions/export.rb
> > ===================================================================
> > --- lib/active_scaffold/actions/export.rb
> > +++ lib/active_scaffold/actions/export.rb
> > @@ -61,7 +61,7 @@
> >        export_columns = export_config.columns.reject { |col|
> > params[:export_columns][col.name.to_sym].nil? }
> >        includes_for_export_columns = export_columns.collect{ |col|
> > col.includes }.flatten.uniq.compact
> > -      self.active_scaffold_joins.concat includes_for_export_columns
> > +      self.active_scaffold_includes.concat includes_for_export_columns
> >        find_options = { :sorting =>
> > active_scaffold_config.list.user.sorting }
> >        params[:search] = session[:search]
> >
> >
> >
> > On Wed, Mar 17, 2010 at 10:28 AM, Nick Rogers <[email protected]
> > <mailto:[email protected]>> wrote:
> >
> >     I just upgraded to latest rails-2.3 branch (I was about two months
> >     behind) and my export is broken now too.
> >
> >     I get an "undefined method `active_scaffold_joins' ..." exception
> >     when clicking on the "Update" button in the export form.
> >
> >
> >     On Tue, Mar 16, 2010 at 12:35 AM, Soren Christensen
> >     <[email protected] <mailto:[email protected]>> wrote:
> >
> >
> >         Interesting - will check that again tomorrow.
> >
> >         All I got today was that my exports was removed !
> >
> >         /S
> >
> >         On 3/15/2010 9:05 PM, Nick Rogers wrote:
> >>         Third! But FWIW the ewildgoose version has been working for
> >>         me on a relatively-recent checkout of active_scaffold + rails
> >>         2.3.5.
> >>
> >>         On Mon, Mar 15, 2010 at 8:14 PM, Ray Parker
> >>         <[email protected]
> >>         <mailto:[email protected]>> wrote:
> >>
> >>             2nd.
> >>
> >>         --
> >>         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]
> >>         <mailto:[email protected]>.
> >>         To unsubscribe from this group, send email to
> >>         [email protected]
> >>         <mailto:[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]
> >         <mailto:[email protected]>.
> >         To unsubscribe from this group, send email to
> >         [email protected]
> >         <mailto: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.

-- 
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].
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en.

Reply via email to