Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- JOB
- > model
- has_many :applications
- has_many :members, :through => :applications
- > controller
- def apply
- @application = Application.new(params[:application])
- @application.member = @current_user
- @application.job = Job.find(params[:id])
- if request.post? and @application.save
- flash[:notice] = 'Job was applied'
- redirect_to :action => 'index'
- end
- end
Add Comment
Please, Sign In to add comment