Stan X


2,660 Experience
7 Lessons Completed
2 Questions Solved


Hi Chris,
Would you share a code example for that feature when you have some time? I (and probably not me only) would be very interested to see it in action.

In addition to this, I was wondering what could be the idea for allowing a user to view and edit an item based on his/her email being part of the attribute (eg. assign_to). Is pundit appropriate to this as well?

Hi Chris and al.
I have been watching the video about pundit and i am trying to implement it. I have been reading Andrew's (above) blog post about it and separating content for users based on their appartenance to companies. It would be great to have a working example about this.

Hi Chris. I had 2 follow up questions for you:
1. how can you send the autocomplete selection directly/automatically to the search instead of the video two steps (indeed first you select and then you have to type enter)?
2. in the autocomplete, how do you merge 2 fields. say you look at last_name but you want to display both first_name and last_name concatenated.
have a good day! Stan

Hi Chris. Watching the episode, I was wondering how i could implement this feature using a single search input box which is part of my navbar.

Indeed, my app goes through different index views (switchable through sidebar items) but the search input stays at the top. My workflow would be to perform individual searches based on the index view i am and not search across all models. Shall I hide show identical search boxes based on the view page?

I think there are ways to be more clever and to leverage only one and redirect the search with "if statements" (model, view or controller name) but great to have people views on this.

Posted in IFTT

Hi Go Rails Community!
Would any of you ever looked or seen a project/ tutorial on IFTT and rails app connection? I would be interested in directions in terms of going deeper? I know i have to read through the IFTT API doc but the other bit (rails side) would be nice to get examples. may be a topic for Chris ;-)

Stan (France)


Posted in Sending emails with Mandrill Discussion

Hi Chris, I am reading gibbon gem but unsure on what it is exactly for? Would you describe how you are using it for gorails to illustrate?

Posted in User Authentication with Devise | GoRails

thkss Chris. but may be this is worth a video. i could see the question hanging here and there on the web. sign_in, register and edit user details. personally i guess i am close to the solution in my implementation but for any reason, edit modal form is not submitting. not sure if due to error in javascript or else. will find out but a nice tutorial could help subscribers.

Posted in User Authentication with Devise | GoRails

Hi Chris. Any indications/directions on how to turn the edit profile into a modal like on gorails website? Best

in js files:

$(document).on("turbolinks:load", function () {
if ($("meta[name='current-user']").length >0) {



in coffee files:

$(document).on 'turbolinks:load', ->
**if $("meta[name='current-user']").length >0


(the ** only indicate mandatory indentation - they need to be removed and replaced by spaces)

For readers of these comments, the issue was with the indentation. Beware of coffeescript on that side! Thks Chris again for your help.

I added
if $("meta[name='current-user']").length >0
above the
App.chatrooms = App.cable.subscriptions.create "ChatroomsChannel"

but this leads to
SyntaxError: [stdin]:1:1: unexpected if

yes. was my immediate attempt but...still no success.

Hi Chris,
How would you add this to your or a from the chat application? Not sure how to translate it in coffee script.

Has someone seen support for file attachment using actionable?

Hi Chris,

yes i used the client side. To achieve this, I created a current_user style class in the <head> section on the main application.html.erb:

background-color: red;

then I added this class to the span of both the _message partial and the each message will be marked with the user_id of the speaker and if recognized as being the current_user, CSS will spot it! ;-)

indeed, by default all usernames are styled the same but this class takes precedence as being the only one defined specifically.

It is nice and working.

Hi Chris. I have a question for you. I was playing with the code and wanted to color the username depending on if you are or if you are not the speaker.

In rails 5 and actionable (this what I am seeing in your code), unless I am wrong, you have to 2 places that need to be touched in order to so the formatting on the messages. first, on the view (here this will be under your _message.html.erb partial) that will retrieve and render when you load the page. second, on the javascript channels (coffee file. in your case

I was able to color code the user (mine or others) depending on the speaker name on the view side but the channel seem to be quite different as it streaming to both. I simply compared User.find(message.user_id) to current_user.

On the channel side (used for updating the messages after you have reached the page), I am not sure how to introduce that test?

Posted in Using Purchased Themes with Rails | GoRails - GoRails

Thks Chris. just wondering why the rails template still does not include a pre-created placeholder for fonts.
Anyway, i found this ressource that could be useful to solve questions with regards to fonts found on purchased themes

PS: might be lazy but generally I dump everything under the asset pipeline rather than vendor. i know it is bad....ahah