Jeremy Bray
Joined
Activity
Chris why does the source code for the episode not match the video at all?
Hey @rafal, sorry I missed this show me the post.js
can you show me the line 34 of your post.js file?
for those of you loveing this but pulling your hair out as to why your modal will not close and you hit errors
$(document).on("turbolinks:load", function() {
var selectizeCallback = null;
$(".series-modal").on("hide.bs.modal", function(e) {
if (selectizeCallback != null) {
selectizeCallback();
selectizeCallback = null;
}
$("#new_series").trigger("reset");
var selectors = [$.rails.linkDisableSelector, $.rails.formEnableSelector].join(', ');
$(selectors).each(function() {
$.rails.enableElement(this);
})
});
$("#new_series").on("submit", function(e) {
e.preventDefault();
$.ajax({
method: "POST",
url: $(this).attr("action"),
data: $(this).serialize(),
success: function(response) {
selectizeCallback({value: response.id, text: response.name});
$(".series-modal").modal('toggle');
}
});
});
$(".selectize").selectize({
create: function(input, callback) {
selectizeCallback = callback;
$(".series-modal").modal();
$("#series_name").val(input);
}
});
});
just change series-modal to your modal name and #new_series to your model name
heyheyheyheychrisheyheyheyheychristryusingthecommentsystemfromamobile
Posted in How do I create a reply comment system?
hey chris tried to report the above posts as spam and got This gorails.com page can’t be foundNo web page was found for the web address: https://gorails.com/forum/how-do-i-create-a-reply-comment-system/forum_posts/11741/report
just an fyi
Hi @chris I have a little app that has a venue and user that I would like the user to be able to call something like " Hey @user do you want to go to #venue on saturday?" or the like.
is that possible?
Posted in How Do I Use Selectize in Rails 6
Hi there, I really love the selectize tutorial and would love to use it in a rails 6 application. What changes do I need to make to the tutorial.
can i just change
//= require selectize
to
$ yarn add selectize
Do I need to add Selectize to my environment.js like i would jquery
const webpack = require('webpack')
environment.plugins.prepend('Provide',
new webpack.ProvidePlugin({
$: 'jquery/src/jquery',
jQuery: 'jquery/src/jquery',
selectize: '?'
})
)
And or Require selectize in application.js file.
require('selectize')
Posted in Why Wistia?
Hi Chirs an @sweeetland I am actualling doing exactly this, vimeo basically gives you embed code under the share button and just make sure you have set up your privacy settings to allow your domain to embed.
<iframe src="https://player.vimeo.com/video/<%= @video.vimeo_id %>" width="640" height="360" frameborder="0" allow="autoplay; fullscreen" allowfullscreen></iframe>
Hi Guys, this is great. I came across a recent issue with webpacker not compiling and hence creating issues. This is the github discussion:
https://github.com/rails/webpacker/issues/2109
basically in your babel.config.js swap from corejs: 3 to corejs:false anywhere it appears.
this solved my frustration...
Posted in Rails Application Templates Discussion
Hi Chris,
when deploying to heroku I get the following error:
2018-11-05T20:24:11.935122+00:00 heroku[router]: at=error code=H10 desc="App crashed" method=GET path="/favicon.ico" host=gwfcm.herokuapp.com request_id=faaeeb99-5f62-4354-b05e-b5540d91f459 fwd="1.132.107.24" dyno= connect= service= status=503 bytes= protocol=http
Is this a sommon issue with jumpstart and heroku?
Posted in Best way to render a page as a PDF
This would be a great episode chris
Uncommented and removed head :forbidden unless current_user.admin? as i do not have an admin role set up.
Did you sort this out @geraldcarter
I am not sure what i am doing wrong but i keep hitting
Started GET "/oauth/applications" for 127.0.0.1 at 2018-09-13 14:37:44 +1000
Processing by Doorkeeper::ApplicationsController#index as HTML
Access to admin panel is forbidden due to Doorkeeper.configure.admin_authenticator being unconfigured.
Filter chain halted as :authenticate_admin! rendered or redirected
Completed 403 Forbidden in 2ms (ActiveRecord: 0.0ms)
Thats awesome mate, is there a video where you show how to create that? I only asked because when I went to http://localhost:3000/oauth/applications i got a blank page
Hi Chris is this video a follow on from something else, there seems to be a lot of code not outlined in the video. Just want to make sure I am starting at the start
https://github.com/plataformatec/devise/wiki/How-to:-Scope-login-to-subdomain
Posted in Import a CSV with associations?
Posted in Multiple role based authorization
How did you go with this Bruno? I am just about to implement this on a little app I have