Francisco Quinones


7,400 Experience
40 Lessons Completed
2 Questions Solved


Posted in Adding Exceptions To Recurring Events Discussion

Chris love to see a reschedule event or one recurrent.

Posted in Recurring events with the ice_cube gem Discussion

On my app I use a Event and a EventTrans model so for each time a event occurs we can have a record with info and other stuff. So for the Calendar we display the First event with the recurrent on the fly and each time the event pass we save it as a record or if we need to move only on recurrent we create it as a event transaction.

My only problem is the time it takes to check if a recurrent is create as event_trans or not for calendar view.

As always Chris great job

Posted in store_accessor with jsonb nesting

<%= f.fields_for :foo_permit, || {}) do |permits| %>

Posted in store_accessor with jsonb nesting

So Im building a user permits column with jsonb.

jsonb column

    bar_permit: {
       key1:      [],
       key2:       "Bar",
       key3:       false,
       key4:       false,
       key5:       false
    foobar_permit: {
      key1:      [],
      key2:       "Bar",
      key3:       false,
      key4:       false,
      key5:       false
class Foo < ActiveRecord::Base
  serialize :permits, HashSerializer
  store_accessor  :permits, :bar_permit, :foobar_permit

with the HashSerializer I can call the first hash keys as table columns


class HashSerializer
  def self.dump(hash)

  def self.load(hash)
    (hash || {}).with_indifferent_access

now I need to make the bar_permit and the foobar_permit to a hash with preset keys

I add these methods to the model so I can have a {key:value} for bar_permits

def bar_permit=(attributes)
    value = []
    attributes.each do |index, attrs|
      value << attrs
    write_attribute(self.permits[:bar_permit], value)

  def bar_permit
    self.permits[:bar_permit]= {
      key1:      [],
      key2:       "Bar",
      key3:       false,
      key4:       false,
      key5:       false

Is this the correct way of making the attributes behave as hash?
How can I make the form helpers work with the keys of the virtual attributes as fields.

The first Event with all the info is created on the Event model and when is the date of the even I use the build a recurrent is like a transaction of the event and is stored in the db. The Event just has a temp on the fly presenter. the recurrent es more like a record of what happen that day. That's my approach to this on my businesses logic.

I haven't tried without recurrent event. All my schedule have recurrent. I can add a gist with my setup and you can check it out.

I'm using the recurring_select + ice_cube gems on my app and implement the full_calendar for the interface. schedule. This is one of the best combination so far.

Posted in Create a welcome page with a tour/get started

Thank you Chris for the feed back.

this part is what I'm most interest:

marked off like intro_complete once they're finished with the tour. 
You can display the tour the first time and when they close out of it make
an AJAX request to mark that column as true

Posted in Create a welcome page with a tour/get started

Hi, I was thinking of a way when the user login for the first time they get redirect to a welcome page where they take some steps into maybe a tour or fill some important fields to getting started.

What is a good approach, technics or tools to show the user how to use my interface.
Any article, examples will be nice. Im using devise for users.


Posted in How to setup SSL with a rails app

Got it working Chris. Just redo same step and got it working. thank you.

Posted in How to setup SSL with a rails app

Thank you, Chris as always for the quick reply.

Posted in How to setup SSL with a rails app

I chris having a little problem. So I was following the Docs.

  1. got the CSR from heroku
  2. I got a godaddy cert ssl
  3. Update the DNS (heres where im having problem.)
Standard Wildcard SSL from godaddy
CSR files
heroku certs:info
Fetching SSL certificate hypsilophodon-49522 info for myapp done
Certificate details:
Common Name(s): *
Expires At:     ...
Issuer:        ...Go Daddy Secure Certificate Authority - G2
Starts At:      ...
Subject:        /OU=Domain Control Validated/CN=*
SSL certificate is self signed.
heroku certs
Name                               Common Name(s)                  Expires               Trusted  Type
....-49522  *,                         ...                        False    SNI
On my DNS Management
CNAME   www
Your certificate * expires on ...
Ensure you've updated your DNS to reflect the new target name. See domain table below.
heroku panel settin
Domain Name DNS Target

I think im doing some setup wrong.

Godaddy Cname

Posted in How to setup SSL with a rails app

Chris Thanks as always.

Posted in How to setup SSL with a rails app

So I have a ssl certification that I want to apply to my rails app. Im using puma on Heroku.

Posted in User create Dynamic Role base

Hi! So my app uses CanCanCan and Devise for working with users. Now the app needs to have a feature where users can create role. How can I approach this new task.

Admin(User) can create Roles with a permission list (can and can't with on/off boolean) without redeploying the app.

Posted in Message Templates Discussion

thanks Chris love this one, got it working in mins.

Posted in Sending Emails with SMTP and Sendgrid Discussion

jajajaj Chris Your the man. I was just switching from my simple gmail account to using sendgrid and now this episode show up. :) very very happy.

more like this plis!

logo Created with Sketch.

Screencast tutorials to help you learn Ruby on Rails, Javascript, Hotwire, Turbo, Stimulus.js, PostgreSQL, MySQL, Ubuntu, and more. Icons by Icons8

© 2022 GoRails, LLC. All rights reserved.