Questions tagged [voltrb]

Volt is a Ruby web framework where your ruby code runs on both the server and the client (via opal). The DOM automatically updates as the user interacts with the page. Page state can be stored in the URL. If the user hits a URL directly, the HTML will first be rendered on the server for faster load times and easier indexing by search engines.

Instead of syncing data between the client and server via HTTP, Volt uses a persistent connection between the client and server. When data is updated on one client, it is updated in the database and any other listening clients (with almost no setup code needed).

Pages HTML is written in a handlebars-like template language. Volt uses data flow/reactive programming to automatically and intelligently propagate changes to the DOM (or any other code wanting to know when a value updates). When something in the DOM changes, Volt intelligently updates only the nodes that need to be changed.

https://github.com/voltrb/volt

77 questions
0
votes
1 answer

Ruby Volt routes not working correctly

I am having some trouble with the routes in the Volt framework. I set up my route as follows: client "/users/{{ id }}", component: 'users', controller: 'main', action: 'profile' When I navigate to a page to see the profile, everything loads…
user3579220
  • 187
  • 1
  • 2
  • 9
0
votes
1 answer

Is it possible to use GridFS with Ruby Volt?

I want to store some pictures in the database and was thinking about using GridFS to do it efficiently. Is it possible to use GridFS in the Ruby Volt framework? If so, how does one go about doing it?
user3579220
  • 187
  • 1
  • 2
  • 9
0
votes
1 answer

Task not setting variables properly?

Having some issues getting a variable passed to the client. The task that gets run is this: def getmaps $mapnames_current = [] url = 'http://s3-ap-northeast-1.amazonaws.com/splatoon-data.nintendo.net/stages_info.json' resp =…
0
votes
1 answer

Getting error about the .email tempate when using volt-mailer

So I have what appears to be a completely valid .email view, all written based on the docs. <:Subject> Splatoon/Notify <:Html>

Welcome {{ name }}

Thanks for using Splatoon/Notify. We hope you enjoy the…

0
votes
2 answers

Volt: Accessing store collection in component's config/initializers/boot.rb file

I am trying to access the store collection in a component's config/initializers/boot.rb file to declare some middleware to blacklist an array of IP addresses. Unfortunately I am getting an error of: #
user3579220
  • 187
  • 1
  • 2
  • 9
0
votes
1 answer

Error: "uninitialized constant Object::Rack" when using gem rack-throttle in ruby Volt framework

I am trying to throttle malicious from my website by using rack-throttle in the new Volt framework. Here is my code in the compnent/config/initializers/boot.rb file: Volt.current_app.middleware.use(Rack::Throttle::Minute, max: 60) Limiting the…
user3579220
  • 187
  • 1
  • 2
  • 9
0
votes
1 answer

Onmouseover call ruby function in Volt framework not working

I want to call a function when the mouse is on an aside, but it only calls it on the initial page load (which it shouldn't) and not when the mouse is on the aside. Here is my code:
user3579220
  • 187
  • 1
  • 2
  • 9
0
votes
0 answers

Volt/mongodb query for list of unique fields?

In Volt: say I have a bunch of people with (nonunique) job_title fields, is there a way to query for a list of all existing job titles? e.g. if I have: {name: 'sam', job_title: 'boss' }, {name: 'alex', job_title: 'lieutenant' }, {name: 'cal',…
neurodynamic
  • 4,294
  • 3
  • 28
  • 39
0
votes
1 answer

How do you extract view code to a Component in Volt

I’m trying to extract some repeated view stuff into a component, in a similar way to a rails partial. I want this: {{ activity.each do |activity| }}
dangerous.beans
  • 599
  • 7
  • 23
0
votes
2 answers

How to call methods from two separate models in Ruby Volt

I have one model (Group) associated with my GroupController, but it has many instances of another model (People) in it. I want to be able to create new instances of People from my GroupController and add it to an array. What is the best way to go…
user3579220
  • 187
  • 1
  • 2
  • 9
0
votes
1 answer

InvalidByteSequenceError deploying Volt via Intercity

I don't know how to tell if this is an issue with Volt or Intercity, but while I have successfully deployed other rack apps via Intercity/Capistrano, when I deploy a Volt app, I get errors compiling CSS files when I visit the…
neurodynamic
  • 4,294
  • 3
  • 28
  • 39
0
votes
1 answer

How to edit objects in Volt framework 0.9.3?

I started playing around with the blog5 example (https://github.com/voltrb/blog5) from the Volt documentation website and tried to upgrade to Volt 0.9.0 to 0.9.3. After changing the version number in the Gemfile, the edit functionality seems to be…
0
votes
2 answers

Uncaught TypeError: no implicit conversion of NilClass into Hash when loading page Ruby Volt

When loading a page, I am getting the following error: Uncaught TypeError: no implicit conversion of NilClass into Hash I am using the volt framework for ruby. My routes file inside of the component is as follows: client…
user3579220
  • 187
  • 1
  • 2
  • 9
0
votes
2 answers

Changing ection with Volt

I've just started playing with Volt, and looked this up on the docs, couldn't find the answer: I want to add a viewport meta tag on my project's section, but I can't find out how to alter it. Could anyone shed some light on this issue?
0
votes
1 answer

Is there a way to access each user account in Volt?

Is there a way to access each user account in Volt? I need to be able to click on a User._name and get to their account to see their details... How do I access the account of each user.?
cmcoto
  • 21
  • 1