381

Re: Restful Authentication with all the bells and whistles (new 9/05/08)

I followed the old tutorial outlined in post 246 and I have gotten what I want working from it, namely the admin panel.
My app is such that a user belongs to a specific organisation and each organisation has its own collection of movies. Each user can only view the organisation it belongs to movies'.
I am now trying to add the functionality of the admin being able to set a user's organisation.

So the link in _user.html.erb

<td><%= link_to 'edit roles', user_roles_path(user) %></td>

works perfectly but when I try to copy it and create

<td><%= link_to 'edit organisation', user_organisations_path(user) %></td>

I get a no such method exists error.


If I type "http://127.0.0.1:3001/users/27/roles" into the address bar while logged in as admin, I am taken to the roles page for user 27 but if I try "http://127.0.0.1:3001/users/27/organisations" I get "No action responded to 27. Actions: activate, create, destroy, edit, enable, index, new, show, and update".

My feeling is that this is occurring because a user has a role but a user belongs to an organisation. I've been playing about with it for a few hours and can't figure out a way to get it so I can edit a user's organisation as admin. I can do it as the user but this is not the behaviour I want.

Any help much appreciated.

Last edited by Cloud (2010-01-14 19:50:18)

Re: Restful Authentication with all the bells and whistles (new 9/05/08)

I have a doubt, how do we disable validation for password field in restful authentication.

Re: Restful Authentication with all the bells and whistles (new 9/05/08)

I am new to ruby on rails development. I need an already built app. This app is fantastic satisfies not all but every need. The problem i am facing now is that the email activation is not working . No email is sent to the signup email. I gave my google account in the config.yml file. I have no idea whats goin on....

Re: Restful Authentication with all the bells and whistles (new 9/05/08)

Hi:

I'm trying to add new features and tests to an existing rails app that has successfully implemented the restful_authentication plugin.

However, I'm using RSpec, while the original developer is using Rails built-in testing framework (we're on Rails 2.3.5.)

I'm trying to test a testimonial creation controller which should only be accessible to logged in users with the 'administrator' role. One example looks like this:

    describe

Re: Restful Authentication with all the bells and whistles (new 9/05/08)

Thanks for the tutorial - looks very good and complete....

One thing that has me a bit confused with these Authentication examples is how to set one up for a public site ( i.e. a social networking site ) and setting one up for a private admin part of a site.

Could you give me a few tips on what the key differences would be.