Create a gist now

Instantly share code, notes, and snippets.

def create
@entry = Entry.new(entry_params)
@entry.user_id = current_user.id
@entry.status = EntryStatus.new(
entry_params[:status_weather],
entry_params[:status_landform]
)
if @entry.save
flash[:notice] = "Entry was successfully created."
else
flash[:error] = @entry.errors.full_messages.to_sentence
end
redirect_to root_path
end
@chabgood

That method is still a bit big.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment