31 Jul '16, 11pm

Execute ruby method within Javascript - Ruby on Rails App Ruby

Execute ruby method within Javascript - Ruby on Rails App Ruby 0 DP 314 0 Upon completing watching a video on JWPlayer, I want to execute a ruby method in the UsersController that updates a User model attribute I am not sure what I am doing wrong. Home.html.erb < script src="//content.jwplatform.com/players/<%= a = Video.mediakey(Time.now.strftime("%Y%m%d").to_i) %>-3sPMNLmx.js"></ /script> < /script> jwplayer().on('complete', function() { $.ajax("/users/increase_workouts") }); </ /script> UsersController # Adds video to number of workouts def increase_workouts if logged_in? current_user.workouts += 1 else redirect_to login_url end end Routes.rb Rails.application.routes.draw do get 'password_resets/new' get 'password_resets/edit' get 'sessions/new' get 'users/new' get 'videos/new' get 'videos/index' root "static_pages#home" get 'static_pages/about' get 'static_pages/contac...

Full article: https://www.devbattles.com/en/discussion/view-27140-Execu...

Tweets

Ruby on Rails Tutorial

news.ycombinator.com 30 Jul '16, 4pm

this is an classic for rails. countless entrepreneur/developers i know have used this as their first 0 to production guide...

New Tutorial:

New Tutorial:

hostpresto.com 31 Jul '16, 9pm

Ruby on Rails is a very popular open source web application framework written in Ruby. It is designed to make programming ...

The natural advantages of #rubyonrails

ldstudios.co 01 Aug '16, 6pm

Thinking about starting a business? Have an idea that you want brought to life? Starting a business or making a decision t...

Ruby on Rails 基本主義(譯) https://t.co/CD0Y5o0Okx

medium.com 31 Jul '16, 7am

I want to code happily ever after. Work at @JollyGoodCode. Blessed Rubyist. Emoji Addict. Typo producer. Currently hacks o...

Setup Google Calendar API on Ruby on Rails by m...

freelancer.com 31 Jul '16, 6pm

I want a Rails 5 app setup that accesses the Google Calendar API. The app has registered users, and the app should be able...

A list of killer courses, screencasts, and book...

johnathanlyman.com 31 Jul '16, 11am

I’ve been meaning to write this post for a while and kept getting distracted. This evening I sat down and finally hammered...

I just published “Ruby off Rails” https://t.co/W4Mi35XYAm

I just published “Ruby off Rails” https://t.co/...

medium.com 06 Aug '16, 3pm

Ruby mempunyai ekosistem yang cukup mature. Semenjak adanya Rails dan kepopuleran RubyGems, banyak sekali pustaka yang lan...

Announcing: A Ruby gem for LetsEncrypt + Rails ...

blog.pixielabs.co.uk 02 Aug '16, 2pm

The world-wide-web has come a long way and it’s now easier than ever to protect your web applications with SSL. SSL has fi...

Ruby, Ruby, Ruby, Ruby! Do you, do you, do you,...

five.agency 05 Aug '16, 10am

Dosadno ti je na poslu i dobro bi ti došla kvalitetna promjena, sljedeća stepenica u tvom iskustvu? Super! Mi smo u potraz...

Ruby on Rails Tutorial

hacker-bot.tumblr.com 30 Jul '16, 5pm

Comments Source: Hacker News https://www.railstutorial.org/book July 30, 2016 at 06:43PM via \hack\ hack hacker hacked inf...

Write some Software based on Ruby on Rails by l...

freelancer.com 02 Aug '16, 5am

can write location based software , write query file mysql phpagi , ruby script updating field table text file mysql , rub...

Ruby on Rails developer needed by DavidLiu80

freelancer.com 01 Aug '16, 4am

developer rails startup willing , rails ruby , rails ruby reservation system , rails ruby upgrade project , nice experienc...

#devops

digitalocean.com 01 Aug '16, 6pm

We have covered the basics of how to install rbenv and Ruby on Rails here so that you can use multiple Ruby environments. ...