turbolinks

Datepicker does not display the calendar

北慕城南 提交于 2019-12-03 06:42:39
I have in my application a form where I can chose a date from a datepicker calendar. When I refresh my page, the datepicker calendar appears when clicking the form. This is the correct behaviour. However when I reach the same page from another page using a link, the calendar does not appear after clicking the form. I have to refresh the page in order to make the calendar visible. Here is my form page: # app/views/reservations/_form.html.erb ... <div class="row reservations"> <div class="span2 field"> <%= f.label :mydate %><br /> <%= f.text_field :mydate, class: "input-append date datepicker",

Is there a way around writing data: {turbolinks: false} a zillion times? Is turbolinks for rails worth it?

可紊 提交于 2019-12-02 18:58:05
问题 turbolinks (5.0.0) Rails 4.2.2 Is there DRY to make every link_to in your app data: {turbolinks: false} ? or does that defeat the purpose of Turbolinks and suggest that it should just be removed? A large number of my jquery scripts will not work correctly if a link is clicked unless it contains data: {turbolinks: false } , the scripts will work correctly when the page is reloaded. I have my jquery wrapped in: $(document).on('turbolinks:load', function () { #something here}); 回答1: So, the

Is there a way around writing data: {turbolinks: false} a zillion times? Is turbolinks for rails worth it?

眉间皱痕 提交于 2019-12-02 11:53:51
turbolinks (5.0.0) Rails 4.2.2 Is there DRY to make every link_to in your app data: {turbolinks: false} ? or does that defeat the purpose of Turbolinks and suggest that it should just be removed? A large number of my jquery scripts will not work correctly if a link is clicked unless it contains data: {turbolinks: false } , the scripts will work correctly when the page is reloaded. I have my jquery wrapped in: $(document).on('turbolinks:load', function () { #something here}); Lanny Bose So, the question you asked was "how to DRY up my endless link annotations?" I'll answer that, first... Yes,

Could not find gem 'turbolinks-source (~> 5)'

▼魔方 西西 提交于 2019-12-02 05:34:36
问题 I'm trying to create a Rails 5 project on Mac OSX (El Capitan) rails new myproject but then I get this error: Could not find gem 'turbolinks-source (~> 5)' Can someone help me to fix this issue? Thanks a lot, Anthony 回答1: Try removing ~/.bundle/cache/ . That fixed this issue for me. 回答2: On Windows: Try to reinstall rubyinstaller-devkit. 回答3: How do I install sqlite3 for Ruby on Windows? it was here my solution ! You can also download ruby on rails with devkit https://github.com/oneclick

Could not find gem 'turbolinks-source (~> 5)'

自作多情 提交于 2019-12-02 00:51:19
I'm trying to create a Rails 5 project on Mac OSX (El Capitan) rails new myproject but then I get this error: Could not find gem 'turbolinks-source (~> 5)' Can someone help me to fix this issue? Thanks a lot, Anthony Try removing ~/.bundle/cache/ . That fixed this issue for me. On Windows: Try to reinstall rubyinstaller-devkit. lamine ahmed How do I install sqlite3 for Ruby on Windows? it was here my solution ! You can also download ruby on rails with devkit https://github.com/oneclick/rubyinstaller2/releases/download/RubyInstaller-2.6.3-1/rubyinstaller-devkit-2.6.3-1-x64.exe Even though the

Facebook Like Box social plugin doesn't work with Turbolinks

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-01 20:33:15
I'm using the Like Box social plugin ( https://developers.facebook.com/docs/reference/plugins/like-box/ ) and it works great. Problem is that I'm using it within a Rails 4 application with Turbolinks. Whenever I reload a page, the like box shows up. If I click on any link, the next page loads and the Like Box doesn't show up. I tried this already but didn't worked =/ http://reed.github.io/turbolinks-compatibility/facebook.html Any ideas on how to solve this problem? The link you have posted in original question is quite nice. It asks us to create three functions: 1) saveFacebookRoot: This is

Turbolinks unfriendly?

雨燕双飞 提交于 2019-12-01 11:45:30
I totally get why Turbolinks 5 is awesome and if you're reading it, you probably do as well, but I am very frustrated with how badly it plays with the other scripts on the block. To date, there is no simple explanation (human readable) that shows how to wrap existing jQuery scripts in a way that would allow them to function. Take for example this one: https://github.com/Bttstrp/bootstrap-switch . It's well written, simple to understand. You load the js and css to your assets pipeline and instantiate it on some page. # view.html.erb <input type="checkbox" class="switch"> switch button <script

Turbolinks unfriendly?

杀马特。学长 韩版系。学妹 提交于 2019-12-01 10:52:41
问题 I totally get why Turbolinks 5 is awesome and if you're reading it, you probably do as well, but I am very frustrated with how badly it plays with the other scripts on the block. To date, there is no simple explanation (human readable) that shows how to wrap existing jQuery scripts in a way that would allow them to function. Take for example this one: https://github.com/Bttstrp/bootstrap-switch. It's well written, simple to understand. You load the js and css to your assets pipeline and

Ember.js with Rails4: browser back button crash ember application

 ̄綄美尐妖づ 提交于 2019-12-01 04:16:43
EDIT: the issue is solved. Removing turbolinks is all you need to do. With a Rails4 application the use ember-rails 0.13.0 we have a problem of not functional browser back button. Each time while getting back to previous route using the back button the application is crashing with such errors: on Firefox 24.0a2: TypeError: Class.PrototypeMixin.applyPartial is not a function @ http://localhost:3000/assets/ember.js?body=1:11933 on Chromium 28: Uncaught Error: jquery-ujs has already been loaded! jquery.js?body=1:517I DEBUG: ------------------------------- ember.js?body=1:364 DEBUG: Ember.VERSION

Ember.js with Rails4: browser back button crash ember application

让人想犯罪 __ 提交于 2019-12-01 01:21:49
问题 EDIT: the issue is solved. Removing turbolinks is all you need to do. With a Rails4 application the use ember-rails 0.13.0 we have a problem of not functional browser back button. Each time while getting back to previous route using the back button the application is crashing with such errors: on Firefox 24.0a2: TypeError: Class.PrototypeMixin.applyPartial is not a function @ http://localhost:3000/assets/ember.js?body=1:11933 on Chromium 28: Uncaught Error: jquery-ujs has already been loaded!