05 May '13, 4pm

public_activity // social network-style / “ASCIIcasts - “Episode 406 - Public Activity””

public_activity // social network-style / “ASCIIcasts - “Episode 406 - Public Activity””

Another potential issue is that in Comment calling controller.current_user raises an exception if we try to create a record outside the current request as there won’t be a controller. We’ll check to see if there is a controller here before trying to fetch the current user from it. /app/models/comment.rb tracked owner: ->(controller, model) { controller && controller.current_user } This workaround isn’t ideal and it feels a little ugly to have to access the controller in the model list but it does work. We’ll copy this into the Recipe model so that we can fetch the user here, too. We’ll then try it out by adding another comment then visiting the activities page again. Now we have two activities and the first one, which is the most-recently added, has its owner_id set. We’ll fix up this view now so that it displays the activities instead. /app/views/activities/index.html.erb...

Full article: http://asciicasts.com/episodes/406-public-activity

Tweets

[New Blog Post] Activity for Toddlers : Painting with Cotton Swabs and Fingers

[New Blog Post] Activity for Toddlers : Paintin...

oureverydaythings.com 06 May '13, 12am

Home » Crafts & Activity Ideas for Kids Activity for Toddlers : Painting with Cotton Swabs and Fingers 6 May 2013 No Comme...

thoughtbot news: Episode 47: Two hours per minu...

robots.thoughtbot.com 06 May '13, 2pm

In this episode, recorded at RailsConf 2013, Ben Orenstein is joined by Ryan Bates of RailsCasts. Ben and Ryan discuss Rya...

Alaska Volcano Eruption 2013 — Stratovolcano Activity May Disrupt Air Travel -

Alaska Volcano Eruption 2013 — Stratovolcano Ac...

planetsave.com 05 May '13, 11pm

The beautiful nearly-symmetrical Cleveland Volcano in Alaska has now awoken again after a short rest, last erupting in 201...

One year of the sun's activity captured in one image

One year of the sun's activity captured in one ...

treehugger.com 07 May '13, 7pm

NASA Goddard Photo and Video /CC BY 3.0 Released on Earth Day, this photo of the sun is actually many photos layered over ...

Episode #368 - May 10th, 2013 via @rubyfive

ruby5.envylabs.com 10 May '13, 1pm

May 7th, 2013 We Adequackly cover RailsConf and free Rails 4 videos, Phusion Passenger 4.0.1, a Better STI approach, loggi...

First episode of WOW JAPAN by AFA CHANNEL! Feat...

facebook.com 07 May '13, 1pm

#AFACHAN - First episode of WOW JAPAN by AFA CHANNEL! Featuring exclusive SCANDAL live in Singapore 2013 footages, plus Gi...

2nd draft of the Multi-tier Cloud Security Stan...

spring.gov.sg 17 May '13, 5am

SPRING Singapore is an agency under the Ministry of Trade and Industry responsible for helping Singapore enterprises grow ...

Should all public transit be electric powered?

electricforum.com 04 May '13, 11am

Should all public transport be electric powered? As governments around the world continue to publicise their support for t...