David Kimura PRO
Joined 7/18/2015
Drifting Ruby Owner
David Kimura PRO said about 5 years ago on Two-Way Messaging :
  Just following up to see if you had an example for the Two-Way Messaging. 

Can you go into a few more details and a use case? I'm understanding this as you want the Rails application (for example, that is being browsed on an end user's iOS Safari browser), to trigger, send and read SMS communications from their iMessage app.

On the other hand, are you more talking about having a backend service where a user can SMS a static phone number and carry a conversation? Something like a state managed SMS send/response.

David Kimura PRO said about 5 years ago on Two Factor Authentication :
  have you tried some of their suggestions? have you also tried a different authenticator app like FreeOTP or using something like 1Password?

David Kimura PRO said about 5 years ago on Record Audio to Active Storage :
  You would likely need to make most of your changes in the recorder function and also change the stream function to allow video. This episode may help with getting the camera to show. You would just want to ignore the bits about the streaming server as you wouldn't be transmitting the video feed.

https://www.driftingruby.com/episodes/video-chat-with-webrtc


David Kimura PRO said about 5 years ago on Form Wizards from Scratch :
  I would handle this with the buttons as the names would have a commit param. I'm not sure how this would be handled in i18n land. I'd assume that you'd pass a value attribute on the form.submit with previous or continue.

    <%= form.submit "Previous", class: 'btn btn-secondary' %>
    <%= form.submit "Continue", class: 'btn btn-primary' %>


You can then navigate to the appropriate routes on the create action.

      def create
        @company_profile = CompanyProfile.new(company_profile_params)
        if @company_profile.valid?
          session[:company_profile] = {
            name: @company_profile.name,
            website: @company_profile.website
          }
          
          redirect_to redirection_url
        else
          render :new
        end
      end

      private

      def redirection_url
        case params[:commit]
        when "Continue"
          new_wizards_companies_location_path
        when "Previous
          new_wizards_companies_[PREVIOUS_RESOURCE_STEP_HERE]_path
        else
          # handle non matching (likely the next step)
        end
      end


David Kimura PRO said about 5 years ago on Cross-Origin Resource Sharing (CORS) :
  It looks like in your staging, landing_page and production block, you allow all origins

origins "*"

Could you set an environment variable in place and things work properly?

origins ENV["URL_DOMAIN"]