Questions tagged [high-voltage]

"High Voltage" is a gem used for serving static pages in Ruby on Rails applications.

"High Voltage" is a gem used for serving static pages in Ruby on Rails applications. More information here: https://github.com/thoughtbot/high_voltage

34 questions
6
votes
2 answers

Using ERB in Markdown with Redcarpet

I'm trying to get Markdown to play nicely with .erb. I'd like to use high_voltage to render markdown pages (or normal .html.erb files with markdown partials) that are parsed with Redcarpet and am struggling to get it to all work together. At the…
Rich
  • 590
  • 7
  • 20
3
votes
1 answer

DEPRECATION WARNING: ActionController::TestCase HTTP request methods will accept only keyword arguments in future Rails versions

I am getting deprecation warning for my tests but I do not understand how should I refactor my tests in order to be compliant with future rails versions. I get this from multiple tests so attached the most simple example testing that hight_voltage…
Kimmo Hintikka
  • 13,472
  • 7
  • 34
  • 63
3
votes
1 answer

high voltage gem routing with locale

I am using highvoltage gem for static page serving. Its working but the url is ugly. Currently the url is like bellow: localhost:3000/pages/terms-and-conditions?locale=en But i want the url to be like…
monsur
  • 601
  • 6
  • 18
3
votes
2 answers

How can I configure 'high_voltage' gem to serve up static images?

I'm trying to use 'high_voltage' gem in order to ensure authentication around my pages (actually some completely independent sites with a static html/css tree). This works, but no images are loaded. If I navigate to the path of an image, the source…
roschaefer
  • 41
  • 6
2
votes
2 answers

Route Controller#show method like how Controller#index would in Rails

Hi guys I am new to rails. Sorry if I can't define this question properly. What I wanted is for: domain.com/posts/1-sample-post to be routed like this: domain.com/1-sample-post How do I achieve this in rails routes? I've tried searching for this…
Ricardo Green
  • 1,058
  • 1
  • 11
  • 27
2
votes
0 answers

Using different controllers for different directories with the High Voltage in Ruby on Rails

I'm trying to create some static pages in Rails and using the High Voltage gem for this purpose. What I want is to have custom URLs for different subsets of my pages. I also want to override the default High Voltage controller in order to use…
azangru
  • 2,644
  • 5
  • 34
  • 55
2
votes
1 answer

High Voltage error: undefined method `layout' for HighVoltage::PagesController:Class

I'm using ruby 2.1.2 and rails 4.1.1. When I launch my app with 'rails s' I get no error in the terminal but when i enter in a web address for any page of the site, the terminal throws up this error: undefined method `layout' for…
Ribena
  • 1,086
  • 1
  • 11
  • 20
2
votes
2 answers

Rails: Form in static pages of high voltage gem

I have created few static pages with awesome high_voltage gem. My pages are static, except a different form in each page. Forms are supposed to grab user details and send emails (and may be save details in db) Question: How should I proceed with…
Jashwant
  • 28,410
  • 16
  • 70
  • 105
1
vote
1 answer

Rails High_Voltage error: undefined method 'page_path' for #<#

I used to link to static pages with a dedicated controller / view for each of them but, of course, this is odd. I just installed the High_Voltage gem in my Rails (Rails 5.1.7 on Debian) app in order to create simpler, easily readable links. I…
1
vote
1 answer

How can I set a static page (high_voltage) as root in Rails?

I used gem high_voltage to get static pages and it worked, but now I want to define one of them as root. What should I write in Routes.rb since I don't have a controller?
Edi Junior
  • 33
  • 8
1
vote
0 answers

How to define a function in a HighVoltage static pages controller for show action?

I use HighVoltage for static pages. I have: get "/filter/:city" => 'pages#show', as: :page, format: false root to: 'pages#show', id: 'home', :defaults => { :city => "Bolu" } in the routes.rb. I have a PagesController: class PagesController <…
DR_
  • 174
  • 1
  • 2
  • 14
1
vote
1 answer

serving a static page built with skel on Rails

I found a nice template online and want to use it for my rails app homepage. I decided to use the high voltage gem and read through its readme. I managed to get the routing right but I could not find the appropriate path/folder for the numerous…
1
vote
1 answer

Select SSL Routes serving up rails 4 static pages via highvoltage gem

I have several static erb pages being served up in a ruby rails 4 site via the high voltage gem: get '/about' => 'high_voltage/pages#show', id: 'about' get '/contact' => 'high_voltage/pages#show', id: 'contact', :protocol => "https" get…
MattM
  • 33
  • 4
1
vote
1 answer

Including a hash param in Rails URL

I have links on a page which go to pages_path('index'). That works fine, only I want each link to go to a specific section of a page. So each link would look something like www.example.com/pages/index#locations Right now I'm using a rather hacky…
Noah Koch
  • 831
  • 8
  • 10
1
vote
1 answer

How to use view and template based on language?

I am using high_voltage to create multiple landing pages. Structure app views pages home.html.erb about.html.erb I would like to be able in simple way to use different view template according on session[:locale] I thought about…
1
2 3