Created
March 18, 2015 15:12
-
-
Save TiagoTi/471d8733e3b0ff5fb1c8 to your computer and use it in GitHub Desktop.
atrr_manual.face
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class YourController < ApplicationController | |
def new | |
@model = YourModel.new | |
end | |
def create | |
#set from the views | |
@model = YourModel.new(params[:model]) | |
#set manual | |
@model.anything= '...' | |
if @model.save | |
redirect_to @model, | |
else | |
render action: :new | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment