mirror of
https://github.com/sharkdp/bat.git
synced 2026-10-30 10:06:12 +00:00
add new syntax test files
This commit is contained in:
1 parent
a5a9ac83e5
commit
591eba66a3
18 files changed
+646
No files matched your search
@@ -0,0 +1,22 @@
|
||||
class ContactsController < ApplicationController
|
||||
def new
|
||||
@contact = Contact.new
|
||||
end
|
||||
|
||||
def create
|
||||
@contact = Contact.new(secure_params)
|
||||
if @contact.valid?
|
||||
UserMailer.contact_email(@contact).deliver_now
|
||||
flash[:notice] = "Message sent from #{@contact.name}."
|
||||
redirect_to root_path
|
||||
else
|
||||
render :new
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def secure_params
|
||||
params.require(:contact).permit(:name, :email, :content)
|
||||
end
|
||||
end
|
||||
Reference in new issue
Block a user