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
5
votes
3 answers

OpalRb with MeteorJS?

I have been intrigued by the power and elegance that Opal offers in the way of using pure Ruby vs CoffeeScript or, of course, JS. How would one go about leveraging Opal for Meteor as the primary language for development? UPDATE: just wanted to…
ylluminate
  • 12,102
  • 17
  • 78
  • 152
4
votes
0 answers

tracking all online users in Volt

I'm trying to make a record of all the users which are currently online. Here's what I've tried: In my "main_controller": channel.on('connect') { puts "ON"; store._online_users << Volt.current_user.to_h } channel.on('disconnect') { puts "OFF";…
max pleaner
  • 26,189
  • 9
  • 66
  • 118
4
votes
1 answer

Volt rb framework unable to connect to database

when I fire volt server in the terminal, it gives me this error message Unable to connect to the database. Volt will still run, but the message bus requires a database connection to setup connections between nodes, so the message bus has been…
ahnbizcad
  • 10,491
  • 9
  • 59
  • 85
4
votes
1 answer

How to integrate other javascript library in Volt framework?

I can't understand how to integrate existing JavaScript libraries into Volt. With Volt 0.9.3 Opal Native object isn't available and use only the backticks with interpolation seems no pratical.
matteofuzz
  • 43
  • 3
4
votes
2 answers

How to create an admin area in Ruby Volt?

I've been playing a lot with Volt lately, and would like to figure out how to create an Admin area. The documentation has a section on restricting models for users, but it's still in the TODO list. Would like to know if there is an elegant way to…
Adam Cooper
  • 936
  • 11
  • 16
3
votes
2 answers

Storing pictures in Ruby Volt

I am wondering what the best practice is to store pictures in a model in the Volt framework. Should I just assign it to a model's field or is there a better way?
user3579220
  • 187
  • 1
  • 2
  • 9
3
votes
2 answers

How do I add a button in ruby volt?

I'm trying to work out how to add a button in the ruby volt framework - it's a bit of a beginner question really. I've tried to adapt the todos example (part 1 and part 2), but haven't got it to work. I'm not quite sure if I've got the html wrong or…
Stuart
  • 51
  • 5
3
votes
1 answer

Delete entire voltrb store collection

store.widgets.clear does not seem to save into the Database. So I tried: store.widgets.each do |i| i.destroy end And this destroys only half of the records in the DB. Any suggestions on how I can remove an entire store collection?
Graham Jones
  • 58
  • 1
  • 7
3
votes
1 answer

Syncing with an External API in Volt Ruby Framework

I'm looking into Volt as an option for building an Admin interface to our REST API. The API is a separate application. I would like the Admin application to persist data to the API but also store it's own data that is irrelevant to the API (such as…
Travis Todd
  • 236
  • 2
  • 12
2
votes
0 answers

Volt Framework Task returns string

I am currently working on a sports app. Users should be able to create new teams and add users to the teams. When a user creates the team, he/she should be able to search for users to add to the team, however the search should only return users that…
kev97444
  • 21
  • 1
2
votes
2 answers

Calling a Volt Framework Task method from another Task

I have a Volt Framework Task that checks and stores information on a directory, e.g. class DirectoryHelperTask < Volt::Task def list_contents() contents = [] Dir.glob("/path/to/files").each do |f| contents << f …
jason a
  • 21
  • 3
2
votes
1 answer

What is controller_group for in view call?

I just wanted to understand better the view call in main.hmtl: what is the third parameter {controller_group: 'main'} for in: {{ view main_path, "title", {controller_group: 'main'} }} Are there other options or parameters that can be passed to…
djboardman
  • 152
  • 8
2
votes
2 answers

Volt iteration comparison with promise

If I'm iterating through an ArrayModel using .each_with_index, is there a way to make rendering decisions based on the current index compared with the results of a Promise (at the moment, this comparison returns an error about comparing a Numeric…
neurodynamic
  • 4,294
  • 3
  • 28
  • 39
2
votes
2 answers

VoltRB rspec testing a method can't convert Promise into Array

I am trying to do some rspec unit tests on a method in my model. The method returns a promise, and when resolved, the name of the person. The method is not the problem as I know that it works correctly. Here is my test code: it 'should return…
user3579220
  • 187
  • 1
  • 2
  • 9
2
votes
1 answer

How to make pages with a "template" controller and view in VoltRb

I'm having a problem in Volt where I need a bunch of pages with a "template" controller and view. Let me explain this in a little more detail: Say, for example, I have a site about books. I have a page at http://localhost:3000/books. It serves as an…
GDP2
  • 1,948
  • 2
  • 22
  • 38
1
2 3 4 5 6