Relative paths

This commit is contained in:
benji 2017-01-16 23:47:48 +01:00
parent d05e985850
commit 9248773e4a
3 changed files with 4 additions and 1 deletions

View file

@ -184,7 +184,7 @@ Step = React.createFactory React.createClass
div id: 'transaction-form', div id: 'transaction-form',
h3 null, 'Transfer some money' h3 null, 'Transfer some money'
form ref: 'form', action: '/transactions', acceptCharset: 'UTF-8', method: 'post', form ref: 'form', action: "#{@window.base_url}/transactions", acceptCharset: 'UTF-8', method: 'post',
Step step: 1, title: 'What do you want to do?', Step step: 1, title: 'What do you want to do?',
Action giving: giving, setAction: @setAction Action giving: giving, setAction: @setAction
if step >= 2 if step >= 2

View file

@ -7,6 +7,8 @@
= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true = stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track' => true
= javascript_include_tag 'application', 'data-turbolinks-track' => true = javascript_include_tag 'application', 'data-turbolinks-track' => true
= csrf_meta_tags = csrf_meta_tags
:javascript
window.base_url = "#{Rails.application.config.relative_url_root}"
%body %body
.pure-g .pure-g
= render 'menu' if current_user = render 'menu' if current_user

View file

@ -76,4 +76,5 @@ Rails.application.configure do
# Do not dump schema after migrations. # Do not dump schema after migrations.
config.active_record.dump_schema_after_migration = false config.active_record.dump_schema_after_migration = false
config.relative_url_root = "/tab"
end end