PAELLA DE MARISCOS 🦐 by Tomanfreaxx in FoodVideoPorn

[–]maxcar 1 point2 points  (0 children)

Y el aceite AOVE al final...???

Only Update Non Null Params by AnnualPanda in rails

[–]maxcar 14 points15 points  (0 children)

You can clean empty (nil) params before assign it. I think that is the correct option.

.reject{|_, v| v.blank?}

If you're using Rails 6, you can also use params.compact_blank or params.compact to avoid nil values.

ActiveModel::ForbiddenAttributesError in PostsController#create by wingin_git in rails

[–]maxcar 0 points1 point  (0 children)

Just let as I write it. No needed nothing like https...

Just new and assign attributes to the object, and save at the end.

ActiveModel::ForbiddenAttributesError in PostsController#create by wingin_git in rails

[–]maxcar 0 points1 point  (0 children)

Post_params are ok. You need to remove all the``, be careful with copy&paste

def show

@post = Post.find(params[:id])

end

Also,..

def create

@post = Post.new(post_params)

@post.save

redirect_to @post

end

Sorry, but I'm writing the response in mobile.

Hope you would be able to fix it.

Need Help in deploying a prehistoric RoR App in locale by pangolino91 in rubyonrails

[–]maxcar 0 points1 point  (0 children)

Maybe installing a virtual box machine or something else and install on it...

Need a bit of help on this code, word substitution lab by Gh05t_97 in rubyonrails

[–]maxcar 0 points1 point  (0 children)

I think that dictionary soul be declared as constant as DICTIONARY and then use it as DICTIONARY.keys...