Thank you for the fast reply. I have got something like you sent me, I have fix some things, now I have a strange mess of symbols after I go to controller/show_export :(
<https://lh4.googleusercontent.com/-Wi43D0sjFhU/VQA4rYGOogI/AAAAAAAAAGI/V3XuQChnYbw/s1600/%D0%A1%D0%BD%D0%B8%D0%BC%D0%BE%D0%BA%2B%D1%8D%D0%BA%D1%80%D0%B0%D0%BD%D0%B0%2B%D0%BE%D1%82%2B2015-03-11%2B15%3A44%3A01.png> Can you show me your export.axlsx file or something similar? среда, 11 марта 2015 г., 14:50:40 UTC+3 пользователь Sergio Cambra написал: > > It's not very different to member action > > class InvoicesController < ApplicationController > active_scaffold do |config| > config.action_links.add :show_export, :type => :collection, > :position => > :top > end > > def show_export > respond_to_action(:show_export) > end > > def export > process_action_link_action do > if range_selected > from = ... > to = ... > end > do_export(from, to) > end > end > > protected > > def show_export_respond_to_js > render :partial => 'show_export' > end > > def export_respond_to_html > render :partial => 'email' > end > end > > # show_export.html.erb > <div class="active-scaffold"> > <div class="show_export-view <%= "#{id_from_controller > params[:controller]}-view" %> view"> > <%= render :partial => 'show_export' -%> > </div> > </div> > > # _show_export.html.erb > disable xhr becuase we want to return file, so ajax must not be used > <%= render :partial => "base_form", :locals => {:form_action => :export, > :body_partial => 'show_export_form', > :xhr => false, > :headline => "Export"} %> > -- 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.
