Ruby on Rails Community Forum

Refactoring controllers to keep them RESTful

3
Rails
Hi gang I have a feature where a user can query the Google Books API with an ISBN number and get the book as a response. I have this all working nicely, but I'd like to refactor my `Books` control...
Nino Rosella replied
Solved

how do i mount a full Vue template into my rails app

1
Rails
I'm preparing for a hackaton and my teammate built a Vue app for the frontend. I've installed rails and vue webpack, and Vue is working well. But I don't know how to incorporate the Vue frontend m...
Tabish Iqbal replied

Best Gem and Instructions for setting up followers one way.

2
General
Hi Guys, I have an artist model and I want users to be able to follow them without being followed back. Is there a gem that I can use to do this and is there any documentation on setting that up?...
Gerard Donnelly replied

How do i create these associations so they are sortable?

0
General
I need some help figuring out how I should associate my models. I have three models: ``` class Series < ApplicationRecord has_many :modules has_many :episodes end ``` ``` class Module &lt...
Twig posted

Regex getting hashtags

0
Ruby
I'm wanting to capture all hastags from the richtext field. I thought I had a solution until I came across testing where the richtext editor put HTML entites into the markup. ``` /#([\w]+)/ ``` `...
Stephen Sizer posted

How do Rails developers work with JS developers on a project?

5
General
Hi there! I've been the only developer at my workplace for a while now and I've been coding in Rails, primarily. I don't have any formal qualifications in development, but I've been self-learning ...
Chris Oliver replied

Getting No route matches "index.html.var" errors

0
General
Hello, My Ruby app has been running for the last two months on Hostgator with no issues. I have not changed one line of code. All of a sudden, on March 9th, trying to access my website using the ba...
Gary posted

Screencast requests: Global ID and @mentions

3
Site Feedback
After watching the recent screencast on Action Text and @mentions, I became curious as to how Rails stores references to these associations in texts. Turns out it uses something called Global ID: ...
Chris Oliver replied

Adding an inline style to a Datetime_select field in simple_form

3
Rails
How do I add an inline style to a Datetime_select field in simple_form? What I would like to have worked (this is in Slim): `= f.datetime_select :published_at, style="width:auto;"` but this isn't...
ramzieus replied

Stimulus - flatpickr

0
Javascript
Hi all i've been trying to do one thing without sucess for few days... i want to select a date on the flatpickr and then based on that date create a table Date selected Date selected -1day Date s...
kriera posted

denial of service attack

1
General
What should we do to overcome Denial of service attack?
Chris Oliver replied
Solved

Multiple logins

0
General
Hi, What happens if we login with same credentials simultaneously. How to resolve such issue? And How to restrict other user from login if one user is already logged in?
satish posted

rails 4.2.8 - stylesheet_link_tag throws ActionView::Template::Error: no implicit conversion of nil into String

0
Rails
I'm trying to update a rails app which runs totally fine if I use rails 4.2.4 (the version it's been developed on) upto rails 4.2.7 As soon as I switch to rails 4.2.8 or later (tested all versio...
Widu Wittekindt posted

jbuilder serializer for returning INDEX endpoint not working like it did with me.json.jbuilder ....

2
General
Hello! I finished your rails api - react-native demo and am begging for more react-native rails demonstrations... I am building a game with rails/react now using your tutorial as my base layer for ...
Megazoor replied

Help request - Not sure how to implement an idea.

3
General
Hi, first of all thanks all for reading this :) Let's say i would implement a kind of autosave form based on a calendar. Let's sayt for each row of elements (pills) you have the last 7 days from ...
Ashley Engelund replied

rails - javascript doesnt work on herokuapp

0
Servers
I know this question is asked a lot in old posts but, no one has fixed my problem. The problem is an error in the web console TypeError: e is undefined ReferenceError: ubah_tampilan_menu is not d...
Reckordp posted

Rubu auth without gems

1
Rails
Hello, i'm new to the forum and I am in urgent need of help. I have a client that is asking to change the basic auth in his rails app to an auth that uses a web form, in a page, instead of an ugly...
Chris Oliver replied

Wordpress sub-directory on Rails App in a same server with setup using Capistrano, Passenger and Nginx.

4
General
Hi sir, Did anyone tried to setup rails app with alongwith wordpress blog and using capistrano, passenger and nginx setup? This will happen on the same server and the wordpress blog would be put o...
AreaScoutsDeveloper replied

How to configure gem 'devise' and gem 'devise_token_auth' in same project

0
Gems / Libraries
Hi, While creating a project, I need to configure gem 'devise' and gem 'dvise_token_auth' in same project and in same model. Is it possible to implement this, if yes, then please guide me in implem...
Prachi Sharma posted

How do populate select box with filtered options in cocoons nested forms

0
Rails
Hi, I have been having having a challenging problem as my rails skill is still not great. I am using a cocoons gem to generate nested forms. I have three models `Employee` , `Competence` and ...
hemmpa posted

Learning Ruby on Rails? Join our newsletter.

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