Ruby on Rails Community Forum
undefined method `map' for nil:NilClass on select_collection
4
General
Hi,
I have been struggling with this error for the last 3 hours and its s bit frustrating: Here is the scenario
I am trying to populate a select box with Team names that belong to a specific te...
JM replied
Add Download Button to csv-export
2
General
Hi,
I did everything (and it's working!) regarding this episode:
https://gorails.com/episodes/export-to-csv?autoplay=1
How can I add a download-button in my views for that?
Thank you guys!
Sascha M. replied
validate presence of specific domain in email
5
General
Hi there, is a way via regex to validate an email and make sure it belongs to a specific domain, I found the below regex on SO and it doesnt seem to do the job.
validates :email, format: { wi...
JM replied
Rails Paperclip Gem - save parent model ID to path
0
General
I created a question on StackOverflow - but it hasn't gotten any attention as of yet, so I thought I'd share it here.
If you have any suggestions at all, feel free to share!
http://stackoverflow....
Terence Devine posted
Adding a Admin Interface to devise
0
Gems / Libraries
Hi there,
first of all: I'm pretty new to Rails, so please don't blame me if I ask a stupid question :)
I use devise + cancancan for authentication and authorization. The user model is already ge...
Sascha M. posted
Grabbing all the has_many relations of a specific collection
1
General
I've got:
```ruby
class User < ActiveRecord::Base
has_many :photos
end
class Photo < ActiveRecord::Base
belongs_to :user
end
```
Each user has a "shadowbanned" attribute (t/f). I'd lik...
Chris Zempel replied
Saving _form along with has_many through items
0
General
Hi Chris,
I'm having difficulty wrapping my head around how to save a form (`Kit`) that includes optional items for a `has_many through` relationship (`AmazonProductKit`). Here are my models:
``...
Michael Stitt posted
custom method in class to perfom simple calculation
4
General
Hi Chris,
Checkout mt simple scenario below: I am trying to get the total count of all absent and present person from an attendance sheet here are my models.
class AttendanceSheet < Acti...
shakycode replied
What else would you add to the Stripe Subscriptions app to 'complete' it?
3
General
Hi Chris,
I was wondering what else you would need to include to ensure all situations are addressed to complete the Stripe Subscriptions application? For example, I'm assuming webhooks for when a...
Chris Oliver replied
in app notification
4
General
Hi Chris do you have an example of in app notification like the one you use here. Basically you comment on a question I asked then I see it in the badge in the nav bar. Could you please show us a c...
Chris Collinsworth replied
Nested forms with rows like a table
5
General
Hi Chris,
I am battling nested forms , but not your standard .. what I want is a situation where the form behaves like a table where each new row will represent the object from the partial(nested...
JM replied
How do I make comments show the user who created it?
4
General
I would think that i could do something like the code below but it's not working. How can i approach this so it can show the user who created the comment and other information about the user? I ...
Wes replied
Multiday with calendar gem
4
General
Is possible you shed some more light on this ....
which is the best approach in my event.rb i so fat have this
class Event < ActiveRecord::Base
belongs_to :user
def durati...
JM replied
redirect loop on ActiveAdmin and authorization with cancancan
12
Gems / Libraries
When i try navigating to http://localhost:3000/admin i get "This webpage has a redirect loop"
and also my logs I have
Started GET "/admin" for 127.0.0.1 at 2015-11-25 17:58:35 +0300
Processing by...
JM replied
How do I make commentable comments available on the index page?
4
General
I've got the polymorphic comments working on the two show pages, but I want to show all my posts (and reports) along with their comments on the two respective index pages. I can't seem to get it.
Chris Oliver replied
Integrate active admin in a rails app that has a dashboards controller named as the default dashboard for admin active gem?
0
General
Hi there I have an app which I need to add active admin dash but already has a model with the same name dashboard.. Will that cause problems in routes?
JM posted
Stripe - Not cancelling access until the end of subscription period
6
General
Chris great job with the Stripe videos. I've just been through and implemented them. :)
The next bit I need to add is to stop my users access from disappearing the minute that they cancel. If they...
Chris Oliver replied
Group records by month to display in a chart
14
General
Hi Chris Im using HighChart and I have some data that want to display in group by month.
Francisco Quinones replied
How do I implement a model association that when changed older records are not affected
6
General
Here are my models (User , Project and Task) A user has many projects , a project has many users , A project has many tasks and a tasks belongs to a project , a user has many tasks and a task belo...
JM replied
How do i track a course progress?
4
General
Hey Chris,
I have been trying to build a onemonth like sample website.
How do i track the user's progress for each of his course.
Just like onemonth all these courses have multiple episodes, and i ...
Jay Kapoor replied