Skip to content

Instantly share code, notes, and snippets.

@TiagoTi
Created March 18, 2015 15:12
Show Gist options
  • Save TiagoTi/471d8733e3b0ff5fb1c8 to your computer and use it in GitHub Desktop.
Save TiagoTi/471d8733e3b0ff5fb1c8 to your computer and use it in GitHub Desktop.
atrr_manual.face
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