This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Ext.Ajax.defaultHeaders = {'Accept':'application/json'}; | |
| Ext.Ajax.on('beforerequest', function (o) { | |
| var csrf = Ext.select("meta[name='csrf-token']").first(); | |
| if (csrf) { | |
| o.defaultHeaders = Ext.apply(o.defaultHeaders || {}, {'X-CSRF-Token':csrf.getAttribute('content')}); | |
| } | |
| }); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| gem install therubyracer --platform=ruby | |
| Building native extensions. This could take a while... | |
| ERROR: Error installing therubyracer: | |
| ERROR: Failed to build gem native extension. | |
| /usr/local/rvm/rubies/ruby-1.9.3-p484/bin/ruby extconf.rb | |
| checking for main() in -lpthread... yes | |
| creating Makefile | |
| make clean |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Ext.define( 'DownloadFile', { | |
| requires:['Ext.form.Panel'], | |
| downloadFile:function ( config ) { | |
| config = config || {}; | |
| var url = config.url, | |
| method = config.method || 'POST',// Either GET or POST. Default is POST. | |
| params = config.params || {}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| namespace :alchemy do | |
| namespace :cache do | |
| desc "Complete Clear the cache of all pages" | |
| task full_clear: [:environment] do | |
| Alchemy::Language.published.each do |l| | |
| l.pages.flushables.update_all(published_at: Time.current) | |
| l.pages.flushable_layoutpages.update_all(published_at: Time.current) | |
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # frozen_string_literal: true | |
| require "bundler/inline" | |
| gemfile(true) do | |
| source "https://rubygems.org" | |
| git_source(:github) { |repo| "https://github.com/#{repo}.git" } | |
| gem "rails" |