It's probably trivial question but i can't find any solutions to make this right.
def make_thing
@thing = Thing.new
if @thing.save
redirect_to some_path
end
end
<%= link_to "Make Thing", controller: :things, action: :make_thing %>
Sending multiple requests(by pressing "Make Thing" link) to "make_thing" action will multiple call save method before it would be redirected. So this will create multiple records. How can i record only single "thing" and redirect then?