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

Fix search facility (#143) #145

Merged
merged 1 commit into from
Mar 1, 2013
Merged

Fix search facility (#143) #145

merged 1 commit into from
Mar 1, 2013

Conversation

mjtko
Copy link
Contributor

@mjtko mjtko commented Mar 1, 2013

This PR fixes the search facility by setting current-user in the search view (fixes #143).

@gabceb
Copy link
Member

gabceb commented Mar 1, 2013

I think this is completely fine but why not just add this to user.rb

def as_json(options = nil)
     super(:only => [:id, :username, :email, :first_name, :last_name, :authentication_token, :gravatar_hash])
end

and then just call current_user.to_json

@gabceb
Copy link
Member

gabceb commented Mar 1, 2013

This way we can also use this on controllers (I know there is some controller in there doing some crazy hash merge on user but I cannot remember where is it :) )

gabceb added a commit that referenced this pull request Mar 1, 2013
@gabceb gabceb merged commit 3b39026 into kandanapp:master Mar 1, 2013
ar7em pushed a commit to ar7em/kandan that referenced this pull request Jun 9, 2013
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.

Search facility is non-functional
2 participants