Class: Incline::ContactController
- Inherits:
-
ApplicationController
- Object
- ActionController::Base
- ApplicationController
- Incline::ContactController
- Defined in:
- app/controllers/incline/contact_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
POST /incline/contact.
-
#new ⇒ Object
GET /incline/contact.
Instance Method Details
#create ⇒ Object
POST /incline/contact
14 15 16 17 18 19 20 21 22 23 24 |
# File 'app/controllers/incline/contact_controller.rb', line 14 def create @msg = if @msg.valid? @msg.remote_ip = request.remote_ip @msg. flash[:success] = 'Your message has been sent.' redirect_to main_app.root_url else render 'new' end end |
#new ⇒ Object
GET /incline/contact
8 9 10 |
# File 'app/controllers/incline/contact_controller.rb', line 8 def new @msg = Incline::ContactMessage.new end |