Questions tagged [sinatra]

Sinatra, an elegant Domain Specific Language (DSL), offers a swift and effortless approach to building web applications in Ruby. Providing a refreshing alternative to conventional Ruby frameworks like Ruby on Rails, Nitro, Camping, and Rango, it allows developers to create dynamic web experiences with minimal exertion.

Retrieving information using URL parameters

Having a good understanding of Express, I'm curious if Sinatra offers a similar feature to what I utilize in my Express applications. For instance, consider this code snippet from Express: app.param('userId', function(req, res, next, id) { ...

Discover the methods for obtaining numerous JSON URLs and extracting dynamic information

I am currently in the process of developing my first application that extracts data from TMDB's API. Initially, I was successful in loading and parsing data from a single URL using the following code: uri = URI.parse("http://api.themoviedb.org/3/tv/#{URI ...

The issue seems to be that the Ajax and Ruby script is only displaying one record instead of multiple

While attempting an Ajax call using Ruby and Sinatra, I encountered an issue where the query should return multiple rows but only returns one. The ajax script in use is: $(document).ready(function() { $(".showmembers").click(function(e) { e. ...

Sophisticated sinatra parameter

Creating Dynamic Surveys <script type="text/x-jsrender" id="surveyTemplate"> <li class="question"> <input type="text" name="survey[question]" /> <button class="add_answer">Add Answer</button> <ul> ...