Save 36% for Black Friday! Learn more

Rails Ruby on Rails Forum

Nested attributes

4
Rails
Hi All, I'm working with nested forms and I'm stuck trying to create the two models and the controller to handle this association. My models following this structure: Survey -> recipients &lt...
Giancarlo Corzo replied
Solved

Email Stripe Receipts

1
Rails
Firstly, thanks for the great Stripe tutorials! I just finished implimenting basic subscriptions on my rails app. However, I do have a few questions regarding emails. **Will Stripe automatically e...
Chris Oliver replied
Solved

Access Rails constants from Webpack-managed JS

1
Rails
I'm just starting to use Webpack with Rails, and have a question. Let say there is a constant defined in Rails application. What could be a proper way to access this constant from JavaScript? Assum...
Chris Oliver replied
Solved

3rd party integrations using Oauth/omniauth

2
Rails
When creating a facebook login, you put `user = User.from_omniauth(env["omniauth.auth"])` inside `sessions_controller.rb` , so when a user goes to /auth/facebook it will prompt them to login via fa...
Masud Hossain replied
Solved

How do I import a Sass library from within a "node_module" (Rails 5.1)?

11
Rails
Pretty much the question above! I have a Rails 5.1 app with webpacker installed, and I used npm to install a front end framework: `npm install bulma --save` Now that it is inside of `node_module...
Ryan Martin replied
Solved

How do I Geocode location with either address or Lat / long

2
Rails
I'm building a portfolio app where a user can share all of the locations that they like to work from. A location can be a home, office, coffee shop, park or some random place in the wilderness. Giv...
Chris Oliver replied
Solved

How to use In-App Notifications as an activity feed?

6
Rails
I worked through https://gorails.com/episodes/improving-in-app-notifications yesterday and it works great. I tried to use this same system create activity feeds for my different models, but ran in...
Abhinay kumar replied
Solved

Dynamic select boxes - like railscast 88 - but it ain't working

4
Rails
I am trying to scope a form selection list to from another select box selection. The select box groups the options correctly in the dropdown. Everything checks out in the console but it still does ...
Aaron Taddiken replied

How to i implement adobe e sign in rails 5?

2
Rails
Echochamber is not up to date and also not working , i have found the working python app, should i use python to process the document , help me guys.
naveen kumar replied

Routing Error No route matches [POST] when submitting ActionMailer

1
Rails
I have created a form but I'm having issues submitting the form, it's not getting the right route, I'm sure this is a simple fix, I'm just not seeing it. Here are the relevant files: `new.html.er...
Ben John Bagley replied
Solved

How can I setup Cloudfront CDN for Rails App ?!

6
Rails
It's good to have CDN enabled to speed up rails app but how can I do that with Cloudfront ?!
Anh Vy Nguyen Vuong replied
Solved

EAV Rails way?

4
Rails
Hi Team, I was trying to explore possibility of using EAV (Entity-Attribute-Value) pattern in our application. We are a ecommerce solution and would need Product variants to be captured, I did som...
Anand Padia replied

One form, two separate controllers, created at once.

1
Rails
I'm trying to create a sign_up form where the user will choose his email + password AND and Article at the same time as creating a user account. So assentially, one form will create a new User ...
naveen kumar replied
Solved

`fresh_when` usage for dynamic queries

6
Rails
Hey! I'm recently looking to use `fresh_when` method on my `PostController`. ```ruby class PostsController < ApplicationController def index @posts = Post.published.order(published_at: :...
Alexander Popov replied

How to upload multiple file inputs in rails production?

8
Rails
Hi there, I'm trying to upload multiple file inputs from single form. The form is working fine in development, but in production the form showing that redirecting for long time and returns nothing...
Jacob Montgomery replied

How do I mark content as "seen" or "read" when it's in the user's view?

3
Rails
Hi everyone, I'm trying to mark messages as "seen" when the div has entered the user's view (for example, the Facebook behavior of seen posts). My current attempt is a mix of the Unread gem (https...
Ivan Raszl replied

How to delete records in a join table?

2
Rails
I'm using Refile for uploads and am having a tough time figuring out how to delete individual files. I need to display a delete link under each thumbnail, so my first thought was to do something li...
Adrian DeGus replied

Rail API Knock User Authentication

1
Rails
Application Strucutre **Rails API** user model & controller - CRUD blog model & controller - CRUD comments model & controller - CRUD Standard Blog App with Knock Authentication for acc...
Chris Oliver replied

Why devise helpers are not available in application controller, except authenticate_user! ?

1
Rails
undefined local variable or method `user_signed_in' in application controller but working fine in application.html.erb if user_signed_in layout 'admin_lte_2' else layout 'some_other_layout' en...
Chris Oliver replied

Updating sort_index attr on a collection of models

9
Rails
Hey there! I've got a collection of models (Product) and each product has an attribute called `sort_index` that allows the store owner to set a specific order for their products. The UI allows the...
Sean Washington replied
Solved

Learning Ruby on Rails? Join our newsletter.

We won't send you spam. Unsubscribe at any time.