Skip to content

Can I pass options in simple_table_for that can be used by the report? #46

@awh-tokyo

Description

@awh-tokyo

The documentation specifies that we can conditionally display columns like so:

column :email, if: :admin?

Where "admin?" is defined in the report class.

What I'd like to do is pass some report options through this line:

<%= simple_table_for @users, with: UserTable %>

, those options being visible by the report class's methods.

My application has a few different ways of listing the same data, so it makes sense that I should have a single table definition and then just conditionally display the appropriate columns.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions