Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

allow to work with Rails 4 production #338

Merged
merged 1 commit into from
Oct 24, 2013

Conversation

mikdiet
Copy link
Contributor

@mikdiet mikdiet commented Oct 24, 2013

This patch adds additional javascript and doesn't change functionality of existing gem.

If some user want to use ckeditor in rails 4 production, all he needs is to require this javascript and add tiny rake task in own rails application code, as described in readme.

I already use this patch in my production, if I detect any errors in future, I'll fix these.

@mikdiet
Copy link
Contributor Author

mikdiet commented Oct 24, 2013

Related issue #333

@mikdiet
Copy link
Contributor Author

mikdiet commented Oct 24, 2013

Also #307

galetahub added a commit that referenced this pull request Oct 24, 2013
allow to work with Rails 4 production
@galetahub galetahub merged commit e8dcbbe into galetahub:master Oct 24, 2013
@PavelDemyanenko
Copy link

MANY THANKS!

@makaroni4
Copy link

@Mik-die 👍 👍 👍

// Add the timestamp, except for directories.
if ( resource.charAt( resource.length - 1 ) != '/' ){
var url = resource.match( /^(.*?:\/\/[^\/]*)\/assets\/(.+)/ );
if(url) resource = url[1] + (CKEDITOR_ASSETS_MAPPING[url[2]] || '/assets/' + url[2]);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This part doesn't work if the values in CKEDITOR_ASSETS_MAPPING are absolute URLs (including host part), which will be the case if Rails' config.asset_host is set.

@cschramm
Copy link

Unfortunately this won't work with future versions of sprockets-rails, see rails/sprockets-rails#96

@mikdiet
Copy link
Contributor Author

mikdiet commented Dec 16, 2013

This option will be configurable rails/sprockets-rails#100

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants