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

Introduction current_rails_admin #676

Closed
wants to merge 1 commit into from

Conversation

ingeniarius
Copy link

Instead of using '_current_user' or 'current_user'
we can to introduce 'current_rails_admin' which would point to existing app methods:
current_user, current_admin, and etc

Styling page header
@bbenezech
Copy link
Collaborator

I think _current_user was made for that purpose. We should auto-detect that anyway. I'll have a look at all this tmrw. Thanks.

@bartocc
Copy link
Contributor

bartocc commented Aug 25, 2011

I don't see the benefit of current_rails_admin over _current_user.
@ingeniarius, what would it be ?

But there is definitely a bug in the _header partial
current_user is used on lines 10 and 11 while it should be _current_user

The README should also be more explicit after
rake rails_admin:install model_name=member

and specify how to use config.current_user_method

@ingeniarius
Copy link
Author

I just said that will be good to have special method which is not intersect with existing and _current_user looks like "private" method.

What do you think about?
instead of:
instance_eval &RailsAdmin::Config.current_user_method

just call a predefined method by name:
send RailsAdmin::Config.current_rails_admin_method

@bbenezech bbenezech closed this in 21b524e Sep 1, 2011
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

Successfully merging this pull request may close these issues.

None yet

3 participants