Skip to content Skip to sidebar Skip to footer
Showing posts with the label Ruby

Page Views Counter Sinatra?

How to implement a page views counter in Sinatra and Ruby? I have tried the @@ variables but they … Read more Page Views Counter Sinatra?

How To Redirect Web Page From A Specfic Page In Sinatra?

In Sinatra, how to redirect a web page from a specific page? require 'sinatra' get '/A… Read more How To Redirect Web Page From A Specfic Page In Sinatra?

Implementing Polling For Rails Frontend To Call Update

I want to implement a system where my 'show' view, every 10 seconds will call update in the… Read more Implementing Polling For Rails Frontend To Call Update

How Do I Pass Params To Rails Controller Method Then Return Value Using Jquery/ajax?

I am using a click function to first get the array/position, then post it via an AJAX call to a con… Read more How Do I Pass Params To Rails Controller Method Then Return Value Using Jquery/ajax?

How To Debug Random Cucumber Failures?

I'm stuck with an issue with a cucumber test suite and I can't think of any way of debuggin… Read more How To Debug Random Cucumber Failures?

Json(/hash) To Ruby Object?

In Javascript you can access json as objects. person = { name: { first: 'Peter', … Read more Json(/hash) To Ruby Object?

How To Get The Current Date And Time After A User Select Action

I spent time learning Rails and now I'm working on a demo project. I want the user to select wh… Read more How To Get The Current Date And Time After A User Select Action

How Can I Set A Session Variable From A Js Inside Haml In Ruby On Rails?

I have table row shading (for groups of row) via js. I want to make it so that the shading is remem… Read more How Can I Set A Session Variable From A Js Inside Haml In Ruby On Rails?