Rails Ruby on Rails Forum
How to add or call a particular action in all the controllers ?
4
Rails
I want to store the user activity by using after_action in the all the controller for a specific action of those controller
nynhex replied
Solved
Deck Builder App. How do I query only decks you can make with the cards in your inventory?
7
Rails
I'm making a deck building site similar to hearthpwn.com. It would be nice if users could filter decks based off the cards they have in their inventory.
In other words, I'm trying to make a query ...
Matias Fernandez replied
Solved
Everyone's Been Bitten Before - Whitespaces/Unwanted Characters in User Input
2
Rails
Hey all!
I've got an interesting question, and I'm sure you're all handling it in different ways. I know there are plenty of ways to tackle this problem, so I was interested in what everyone's doi...
Nick J replied
Solved
[HATCH] Some questions :)
1
Rails
Hey there,
i have a few questions rg. your new product Hatch.
1. is there a Heroku-like way to insert a SSL cert or do we need to do that manually?
2. What permissions are we granting so you can ...
Chris Oliver replied
[HATCH] Error deploying app
3
Rails
I'm getting this error when trying to deploy my project with hatch. I made sure I have the RSA file.
Deployment Error
```
Fetching origin
Warning: Identity file /home/deploy/.ssh/thinkrtc_rsa not...
Chris Oliver replied
Solved
Autoloading models not working
2
Rails
Hi,
I have this model structure
```
/models
/survey
/questions
question.rb
survey.rb
```
I have used this autoloading in my application.rb so I don't have to deal with modules everyt...
Chris Oliver replied
Solved
How should I implement a week model with days and opening times?
1
Rails
Hello,
I need a week model which contains all weekdays and every weekday has multiple opening and closing times.
For example, a barber shop is open on every monday from 9 a.m. to 11 a.m. and 1 p.m...
Jacob Montgomery replied
why drop down menu (Account Setting)is not showing in sidebar?
1
Rails
```
my html
<%= csrf_meta_tags %>
<%= stylesheet_link_tag "bootstrap.min", media: :all %>
<%= stylesheet_link_tag "dataTables.bootstrap.min",...
naveen kumar replied
Solved
I didn't understand this part of the Liking Posts
2
Rails
```
<%= render partial: "likes" %>
```
we render something here, but where is this partial?
usually when I render something with Rails it's a form or other code that exist
but what are w...
Maor Tzabari replied
why destroy action is called two times.
6
Rails
my destroy action
def destroy
@owner = User.find(params[:id])
@owner.destroy
respond_to do |format|
format.html { redirect_to root_path }
format.js {}
end
my index page delete link
...
naveen kumar replied
Solved
rails testing always raise the same error
2
Rails
No matter which test file does I run, it always raise this error.
I don't konw how to fix this, thanks!
```
$rails test test/integration/about_test.rb
Running via Spring preloader in process 524...
csko12 replied
How do I build a dynamic drop down menu in Rails with Simple Form?
1
Rails
I would like some help on how to build a dynamic dropdown menu with Rails Simple form.
I'm really new to programming so any help will be appreciated.
Many Thanks,
SS
Here is my Simple Form cod...
Chris Oliver replied
Get Paperclip file before save
2
Rails
Is it possible to read the file, in my case image file, inside Paperclip::Attachment before the file is saved?
I need to send the image to an api first and then from the response it's given if it...
Agung Setiawan replied
Solved
Is it Ok to use "Error" as a model name in Rails project?
1
Rails
I have a simple question about class naming: is it Ok to use `Error` as a model name in a Rails project?
This model will be used to persist Ruby exception objects for errors monitoring. Using `Exc...
shakycode replied
Solved
error when i click on follow button ... Relationship is not working
0
Rails
All i am trying to create follow and follwers relationship and i am experiencing some issues. Chris i think you should create a course on this as well. i am getting issue undefined method `id' for ...
khemlall mangal posted
Creating nested attribute with two parent attribute.
1
Rails
Hi,
Been going round in circles for a day or so but still can't seem to find a solution for this. I have project management chat app that on sign up, you create the project and the first chat mess...
Ariff Munshi replied
Solved
Caching static pages without CSRF token
4
Rails
Hi,
I'm looking to use `expires_in` method in my actions who returns static content.
For this pages I would like to return a cache control header where `public` is `true`. Like this it allow an p...
Nicolas Brousse replied
Solved
Mention
1
Rails
hi Chris Oliver on the @mentions episode can you share the css you use to show both user name and profile picture?
Thanks
Chris Oliver replied
cancel actioncable connection for unauthorized users?
0
Rails
Followed the series on action cable notifications and setup the meta tag so that action would not try to connect if the meta tag was present. Here is my code.
```
$(document).on("turbolinks:load"...
Matt Taylor posted
Mailboxer: How to attach a file when starting a new conversation
0
Rails
I am using the Mailboxer gem. When creating a new conversation, the message that is created at that point is does not attach the file I am uploading.
new.html.haml
= form_tag conversations_path, m...
Mehdi Mehrtash posted