Guest User

Untitled

a guest
Feb 19th, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.82 KB | None | 0 0
  1.  
  2. def add_to_company
  3. # puts params[:person_id]
  4. params[:workplace][:person] = Person.find_by_id(params[:person_id])
  5. params[:workplace][:company] = Company.find_by_name(params[:company][:name])
  6. @workplace = Workplace.new(params[:workplace])
  7.  
  8. if !@workplace.save
  9. # flash[:notice] = 'Fehler!'
  10. # ActionValidatorManager.validate(object, context);
  11. end
  12.  
  13. render :partial => 'workplace', :collection => Workplace.find_by_id(@workplace.id)
  14. #render :partial => 'workplace', :collection => params[:workplace][:person].workplaces
  15. # render (:update) do |page|
  16. # page.replace_html 'list_of_workplaces', :partial => 'workplace', :collection => params[:workplace][:person].workplaces
  17. # page[:list_of_workplaces].visual_effect(:pulsate, :duration => 2.seconds);
  18. # end
  19.  
  20. end
Add Comment
Please, Sign In to add comment