Ruby on Rails Community Forum
Getting undefined Local var method model_resource_name on Rails g Scaffold Model
0
Rails
Running
$ rails g scaffold Poop
returns:
Running via Spring preloader in process 13525
invoke active_record
create db/migrate/20181928173828_create_models.rb
create app/m...
Megazoor posted
Deleting Comments In Nested Threads Discussion
4
General
How about taking an OO approach i.e. changing the type to DeletedComment, e.g. using STI? This eliminates the code smell of conditionals in a partial.
Alain Pilon replied
How do I add a conditional snippet of page specific javascript (likely a turbolinks issue)?
4
Javascript
Here's to hoping I can be clear and concise about my problem. I am willing to venmo/paypal a beer's worth of cash to anyone who can help me 🍻
I currently have a bootstrap (3.3.7) modal that is, by...
Peter Marcano replied
Changing currentTime of video in Rails webpacker-react component
0
Rails
So I was able to put a react component in a [sandbox][1] and get it working as I wanted. In isolation it just manages the currentTime of a video. In the main app clicking a button changes the state...
gjaros posted
How do I handle Koala error
2
Rails
After watching [Facebook API and Auth Tokens with Koala](https://gorails.com/episodes/facebook-api-and-auth-tokens-with-koala), I decided to implement it. However, I made a mistake in my logic and...
Alexey replied
taking values from associated values
0
Rails
t1->t2->t3 . taking values of t3 in t1
Abhishek Aravindan posted
How do I convert a SQL query to rails?
0
Databases
Hi,
I'm new to ROR. The query I created below is functioning properly. I'm trying to prepare an interrogation. But I didn't succeed. The query is as follows;
@rad_check.tenant_id = SELECT groupn...
Emrah Yıldırım posted
Searchkick Elasticsearch filtering
0
Rails
Does anyone know of any good tutorials showing how to add filters for searching?
Thanks in advance.
Stephen Sizer posted
How do I properly handle submit events in Vue + Rails?
1
Javascript
Hi!
I'm learning Rails, Vue and JS and I've got a question on the proper handling of submit buttons on Rails using Vue component to validate it. I'm using mdbootstrap for the styles.
I built a fo...
olidev replied
Loosing my attached_images when cap deploy after switching my path so that my posts stay
1
Databases
Okay one last question :)
To avoid that cap production deploy is killing my Posts from the database i added
production:
adapter: sqlite3
database: /home/deploy/apps/Blogapp/releases/shared/d...
Sebastian replied
How do I access google apis from a cron job?
0
General
My requirement:
My cron job (a ruby script) would sync specific contacts between 2 google accounts.
Eg: Account A creates a contact in his (android) phone as "Lead John". It gets saved in google ...
Prasanna N posted
Rails 5.2 Credentials
2
Rails
Me again :)
Question about the new credentials in 5.2...
I've upgraded to 5.2 and actually really like credentials but wondering. Is it now the place to store all sensitive information including ...
Philip Benton replied
How do I .... And why should I... event source my application :)
1
Rails
Hi Chris,
Would be nice to see a video about event sourcing, and what approach would you take:
- https://github.com/fhwang/event_sourced_record
- https://github.com/RailsEventStore/rails_event_st...
Chris Oliver replied
Bundle Package and Deployment
10
Rails
Hi all,
New user to the Gorails site, what a fantastic resource! I'll be upgrading to Pro shortly.
I have a first question (probably of many)...
I am deploying my app with Capistrano and it work...
Chris Oliver replied
Inheritance is not working.
1
Ruby
Hi,
I'm a starter in ruby, I have a doubt in Inheritance in ruby. This is my sample code.
```
class TimeLine
attr_reader :tweets
def initialize(tweets=[])
@tweets = tweets
en...
Jacob Montgomery replied
How do I write the correct association?
0
Databases
If I wanted to have a "user_type" column in my "users" table that references to another table called "user_type", how do I write the correct association in rails? For example if my user_type is 1 a...
Arzee posted
How do I query a model with a value less than
2
Rails
I have a Lesson model that has an order field of type integer. What i want to do is find the previous lesson.
Lesson.where("order < ?" , 8)
This causes the following error. Any help woul...
Chris Oliver replied
How i can reuse one rails webapp as a API?
0
Rails
Hi, i build a rails application but i need reuse this app to create a API to use this as a backend for a IOS Application, this is posible? Thanks for yours comments.
Miguel Rios R posted
Alternative solution for belongs_to through
0
Rails
What is the alternative solution for belongs_to :through in association
Ravikumar posted
Not able to override a column with default value
1
Rails
I have created this in migration,
```
created_by VARCHAR (64) DEFAULT CURRENT_USER,
updated_by VARCHAR (64) DEFAULT CURRENT_USER
```
By default the current user values are stored but when i try to...
Jose replied