Skip to content

Instantly share code, notes, and snippets.

@Fernan2
Last active February 16, 2017 19:56
Show Gist options
  • Save Fernan2/858cd6540f6f2b3570f5cf10c2694591 to your computer and use it in GitHub Desktop.
Save Fernan2/858cd6540f6f2b3570f5cf10c2694591 to your computer and use it in GitHub Desktop.
Loop 1
for i in 0..(subscribers.length - 1)
subscribers[i].notify
end
for suscriber in subscribers
subscriber.notify
end
suscribers.each do |subscriber|
subscriber.notify
end
suscribers.each { |subscriber| subscriber.notify }
suscribers.each(&:notify)
blog = Blog.find(url)
if blog
subscription = subscribe(me, blog)
if subscription
notify_subscription(subscription)
else
subscription_failed
end
else
render_404
end
blog.find(url) or return render_404
subscription = subscribe(me, blog) or return subscription_failed
notify_subscription(subscription)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment