17 Sep '12, 6am

ajax in ruby on rails for a like/unlike button: So i have a page with a like button under my comments and am try...

So i have a page with a like button under my comments and am trying to work out how to do this without refreshing the whole page currently the code looks like this: - if can? :like, comment = " · " - if likes.find_by_user_id(current_user.id).nil? = link_to "Like", like_comment_path(comment), method: :post - else = link_to "Unlike", unlike_comment_path(comment), method: :post - if comment.user == current_user = " · " = link_to "Delete", comment_path(comment), method: :delete, :data => { :confirm => "Are you sure you want to delete this comment?" } - if likes.count > 0 .comment-likes - likers = likes.map { |like| link_to(like.user_name, "#") } - if likers.length > 1 - likers = likers.slice(0, likers.length - 1).join(", ").concat(" and " + likers.slice(-1)) - else - likers = likers[0] = "Liked by #{likers}".html_safe Changing the method for like and unlike :post to :update se...

Full article: http://stackoverflow.com/questions/12454057/ajax-in-ruby-...

Tweets

@DeenaSAS I like this!

runwaybandits.com 21 Sep '12, 8am

FREE LOCAL REGISTERED POSTAGE ABOVE SGD100 FREE INTERNATIONAL SHIPPING ABOVE SGD250 SELF COLLECTION & NEXT DAY DELIVERY

Like Tiger, Like Rory

golfdigest.com 19 Sep '12, 1pm

Perhaps earlier than any other would-be sports legend, Tiger Woods made his debut on the national stage, appearing on the ...

[Princessa's Diary] Someone like you?

[Princessa's Diary] Someone like you?

sabrina.sg 19 Sep '12, 1am

So much has happened in such a short period of time, it makes me wonder what happened to the good ol' simple life I once l...

@ryanpoet @Supreme1993 I am sure you have both read things like this..

@ryanpoet @Supreme1993 I am sure you have both ...

sprudge.com 18 Sep '12, 4am

A civet in the wild will eat whatever it finds, off the tree or on the ground. Unripe cherries, rotten cherries, as well a...

Feeling like Salsa!? Come and Join us as we dan...

facebook.com 16 Sep '12, 6pm

Feeling like Salsa!? Come and Join us as we dance the night away!

Week 4 Ruby/Rails Q&A

thecommongeek.com 17 Sep '12, 4am

Last week, I met a very talented guy who recommended that I checkout a website called www.cleancoders.com So far, I have j...

link: 20 Reasons Why Every Web Designer Needs to Learn Ruby on Rails

link: 20 Reasons Why Every Web Designer Needs t...

blog.teamtreehouse.com 18 Sep '12, 4pm

She told me her husband was being downsized. He was 52 years old, been with the company for twenty. He was a COBOL man. No...

New Job Listing: ruby on rails test contractor ...

simplyhired.com 16 Sep '12, 9pm

Looking for a ruby on rails tester on an hourly basis. Standard RoR project using rspec for tests. Test existing models an...

For mongodb, choose ruby on rails or python? #p...

stackoverflow.com 17 Sep '12, 5pm

So I need to create a web app for managing network security data. Right now the requirements are very poorly defined, so I...

En vivo: java web frameworks + Ruby on Rails

youtube.com 19 Sep '12, 1am

Close Your browser is not supported by YouTube and it needs to be updated. Learn more . En vivo: java web frameworks + Rub...

Ruby on Rail with node visualisation thejit d3 ...

freelancer.com 16 Sep '12, 3am

Project ID: 2490224 Project Type: Hourly Hours of work: Unspecified Project Duration: 1 - 4 weeks Project Description: Nee...

The Rails Tutors Blog:

railstutors.com 16 Sep '12, 3pm

Someone on Quora asked the question, What's the best way to way to learn Ruby on Rails as a beginner? and I wrote a long'i...