Okay, so I figured out the problem: if you use a plugin like
ssl_requirement, you have to explicitly mark the actions 'show_export'
and 'export' in the ssl_required filter... otherwise, it will generate
redirects that will break proper export.
-- Darien

On Jun 15, 5:01 pm, dkindlund <[email protected]> wrote:
> Interesting.  I tried using this plugin with Rails 2.3.2.1 + AS master
> and I keep running into this error when clicking the 'Export' button:
>
> https://127.0.0.1/hosts/export?format=csv
> Processing HostsController#show to csv (for 127.0.0.1 at 2009-06-15
> 20:18:49) [GET]
> Parameters: {"format"=>"csv", "action"=>"show", "id"=>"export",
> "controller"=>"hosts"} User Columns (3.2ms) SHOW FIELDS FROM users
> Host Load (7.3ms) SELECT * FROM hosts WHERE (hosts.id = 0)
>
> ActiveRecord::RecordNotFound (Couldn't find Host with ID=0):
>
> I think the problem is that the plugin doesn't properly take into
> account Rails RESTful routing, since it seems that Rails incorrectly
> interprets the "export" operation as some type of record id, instead
> of action.  Anyone have ideas on how to resolve this?  I'm guessing a
> solution involves editing config/routes.rb, but I don't have any idea
> what needs to change.
>
> -- Darien
>
> On Jun 15, 9:02 am, johnnybutler7 <[email protected]> wrote:
>
> > Answer,http://github.com/ewildgoose/active_scaffold_export/tree/master
>
> > JB
>
> > On 15 June, 12:42, johnnybutler7 <[email protected]> wrote:
>
> > > Can anyone confirm is this works with the latest version of rails?
>
> > > i get this error when trying to start
>
> > > c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/active_support/
> > > core_ext/module/aliasing.rb:33:in `alias_method': undefined method
> > > `template_search_path' for class
> > > `ActiveScaffold::Config::Core' (NameError)
> > >         from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> > > active_support/core_ext/module/aliasing.rb:33:in `alias_method_chain'
> > >         from C:/Documents and Settings/Administrator/My Documents/Aptana
> > > Studio/workspace/av3_plugins/vendor/plugins/activescaffoldexport/lib/
> > > config/core.rb:29
> > >         from C:/Documents and Settings/Administrator/My Documents/Aptana
> > > Studio/workspace/av3_plugins/vendor/plugins/activescaffoldexport/
> > > init.rb:7:in `load'
> > >         from C:/Documents and Settings/Administrator/My Documents/Aptana
> > > Studio/workspace/av3_plugins/vendor/plugins/activescaffoldexport/
> > > init.rb:7:in `evaluate_init_rb'
> > >         from 
> > > c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/plugin.rb:
> > > 146:in `evaluate_init_rb'
> > >         from c:/ruby/lib/ruby/gems/1.8/gems/activesupport-2.3.2/lib/
> > > active_support/core_ext/kernel/reporting.rb:11:in `silence_warnings'
> > >         from 
> > > c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/plugin.rb:
> > > 142:in `evaluate_init_rb'
> > >         from 
> > > c:/ruby/lib/ruby/gems/1.8/gems/rails-2.3.2/lib/rails/plugin.rb:
> > > 48:in `load'
> > >          ... 15 levels...
> > >         from 
> > > c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in
> > > `require'
> > >         from ./script/server:3
> > >         from -e:2:in `load'
> > >         from -e:2
>
> > > JB
--~--~---------~--~----~------------~-------~--~----~
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