Nicolás Bobb

Joined

1,690 Experience
3 Lessons Completed
1 Question Solved

Activity

Posted in S3 Storage and Active Storage Images not showing

Could you share the code?

Posted in I joined GitHub Education

Thanks!

Posted in I joined GitHub Education

I joined GitHub Education. How can I validate the account in Gorails to take advantage of the benefit?

Posted in How to upload images to Rails API using S3

How can you upload images with ActiveStorage from the API?

Backend: API Rails
Frontend: Reactjs

Github: https://github.com/nicobobb/graphql-rails-blog

Posted in Sharing on social network

Is this gem good choice?
https://github.com/kpumuk/meta-tags

I thought the same :)

Posted in Direct Uploads with ActiveStorage Discussion

When the image is uploaded to DigitalOcean Spaces, the permissions are as private. Does anyone know how to upload the image with public permissions?

Posted in Direct Uploads with ActiveStorage Discussion

Verify if the image exists before:

<% if post.photo.attached? %>
   <%= image_tag post.photo %>
<% end %>
If I want to upload an image to the Team, how would it be? I'm trying to do it but I can not.

Posted in Vue.js Trello Clone in Rails - Part 5 Discussion

Or you can use CSS Grid 
Why did not you use "Vue.http.headers.common['X-CSRF-Token'] = document.querySelector('meta[name="csrf-token"]').getAttribute('content')" ?

Posted in Rails 5.2 - Encrypted Credentials Discussion

Great tutorial!

Posted in Active Storage (Rails 5.2) vs Shrine

In the aplication, users have to upload files, I plan to use Amazon S3.
Do you recommend using Rails 5.2 Active Storage, or using the Gem Shrine as explained in Gorails?

What do you recommend?

Posted in How do I save the user_id by adding the mail?

Thanks Jack! As you said, I solve it

Posted in How do I save the user_id by adding the mail?

How do I save the user_id by adding the mail?

For the relationship, you have to save the user_id, but to be more dynamic for the user, I want to the users search other users by the email and rails save the id as usual.

How is it done?

In the views I have:

 <div class = "field">
     <% = form.label: user_id%>
     <% = form.text_field: user_id, id%>
   </ div>

 I'm using Devise.

Thanks for all your help!! :)

I have access to current_user in model ?

I'm try:

def classroom_params
       params.require(:classroom).permit(:name, :owner_id => [current_user])
end

But don't work because "owner.required".

Some values by default and others by strong parameters from the views

Posted in How to create many subcategories in rails?

Without using any gems how do I do this in rails? I see the gem Ancestry (https://github.com/stefankroes/ancestry)

Main Category
Sub Category
 Sub Category
    Sub-sub Category

Main Category
 Sub Category
     Sub-sub Category
          Sub-sub-sub Category


Main Category
 Sub Category
 Sub Category
 Sub Category

How would the relationship between models?

In many projects created with Rails I see that they do not use any gem to give permissions, for example Gitlab:

https://gitlab.com/gitlab-org/gitlab-ce/blob/master/Gemfile

What method is used today to give permits?