Flexible Nested Attributes
I'm working on a practice "Magazine" application, that has **Issues** with nested attributes of **Articles**, which has multiple nested attributes that are **Content Blocks**, which can be one of s...Terence Devine posted
Simple newsletter sign up?
Getting it on Digital Ocean is easy. I can walk you through it. The GoRails deploy guide should give you everything you need to get started. Let us know where you're stuck and we'll chime in to ...shakycode replied
Ecommerce multi-step checkout with guest accounts
Oh believe me, I've looked into the 3 S's for almost every e-commerce project I've tackled! It seems like I always come to the same outcome though- they provide 50 features when all I need is 6. Th...Mark replied
Pundit for RESTFUL actions on Model fields
Yeah, that's one of the nifty things that you can do with strong_params. It used to be that the allowed params were global, but in some cases you want to have different accepted attributes like this.Chris Oliver replied • Solved
JSON for Rails delegated attributes?
Chris, thanks. That worked great. Here's how I implemented this (which seems like it's working great). @prospect.attributes.each do |attr_name, attr_value| json.set! attr_name, attr_...Brian Schwartz replied
Storing Constant Date in Rails
Also, if you don't need this as a global constant you can also do something similar in a helper. But from the sound of it, you'd want a global constant for this use case.shakycode replied
First argument in form cannot contain nil or be empty
Not a problem, glad I could help! Let me know if you need anymore help.shakycode replied
When to use scoped models?
I'd say any time you're making supporting classes. For example `User::Import` should be a separate class from `User` to provide the functionality we want, but at the same time it's really closely t...Chris Oliver replied
Is Devise always a good choice?
I jumped on this thread late, but I would highly recommend Devise. As Chris said, it's well tested, very mature, and feature rich. As well if you really want to lock things down you can use the D...shakycode replied • Solved
Dynamic view based on associations
I'd say probably using a jQuery AJAX request. If you use a dropdown, set the value to the region's friendly ID and then write a jQuery callback to listen to the dropdown's change event. Somethin...Chris Oliver replied
Suggestions for messaging
I've done some research on Pusher but I'm doing my best to keep the 3rd-party API dependencies to a minimum. Although pusher does an excellent job with realtime messaging and events. Then there's...shakycode replied
Build REST API with Devise
I think you can just simply make a POST to the same url as the sign up form normally which is `/users`. Same with PUT and DELETE but for logging in and out, you want to POST and DELETE to `/session...Chris Oliver replied
Advanced routing setup
For nested queries like that, I think you can use `benefits.id` as the field. This might be of some help: http://www.elastic.co/guide/en/elasticsearch/reference/1.4/mapping-nested-type.htmlChris Oliver replied
Tracking Rails App Usage with Analytics
Yeah, that's correct. It only runs in the browser on a page view. You'll get very basic data with it. Segment is fantastic for us because it allows us to track custom events and not just page vi...Chris Oliver replied
Multi-event .ICS file generation?
well, nevermind, I put it in the controlller on the active admin index page like this: ``` def index @myevents = Invoice.ransack(params[:q]).result super do |format| format...kayhtee replied
Multi Model Sign-up Wizard
Ok.. here is a StackExchange post on this: http://stackoverflow.com/questions/28007639/rails-nested-attributes-and-has-many-through-associations-not-showing-fields-fo It has my Models etc.Dan Tappin replied • Solved
video about sortable lists
Cool, I would love to see a video on acts_as_listAnthony Candaele replied
problem with like link in nested resource
Oh of course. If you look at your routes, there is no `POST` paths there. I think you can change the `resources :like` to be singular instead like this: `resource :like` and that will help. In e...Chris Oliver replied