Nikola Okonesh

Joined

590 Experience
1 Lesson Completed
0 Questions Solved

Activity

Posted in Components with Phlex in Rails Discussion

Я хочу переписать view на phlex, как быть с partial ? а как выводить collections ? я не понял принцип . Help

Posted in Episode for Unpoly framework

Episode for Unpoly framework?

Posted in Go! Svelte + Sapper + Rails

Hi, Chris! Let's start learning Svelte + Sapper ??
Plus!!!!

Hi! I use pagination Pagy gem, and button "More..." (more pages Ajax) not work
index.js.erb

  var colum = document.querySelector("#categories_index");
  var pagin = document.querySelector("#categories_index_paginate");

  colum.innerHTML += ("<%= j render(partial: 'article/posts/post', collection: @posts, cached: true) %>");
  pagin.innerHTML = ("<%= render(partial: 'next_link') %>");

SyntaxError: missing ) in parenthetical

I not use JQuery.

Only "@rails/ujs": "6.0.0" webpacker.

Rails -v 6.0.0.
Ruby -v 2.6.1

Help! Thanks!!!

Posted in How add PurgeCss with TailwindCss?

https://next.tailwindcss.com/docs/controlling-file-size

postcss.config.js

const purgecss = require('@fullhuman/postcss-purgecss')({
  content: [
    './**/**/**/*.erb',
    './**/**/**/**/*.erb',
  ],
  extractors: [
    {
      extractor: class {
        static extract(content) {
          return content.match(/[A-Za-z0-9-_:/]+/g) || [];
        }
      },
      extensions: ['html']
    }
  ]
})

module.exports = {
  plugins: [
    require('tailwindcss'),
    require('autoprefixer'),
    require('postcss-import'),
    require('postcss-flexbugs-fixes'),
    require('postcss-preset-env')({
      autoprefixer: {
        flexbox: 'no-2009'
      },
      stage: 3
    }),
  ]
}

How to do right? Thanks

how add subdomain https wildcard?

Posted in WildCard Let'sEncrypt

Hi! How to use LetsEncrypt wildcard for subdomains.

https://gorails.com/guides/free-ssl-with-rails-and-nginx-using-let-s-encrypt

Posted in How add Push Api notification with Chatroom?

How add Push Api notification with Chatrooms? Thanks!

Chris! Next video: Trix + ActiveStorage. :)

Hi! How to use jquery_ujs instead of rails-ujs to use trix gem?

xhr.setRequestHeader("X-CSRF-Token", Rails.csrfToken()); Rails. not work

How add association has_many :photos with post.rb after save ?

How add post_id with Photo ?

Hi! Maybe I do not understand correctly, but can I add SoundCloud with a turbolink and VUE? Work. How to do it?

Thank you, make an example if possible.

Great video, Chris!!! More videos VueJS!!! =)

Posted in Free SSL with Rails and Nginx using Let's Encrypt

Спасибо!

Posted in Direct File Uploads to S3: Part 2 Discussion

Hi! help me please. error loading Image

Aws::S3::Errors::PermanentRedirect
in PhotosController#create

"The bucket you are attempting to access must be addressed using the specified endpoint. Please send all future requests to this endpoint." ???? instead aws-sdk turn shrine-fog all works

Posted in Group Chat with ActionCable: Part 7 Discussion

Thanks!)

Posted in Group Chat with ActionCable: Part 7 Discussion

Hi! response for the new user

undefined method `last_read_at' for nil:NilClass for Chatrooms#show

how to solve?

Posted in Group Chat with ActionCable: Part 4 Discussion

Hi Chris! Thank you for your lessons!=)

<% if chatroom.chatroom_users.find_by_user_id(current_user) %>
<%= form_for [@chatroom, Message.new], remote: true do |f| %>
<%= f.text_area :body, rows: 1, class: 'form-control', autofocus: true %>
<% end %>
<% else %>
<%= link_to "Join", chatroom_chatroom_users_path(@chatroom), method: :post, remote: true %>
<% end %>

Thanks