Remove omniauth and convert existing users
4
Gems / Libraries
Hi everyone
I have LinkedIn omniauth sign in up and working on my Rails 5 app in accordance with the Devise guide: https://github.com/plataformatec/devise/wiki/OmniAuth:-Overview
I have some acti...
Nino Rosella replied
Solved
Rails csv import with associations
8
Rails
I am building a rails application that associates posts with many different categories. For example, I have a Post and need to be able to assign it to the categories Sports, News and Science throug...
Chris Oliver replied
Solved
How do i add a ":unique => true" to an already existing reference?
2
Rails
I have my DB already set up, and it references another table. I need to add in `:unique => true` so i don't get duplicates. I cant however drop the table and start over as there are items in the...
Félix Landry-Audet replied
Solved
Multiple select for CSV Export
3
Rails
Hi there,
My users can create a report record which is basically a scaffolded model "**Report**" with controller and views. The users can use this model to create records that a CSV method is usin...
Sascha M. replied
Solved
How do I configure paperclip with capistrano?
7
Servers
Hi,
I deployed using the "Deploy Ruby on Rails" guide.
However I paperclip attachments no longer work in production. Got the below error:
Failed to load resource: the server responded with a sta...
Chris Oliver replied
Solved
Facebook Profile Image & Data using Devise in Rails
1
Gems / Libraries
I'm just starting to learn Rails so please forgive the dumb question. In my web app, I was able to set up devise successfully and then link it Facebook using Omni-auth gem. However, two things occu...
Chris Oliver replied
Solved
store_accessor with jsonb nesting
3
Rails
So Im building a user permits column with jsonb.
jsonb column
```permits:{
bar_permit: {
key1: [],
key2: "Bar",
key3: false,
key4: false,
...
Francisco Quinones replied
Solved
How do I create hierarchical data with a model?
3
General
I have found and played with awesome_nested_set which is _awesome_ for real. I was wondering if this is the recommended gem for managing tree data in Rails or if there are any others that would do ...
Chris Oliver replied
Solved
Is there a better way to simplify this?
9
Rails
Hi again,
I want to know if there is a better way to get a list of categories which only have products.
I have tried to do `@categories = Category.where(category_type: 'product').order(name: :as...
Chris Oliver replied
Solved
How do I avoid having duplicate rows in a has_many :through table?
3
General
I have a Center model and a Department model. The linked :through the Local model. However, I want to avoid inserting the same match twice in the Local table.
Do I use a validate statement or ther...
Félix Landry-Audet replied
Solved
Routing question: Pass a 2nd parameter in the URL?
5
Rails
Hi again :)
I would like to know how to get my routes how i want them haha as we all do :) Basically i want to get the edit variant URL to be like `/products/:product_id/variants/:variant_id`
ins...
Chris Oliver replied
Solved
How would I use cookies in a check_box_tag to maintain state between page requests?
2
General
I've created a multi filter widget using a search_field_tag, and multiple check_box_tags and I can't seem to figure out how to maintain the checked checkboxes state throughout the session. So for ...
Lance Williams replied
Solved
Was wondering id there is a way i can simply this ...
6
Rails
I was wondering if there is any way I can simplify this code, Ideally, I don't want to be looking up brands that are associated with the user, i want to do it on hit.
```
#Gets the ID associated t...
Alan Reid replied
Solved
Pull data from another table in a lookup
53
Rails
Hi all,
I am looking up a list of articles, depending on the brand ID's - `@articles = Article.where(brand_id: brand_ids)` what i would like to know is there a way to retrieve the brand name in thi...
Jacob Montgomery replied
Solved
Saved messages as HTML
3
General
Hi Chris,
I'm wondering, on your episode https://gorails.com/episodes/message-templates, would it be possible to have one of the saved messages as HTML? I've tried entering ```testthis is a te...
Chris Oliver replied
Solved
GroupChat ActionCable Part 6 coffee and Chrome compatibility
3
General
Running into a strange error, everything works perfectly fine in Safari/Firefox. However, when launching in Chrome functionality completely halts after adding ```notifications.coffee```. Is there...
Chris Oliver replied
Solved
I'm building a widget that needs to dynamically load my html files (similar to an SPA)
0
General
EDIT: Solved
Masud Hossain posted
Solved
How return has_many with array instead of object
3
General
Have a way to a "has_many" return a array instead of object?
```rb
class UserSerializer < ActiveModel::Serializer
attributes :id, :name, :nickname, :image, :roles
has_many :roles
end
```
...
Bruno Wego replied
Solved
Question on ActionCable Group Chat part 4, development.rb fix for redis
5
General
Saw in the comments the fix for ```(REQUEST_METHOD: GET, HTTP_CONNECTION: Upgrade, HTTP_UPGRADE: websocket)``` however I added the following to my ```development.rb```:
```
config.action_cable.a...
Chris Oliver replied
Solved
ActionCable Part 3: can't write unknown attribute `user_id`, what am I missing?
2
General
Having some trouble figuring out what I'm missing with submitting a message in the chatroom, I get the error for my ```messages_controller.rb``` saying that ```can't write unknown attribute `user_i...
Chris Oliver replied
Solved