Guest User

Untitled

a guest
Mar 14th, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.33 KB | None | 0 0
  1. def create
  2. @notice = Notice.new(params[:notice])
  3. @user = ????????????????? # musisz to ustawic, poczytaj o acts_as_authentic
  4. @notice.author = @user.name + ' ' + @user.surname
  5. if @notice.save
  6. flash[:notice] = 'Saved OK'
  7. redirect_to "cokolwiek"
  8. else
  9. flash[:error] = "Problem etc."
  10. render :action => 'new'
  11. end
  12. end
Add Comment
Please, Sign In to add comment