Sorry, you are not allowed to access that page

Dear friends,

I have a method named show_rosterduty in employee controller and and a view name show_rosterduty.html.erb

in the authorization_rules I already set the name of method along with other methods of employee, means below the method add_rosterduty.

but it give me the error:

Sorry, you are not allowed to access that page

here are the methods below:

######### Roster Duty ######### def add_rosterduty    @rosterduty = RosterDuty.new(params[:rosterduty])    #logger.info( "Employee: #{@employee.inspect}")    @employee = Employee.find(params[:id])     if request.post? and @rosterduty.save       flash[:notice] = t('flash1')       redirect_to :controller => "employee", :action => "add_rosterduty", :id => @employee.id and return     end end

def show_rosterduty     @rosterduty = RosterDuty.find(params[:id])     @employee = Employee.find(params[:id])     respond_to do |format|       format.html # show_rosterduty.html.erb       format.xml { render :xml => @rosterduty }     end   end

Dear friends,

I have a method named show_rosterduty in employee controller and and a view name show_rosterduty.html.erb

in the authorization_rules I already set the name of method along with other methods of employee, means below the method add_rosterduty.

but it give me the error:

Sorry, you are not allowed to access that page

Probably a before-filter is not allowing access. Have a look in the log for clues.

Am I right in thinking that you are an inexperienced developer who has been given the job of maintaining an existing app? If so then I think it would be well worth your while taking some time out to learn the basics of rails before continuing. If you are being employed to do this then tell your employer. Otherwise I suggest starting with the tutorial at railstutorial.org, which is free to use online.

Colin

Am I right in thinking that you are an inexperienced developer who has been given the job of maintaining an existing app? If so then I think it would be well worth your while taking some time out to learn the basics of rails before continuing. If you are being employed to do this then tell your employer. Otherwise I suggest starting with the tutorial at railstutorial.org, which is free to use online.

Colin

You are right I am new to Rails programming, and I am editing/updating an existing app for my organization, I am learning along with work but due to lack of time I cant learn quickly, and also there is too many things different from Rails version to version.

Anyway thanks a lot the problem resolved now. It was before filter issue.

That's OK, I am sure people here will continue willingly to give their time freely so that your organisation can save on the cost of training you in the basics of Ruby and Rails.

Colin