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 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This comment has been minimized.
That method is still a bit big.