Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

undefined method `capable_of_hosting_filter_related_icons?' for nil:NilClass #322

Open
thadeu opened this issue Aug 26, 2016 · 2 comments
Open

Comments

@thadeu
Copy link

thadeu commented Aug 26, 2016

_individuals_grid.html.erb

<%= define_grid(@individuals_grid, hide_submit_button: true, hide_reset_button: true, hide_csv_button: true) do |g|

  g.blank_slate  do
    "Sem registros encontrados"
  end

  # HTML
  g.column in_html: false, in_csv: true,
          name:  'Data Criacao',
          attribute: 'created_at',
          filter_type: :date,
          ordering: false,
          detach_with_id: :created_at_filter do |task|
    l(task.created_at, format: :default_date)
  end
end -%>

MyController

@individuals = Registration::Individual.all
@individuals_grid = initialize_grid(@individuals,
     per_page: 50,
     name: 'individuals',
     enable_export_to_csv: true,
     csv_field_separator: ';',
     csv_file_name: "#{DateTime.now.to_date}-individuals"
)

  if params[:individuals] && params[:individuals][:export] == "csv"
      export_grid_if_requested('individuals' => 'registration/individuals/grids/individuals_grid') do
         render :index
      end
 end

where you are wrong?

@thadeu
Copy link
Author

thadeu commented Aug 26, 2016

captura de tela 2016-08-26 as 17 38 44

@leikind
Copy link
Owner

leikind commented Aug 26, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants