Hi All, I have created sample job application which contain employers area, admin area and I am using Mysql database. I have created job post area or form via scaffold then I created authenticated area for employers via act_as_authenticated, now I have two users when they login they can see all posts and they can update or delete. I want each user see his job posts, and by the way I have users table which created by act_as_authenticated and jobs tables I have created manually for job posts. I have added FK called users_id in jobs table and it pointing to PK ID in users tables. When the employer fill new job post his ID not add to the database I don''t know why. Could you please guide me to fix users authentications? I am reading Agile Web Development with Rails book which good but it talk about shopping cart, I have not find what I need in other book, this is why I wrote my post here and looking for your help. Yours, Waleed --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You will need to post the problem code. On Dec 13, 11:06 am, Waleed Harbi <waleed.ha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi All, > > I have created sample job application which contain employers area, > admin area and I am using Mysql database. I have created job post area > or form via scaffold then I created authenticated area for employers > via act_as_authenticated, now I have two users when they login they > can see all posts and they can update or delete. > > I want each user see his job posts, and by the way I have users table > which created by act_as_authenticated and jobs tables I have created > manually for job posts. I have added FK called users_id in jobs table > and it pointing to PK ID in users tables. When the employer fill new > job post his ID not add to the database I don''t know why. > > Could you please guide me to fix users authentications? > > I am reading Agile Web Development with Rails book which good but it > talk about shopping cart, I have not find what I need in other book, > this is why I wrote my post here and looking for your help. > > Yours, > Waleed--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
My post code I called employer as you see below : class EmployerController < ApplicationController before_filter :login_required def index list render :action => ''list'' end # GETs should be safe (see http://www.w3.org/2001/tag/doc/whenToUseGet.html) verify :method => :post, :only => [ :destroy, :create, :update ], :redirect_to => { :action => :list } def list @job_pages, @jobs = paginate :jobs, :per_page => 10 end def show @job = Job.find(params[:id]) end def new @job = Job.new end def create @job = Job.new(params[:job]) if @job.save flash[:notice] = ''Job was successfully created.'' redirect_to :action => ''list'' else render :action => ''new'' end end def edit @job = Job.find(params[:id]) end def update @job = Job.find(params[:id]) if @job.update_attributes(params[:job]) flash[:notice] = ''Job was successfully updated.'' redirect_to :action => ''show'', :id => @job else render :action => ''edit'' end end def destroy Job.find(params[:id]).destroy redirect_to :action => ''list'' end end This above code generated by scaffold and I have added before_filter :login_required. On Dec 13, 7:47 pm, Charles <rowe.char...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> You will need to post the problem code. > > On Dec 13, 11:06 am, Waleed Harbi <waleed.ha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi All, > > > I have created sample job application which contain employers area, > > admin area and I am using Mysql database. I have created job post area > > or form via scaffold then I created authenticated area for employers > > via act_as_authenticated, now I have two users when they login they > > can see all posts and they can update or delete. > > > I want each user see his job posts, and by the way I have users table > > which created by act_as_authenticated and jobs tables I have created > > manually for job posts. I have added FK called users_id in jobs table > > and it pointing to PK ID in users tables. When the employer fill new > > job post his ID not add to the database I don''t know why. > > > Could you please guide me to fix users authentications? > > > I am reading Agile Web Development with Rails book which good but it > > talk about shopping cart, I have not find what I need in other book, > > this is why I wrote my post here and looking for your help. > > > Yours, > > Waleed--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
You need to make some new files. A User model (which I think you already have) which belongs_to :employer An Employer model which has_many :jobs, and has_one :user A Job Model which belongs_to :employer The code you listed shows all your Job activies in your employer controller. Get all your controller code generated. I have the feeling you got a little mixed up. thanks, C. On Dec 13, 11:55 am, Waleed Harbi <waleed.ha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> My post code I called employer as you see below : > > class EmployerController < ApplicationController > before_filter :login_required > > def index > list > render :action => ''list'' > > end > > # GETs should be safe (seehttp://www.w3.org/2001/tag/doc/whenToUseGet.html) > verify :method => :post, :only => [ :destroy, :create, :update ], > :redirect_to => { :action => :list } > > def list > > @job_pages, @jobs = paginate :jobs, :per_page => 10 > > end > > def show > @job = Job.find(params[:id]) > end > > def new > @job = Job.new > end > > def create > @job = Job.new(params[:job]) > if @job.save > flash[:notice] = ''Job was successfully created.'' > redirect_to :action => ''list'' > else > render :action => ''new'' > end > end > > def edit > @job = Job.find(params[:id]) > end > > def update > @job = Job.find(params[:id]) > if @job.update_attributes(params[:job]) > flash[:notice] = ''Job was successfully updated.'' > redirect_to :action => ''show'', :id => @job > else > render :action => ''edit'' > end > end > > def destroy > Job.find(params[:id]).destroy > redirect_to :action => ''list'' > end > end > > This above code generated by scaffold and I have added > before_filter :login_required. > > On Dec 13, 7:47 pm, Charles <rowe.char...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > You will need to post the problem code. > > > On Dec 13, 11:06 am, Waleed Harbi <waleed.ha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Hi All, > > > > I have created sample job application which contain employers area, > > > admin area and I am using Mysql database. I have created job post area > > > or form via scaffold then I created authenticated area for employers > > > via act_as_authenticated, now I have two users when they login they > > > can see all posts and they can update or delete. > > > > I want each user see his job posts, and by the way I have users table > > > which created by act_as_authenticated and jobs tables I have created > > > manually for job posts. I have added FK called users_id in jobs table > > > and it pointing to PK ID in users tables. When the employer fill new > > > job post his ID not add to the database I don''t know why. > > > > Could you please guide me to fix users authentications? > > > > I am reading Agile Web Development with Rails book which good but it > > > talk about shopping cart, I have not find what I need in other book, > > > this is why I wrote my post here and looking for your help. > > > > Yours, > > > Waleed--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Could you please clarify it more? 1- I will add belongs_to :employer to User model 2- I do not have employer model and I have created it also I added has_many :jobs, and has_one :user 3- I added belongs_to :employer to Job model. Still not work it show all list for all posts, by the way do I need create FK in my database? when I post new job i saw my FK null. Any advices please ? On Dec 13, 10:09 pm, Charles <rowe.char...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> You need to make some new files. > > A User model (which I think you already have) which > belongs_to :employer > An Employer model which has_many :jobs, and has_one :user > A Job Model which belongs_to :employer > > The code you listed shows all your Job activies in your employer > controller. > Get all your controller code generated. I have the feeling you got a > little mixed up. > > thanks, > C. > > On Dec 13, 11:55 am, Waleed Harbi <waleed.ha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > My post code I called employer as you see below : > > > class EmployerController < ApplicationController > > before_filter :login_required > > > def index > > list > > render :action => ''list'' > > > end > > > # GETs should be safe (seehttp://www.w3.org/2001/tag/doc/whenToUseGet.html) > > verify :method => :post, :only => [ :destroy, :create, :update ], > > :redirect_to => { :action => :list } > > > def list > > > @job_pages, @jobs = paginate :jobs, :per_page => 10 > > > end > > > def show > > @job = Job.find(params[:id]) > > end > > > def new > > @job = Job.new > > end > > > def create > > @job = Job.new(params[:job]) > > if @job.save > > flash[:notice] = ''Job was successfully created.'' > > redirect_to :action => ''list'' > > else > > render :action => ''new'' > > end > > end > > > def edit > > @job = Job.find(params[:id]) > > end > > > def update > > @job = Job.find(params[:id]) > > if @job.update_attributes(params[:job]) > > flash[:notice] = ''Job was successfully updated.'' > > redirect_to :action => ''show'', :id => @job > > else > > render :action => ''edit'' > > end > > end > > > def destroy > > Job.find(params[:id]).destroy > > redirect_to :action => ''list'' > > end > > end > > > This above code generated by scaffold and I have added > > before_filter :login_required. > > > On Dec 13, 7:47 pm, Charles <rowe.char...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > You will need to post the problem code. > > > > On Dec 13, 11:06 am, Waleed Harbi <waleed.ha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi All, > > > > > I have created sample job application which contain employers area, > > > > admin area and I am using Mysql database. I have created job post area > > > > or form via scaffold then I created authenticated area for employers > > > > via act_as_authenticated, now I have two users when they login they > > > > can see all posts and they can update or delete. > > > > > I want each user see his job posts, and by the way I have users table > > > > which created by act_as_authenticated and jobs tables I have created > > > > manually for job posts. I have added FK called users_id in jobs table > > > > and it pointing to PK ID in users tables. When the employer fill new > > > > job post his ID not add to the database I don''t know why. > > > > > Could you please guide me to fix users authentications? > > > > > I am reading Agile Web Development with Rails book which good but it > > > > talk about shopping cart, I have not find what I need in other book, > > > > this is why I wrote my post here and looking for your help. > > > > > Yours, > > > > Waleed--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
bcparanj-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org
2007-Dec-13 20:11 UTC
Re: Job System user authentications problems
The must be user_id not users_id. That could be the problem. Look at the output in the dev log. On Dec 13, 12:05 pm, Waleed Harbi <waleed.ha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Could you please clarify it more? > > 1- I will add belongs_to :employer to User model > 2- I do not have employer model and I have created it also I added > has_many :jobs, and has_one :user > 3- I added belongs_to :employer to Job model. > > Still not work it show all list for all posts, by the way do I need > create FK in my database? when I post new job i saw my FK null. > > Any advices please ? > > On Dec 13, 10:09 pm, Charles <rowe.char...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > You need to make some new files. > > > A User model (which I think you already have) which > > belongs_to :employer > > An Employer model which has_many :jobs, and has_one :user > > A Job Model which belongs_to :employer > > > The code you listed shows all your Job activies in your employer > > controller. > > Get all your controller code generated. I have the feeling you got a > > little mixed up. > > > thanks, > > C. > > > On Dec 13, 11:55 am, Waleed Harbi <waleed.ha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > My post code I called employer as you see below : > > > > class EmployerController < ApplicationController > > > before_filter :login_required > > > > def index > > > list > > > render :action => ''list'' > > > > end > > > > # GETs should be safe (seehttp://www.w3.org/2001/tag/doc/whenToUseGet.html) > > > verify :method => :post, :only => [ :destroy, :create, :update ], > > > :redirect_to => { :action => :list } > > > > def list > > > > @job_pages, @jobs = paginate :jobs, :per_page => 10 > > > > end > > > > def show > > > @job = Job.find(params[:id]) > > > end > > > > def new > > > @job = Job.new > > > end > > > > def create > > > @job = Job.new(params[:job]) > > > if @job.save > > > flash[:notice] = ''Job was successfully created.'' > > > redirect_to :action => ''list'' > > > else > > > render :action => ''new'' > > > end > > > end > > > > def edit > > > @job = Job.find(params[:id]) > > > end > > > > def update > > > @job = Job.find(params[:id]) > > > if @job.update_attributes(params[:job]) > > > flash[:notice] = ''Job was successfully updated.'' > > > redirect_to :action => ''show'', :id => @job > > > else > > > render :action => ''edit'' > > > end > > > end > > > > def destroy > > > Job.find(params[:id]).destroy > > > redirect_to :action => ''list'' > > > end > > > end > > > > This above code generated by scaffold and I have added > > > before_filter :login_required. > > > > On Dec 13, 7:47 pm, Charles <rowe.char...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > You will need to post the problem code. > > > > > On Dec 13, 11:06 am, Waleed Harbi <waleed.ha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > Hi All, > > > > > > I have created sample job application which contain employers area, > > > > > admin area and I am using Mysql database. I have created job post area > > > > > or form via scaffold then I created authenticated area for employers > > > > > via act_as_authenticated, now I have two users when they login they > > > > > can see all posts and they can update or delete. > > > > > > I want each user see his job posts, and by the way I have users table > > > > > which created by act_as_authenticated and jobs tables I have created > > > > > manually for job posts. I have added FK called users_id in jobs table > > > > > and it pointing to PK ID in users tables. When the employer fill new > > > > > job post his ID not add to the database I don''t know why. > > > > > > Could you please guide me to fix users authentications? > > > > > > I am reading Agile Web Development with Rails book which good but it > > > > > talk about shopping cart, I have not find what I need in other book, > > > > > this is why I wrote my post here and looking for your help. > > > > > > Yours, > > > > > Waleed--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
It is user_id On Dec 13, 11:11 pm, "bcpar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <bcpar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> The must be user_id not users_id. That could be the problem. Look at > the output in the dev log. > > On Dec 13, 12:05 pm, Waleed Harbi <waleed.ha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Could you please clarify it more? > > > 1- I will add belongs_to :employer to User model > > 2- I do not have employer model and I have created it also I added > > has_many :jobs, and has_one :user > > 3- I added belongs_to :employer to Job model. > > > Still not work it show all list for all posts, by the way do I need > > create FK in my database? when I post new job i saw my FK null. > > > Any advices please ? > > > On Dec 13, 10:09 pm, Charles <rowe.char...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > You need to make some new files. > > > > A User model (which I think you already have) which > > > belongs_to :employer > > > An Employer model which has_many :jobs, and has_one :user > > > A Job Model which belongs_to :employer > > > > The code you listed shows all your Job activies in your employer > > > controller. > > > Get all your controller code generated. I have the feeling you got a > > > little mixed up. > > > > thanks, > > > C. > > > > On Dec 13, 11:55 am, Waleed Harbi <waleed.ha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > My post code I called employer as you see below : > > > > > class EmployerController < ApplicationController > > > > before_filter :login_required > > > > > def index > > > > list > > > > render :action => ''list'' > > > > > end > > > > > # GETs should be safe (seehttp://www.w3.org/2001/tag/doc/whenToUseGet.html) > > > > verify :method => :post, :only => [ :destroy, :create, :update ], > > > > :redirect_to => { :action => :list } > > > > > def list > > > > > @job_pages, @jobs = paginate :jobs, :per_page => 10 > > > > > end > > > > > def show > > > > @job = Job.find(params[:id]) > > > > end > > > > > def new > > > > @job = Job.new > > > > end > > > > > def create > > > > @job = Job.new(params[:job]) > > > > if @job.save > > > > flash[:notice] = ''Job was successfully created.'' > > > > redirect_to :action => ''list'' > > > > else > > > > render :action => ''new'' > > > > end > > > > end > > > > > def edit > > > > @job = Job.find(params[:id]) > > > > end > > > > > def update > > > > @job = Job.find(params[:id]) > > > > if @job.update_attributes(params[:job]) > > > > flash[:notice] = ''Job was successfully updated.'' > > > > redirect_to :action => ''show'', :id => @job > > > > else > > > > render :action => ''edit'' > > > > end > > > > end > > > > > def destroy > > > > Job.find(params[:id]).destroy > > > > redirect_to :action => ''list'' > > > > end > > > > end > > > > > This above code generated by scaffold and I have added > > > > before_filter :login_required. > > > > > On Dec 13, 7:47 pm, Charles <rowe.char...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > You will need to post the problem code. > > > > > > On Dec 13, 11:06 am, Waleed Harbi <waleed.ha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > Hi All, > > > > > > > I have created sample job application which contain employers area, > > > > > > admin area and I am using Mysql database. I have created job post area > > > > > > or form via scaffold then I created authenticated area for employers > > > > > > via act_as_authenticated, now I have two users when they login they > > > > > > can see all posts and they can update or delete. > > > > > > > I want each user see his job posts, and by the way I have users table > > > > > > which created by act_as_authenticated and jobs tables I have created > > > > > > manually for job posts. I have added FK called users_id in jobs table > > > > > > and it pointing to PK ID in users tables. When the employer fill new > > > > > > job post his ID not add to the database I don''t know why. > > > > > > > Could you please guide me to fix users authentications? > > > > > > > I am reading Agile Web Development with Rails book which good but it > > > > > > talk about shopping cart, I have not find what I need in other book, > > > > > > this is why I wrote my post here and looking for your help. > > > > > > > Yours, > > > > > > Waleed--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
If you are seeing all jobs for all posts you are making progress. If your Employer model has_many :jobs than you can do something like @first_employer = Employer.find(:first) than in a view you can do <% @first_employer.jobs.each do |job| %> <%= job.id %> <br /> <% end %> On Dec 13, 3:14 pm, Waleed Harbi <waleed.ha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> It is user_id > > On Dec 13, 11:11 pm, "bcpar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org" <bcpar...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > The must be user_id not users_id. That could be the problem. Look at > > the output in the dev log. > > > On Dec 13, 12:05 pm, Waleed Harbi <waleed.ha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > Could you please clarify it more? > > > > 1- I will add belongs_to :employer to User model > > > 2- I do not have employer model and I have created it also I added > > > has_many :jobs, and has_one :user > > > 3- I added belongs_to :employer to Job model. > > > > Still not work it show all list for all posts, by the way do I need > > > create FK in my database? when I post new job i saw my FK null. > > > > Any advices please ? > > > > On Dec 13, 10:09 pm, Charles <rowe.char...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > You need to make some new files. > > > > > A User model (which I think you already have) which > > > > belongs_to :employer > > > > An Employer model which has_many :jobs, and has_one :user > > > > A Job Model which belongs_to :employer > > > > > The code you listed shows all your Job activies in your employer > > > > controller. > > > > Get all your controller code generated. I have the feeling you got a > > > > little mixed up. > > > > > thanks, > > > > C. > > > > > On Dec 13, 11:55 am, Waleed Harbi <waleed.ha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > My post code I called employer as you see below : > > > > > > class EmployerController < ApplicationController > > > > > before_filter :login_required > > > > > > def index > > > > > list > > > > > render :action => ''list'' > > > > > > end > > > > > > # GETs should be safe (seehttp://www.w3.org/2001/tag/doc/whenToUseGet.html) > > > > > verify :method => :post, :only => [ :destroy, :create, :update ], > > > > > :redirect_to => { :action => :list } > > > > > > def list > > > > > > @job_pages, @jobs = paginate :jobs, :per_page => 10 > > > > > > end > > > > > > def show > > > > > @job = Job.find(params[:id]) > > > > > end > > > > > > def new > > > > > @job = Job.new > > > > > end > > > > > > def create > > > > > @job = Job.new(params[:job]) > > > > > if @job.save > > > > > flash[:notice] = ''Job was successfully created.'' > > > > > redirect_to :action => ''list'' > > > > > else > > > > > render :action => ''new'' > > > > > end > > > > > end > > > > > > def edit > > > > > @job = Job.find(params[:id]) > > > > > end > > > > > > def update > > > > > @job = Job.find(params[:id]) > > > > > if @job.update_attributes(params[:job]) > > > > > flash[:notice] = ''Job was successfully updated.'' > > > > > redirect_to :action => ''show'', :id => @job > > > > > else > > > > > render :action => ''edit'' > > > > > end > > > > > end > > > > > > def destroy > > > > > Job.find(params[:id]).destroy > > > > > redirect_to :action => ''list'' > > > > > end > > > > > end > > > > > > This above code generated by scaffold and I have added > > > > > before_filter :login_required. > > > > > > On Dec 13, 7:47 pm, Charles <rowe.char...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > You will need to post the problem code. > > > > > > > On Dec 13, 11:06 am, Waleed Harbi <waleed.ha...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > > > > Hi All, > > > > > > > > I have created sample job application which contain employers area, > > > > > > > admin area and I am using Mysql database. I have created job post area > > > > > > > or form via scaffold then I created authenticated area for employers > > > > > > > via act_as_authenticated, now I have two users when they login they > > > > > > > can see all posts and they can update or delete. > > > > > > > > I want each user see his job posts, and by the way I have users table > > > > > > > which created by act_as_authenticated and jobs tables I have created > > > > > > > manually for job posts. I have added FK called users_id in jobs table > > > > > > > and it pointing to PK ID in users tables. When the employer fill new > > > > > > > job post his ID not add to the database I don''t know why. > > > > > > > > Could you please guide me to fix users authentications? > > > > > > > > I am reading Agile Web Development with Rails book which good but it > > > > > > > talk about shopping cart, I have not find what I need in other book, > > > > > > > this is why I wrote my post here and looking for your help. > > > > > > > > Yours, > > > > > > > Waleed--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---