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

Examples? #16

Open
plaksel opened this issue Oct 14, 2014 · 6 comments
Open

Examples? #16

plaksel opened this issue Oct 14, 2014 · 6 comments

Comments

@plaksel
Copy link

plaksel commented Oct 14, 2014

Would love to use this gem, but are there any examples available to have a look?

Cheers

@dwbutler
Copy link
Owner

There is a section in the readme: Using For Authorization. Does that help? Or were you looking for a full example application?

@plaksel
Copy link
Author

plaksel commented Oct 14, 2014

I am curious to just play around with functionalities of this gem in a full example application. It will give me a better idea what is feasible and what is not, sounds like something more people would be interested in. One of those demo kinda things.

@dwbutler
Copy link
Owner

Got it. There is no example application, but I'll create one if I can find the time.

@ghost
Copy link

ghost commented Jan 10, 2015

I've installed this gem and it's working like a charm (Devise+Rails 4.1.8), only thing is I'm not quite sure how to add existing users/profiles to a group other than doing it on the console... Perhaps a basic example app would be greatly appreciated by several of us rails newbies 😄

@thomasjoshi
Copy link

You figured out how to use devise? How did you list out all the groups that belonged to a user in your controller? Because I keep getting an Nill:Class Error for groups with the line

def index
@groups = current_user.groups
end

@dwbutler
Copy link
Owner

Integrating with Devise is beyond the scope of Groupify, but when I make a sample app it will certainly have Devise integration.

If current_user is nil, this usually means the user is logged out. You can guard against this with the user_signed_in? helper method. Or you can enforce that the user must be signed in by adding this line to the controller: before_action :authenticate_user

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

No branches or pull requests

3 participants