Last active
February 16, 2017 19:56
-
-
Save Fernan2/858cd6540f6f2b3570f5cf10c2694591 to your computer and use it in GitHub Desktop.
Loop 1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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