Jerome .

Joined

110 Experience
0 Lessons Completed
0 Questions Solved

Activity

Interesting curve on the road to sending a Twilio SMS. Running the command as per the send_text method suggested, ran the first time from localhost.

But somehow, after adjusting the method to be able to handle the API response, Rails 5 complains with:
ArgumentError (Missing host to link to! Please provide the :host parameter, set default_url_options[:host], or set :only_path to true) I am certain the method is firing (because when the conditions are not met, the console prompt returns to a ready state & testing without the added line generates the SMS).

Thus, adding status_callback: update_twilio_reminder_url(reminder.user_id),to the method is hanging because it needs a defaulturl option. But which? certainly not action_mailer's? config.application.default_url_options? config.application.routes.default_url_options? On this point, the rails guide is as opaque as the error message...

Posted in Error Tracking with Errbit Discussion

I am trying to wrap around my head around the hooks. The first immediate hook is errbit knowing the application's github repository. The second is the airbreak.rb file where the app (and I assume all of its deploys) actually points to errbit application and its services. So I understand airbreak config... 'send my errors to errbit'. But why then does errbit need to know about to the repo?

A corollary question: if there are multiple deploys, say 'staging1' and 'staging2' are added, they will all be handled by errbit and show the non-traditional deploy name (unless stated in ignore_environments config line) ?

Another suggestion is a non-rails issue, but fundamental nonetheless: focus on the database queries themselves. A great suggestion I have held dear over the years is to ask "what are the critical queries an application may have?" (the most frequent one, the most valuable, the most calculation intense...) On that basis, with a knowledge of how databases index, one can often find a data structure that is more efficient than another (conception over optimisation). Large test data sets for different data structures allow to validate design choices. To me, that is the core of the onion...

Posted in In-App Navbar Notifications Discussion

Very useful and good pacing/progression of arguments.

Two questions.
1) the onClick handler is going to go to an object, so the page is going to be refreshed anyways. To make a counter decrement by 1, several options are available: one is to check the object and find Notification with equivalent object_id and type and recipient = current_user and update that. The other is to have routing as member and have the coffee script call `url: "notifications/#{id}/mark_as_read` and update there. I am not sure of which avenue is better (I believe the second may be faster), nor the proper syntax to generate the notification id in the url

2) you mentioned polling. Websockets would be the best solution for one with a server. This has two caveats. As a user, I have seen notifications be browser tab-dependant (I use a lot and do not always get notifications); it is a worry. In an exploratory phase (i.e. no significant traffic numbers), one could reason: 'let the user decide'. what would be a quick and dirty way to have a fa refresh icon update the notification status?

er... and testing rotating a second time needs production traffic to run if `notifempty` is set !

Add `this takes barely 5 minutes to read and complete` ;-). Concise badge. Also, your article should have a date on them (both created and updated); provides added insights as to potential gotchas from framework changes over time.

Posted in Deploy Ubuntu 14.04 Trusty Tahr Discussion

That may explain why I hit a small bump with the above. Editing the Capfile would then *not* need `require 'capistrano/bundler'`. Next time I deploy, I'll report back...

Posted in Deploy Ubuntu 14.04 Trusty Tahr Discussion

You mention that Capfile should include `require 'capistrano/rails'`. However the base cap installation has commented out ` # require 'capistrano/rails/assets' # require 'capistrano/rails/migrations' ` What is the delta between these two options?

Posted in Introduction to Importing from CSV Discussion

my thinking is that the end-user, not the developer is going to hit these errors and need to act upon them. So it is a top-level priority. A couple of instance variables under model's `def self.import(file) rescue @counter += 1 @check_me << row end` should gather the data, but controller `def import if @counter > 0 redirect_to chosen_modes_path, notice: @check_me ` hits a

nil:NilClass error. I guess, passing from ruby library to rails is what eludes me.

Posted in Introduction to Importing from CSV Discussion

A big difficulty is gathering the errors and viewing them in the resulting rails view...

Works also with button_to, but to invoke font awesome [... remove needles spaces in what follows ...] data: {disable_with: raw(" < i class='fa fa-spinner fa-spin'> < /i>One moment please...")}

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2020 GoRails, LLC. All rights reserved.