Re: [jsmn] JavaScript/CoffeeScript problem in Rails search form

From: Jon P.
Sent on: Wednesday, August 14, 2013 12:10 PM
That's a good list Eric, but I have one critique: Asking for help on "X" is different than what is your opinion "Y" versus "Z." That is to say there are "help me complete this task" questions and "let's discuss these tools" questions. SO and Google are fantastic at the former and the latter often produces more fruitful conversations, especially on a local group such as this. 

Jon Phenow
Software Engineer
g: http://github.com/jphenow
[address removed]


On Wed, Aug 14, 2013 at 12:01 PM, Eric Caron <[address removed]> wrote:
But how do we define "announcements"? Although that was my initial reaction/preference, I think attempting to block technical discussions will leave this group a ghost town that only attracts job postings.

Things I'd like to see in this thread:
  • "Hey, check out what I just made" (company feature, or GitHub project)
  • "We're hiring for Y"
    • Unfortunately necessary, but some hurdle before posting these is acceptable. I love hearing from other developers about their job openings*, but it really irks me when recruiters join lists just to spam us.
  • Information about some local event/news-article that's relevant to JS & MN
  • "Can somebody help me with X"
    • I see this as something that belongs on a thread, and I welcome it being local. Questions like "Do people like Express or Restify more?" get shut-down pretty quick on SO, and hearing that conversation amongst the local community makes it easier to seek help when necessary
  • Please suggest other ideas of conversations I'm overlooking. I find "It'd be great if we conversed about..." more creatively inducing than "I shall be displeased if I read people reposting HN threads..."

* Obligatory reference to https://trackif.com/pages/careers ;-)



On Wed, Aug 14, 2013 at 11:47 AM, Adam Terlson <[address removed]> wrote:
+1 for leaving this group for announcements.


On Wed, Aug 14, 2013 at 11:42 AM, Kevin Whinnery <[address removed]> wrote:
James/Jason, FWIW I personally would actually like to see more technical discussion on this list (I feel like the RubyMN group has really good content in this vein).

Quick straw poll - is James' assertion correct that people would prefer to discuss tech and specific issues like this one off list?  If so, we can resurrect the Google group (I don't check it anymore) or do something else besides use this mailing list.

Thanks,
-Kevin




On Tue, Aug 13, 2013 at 8:38 AM, James Greene <[address removed]> wrote:

For generic questions, we highly advise using StackOverflow instead of a local group mailing list. You will find more people available to help and won't bother the members of this list who are on it strictly for announcements (pretty much everyone).

If you feel the need to keep this off SO for some reason, please use our Google Group forum instead:
    https://groups.google.com/group/javascript-mn

Thanks, and good luck resolving your issue!

Sincerely,
   James Greene

On Aug 12,[masked]:51 PM, "Jason Hsu, Rubyist" <[address removed]> wrote:
I have two Rails apps up and running, Bargain Stock Funds and Doppler Value Investing.  Please note that I haven't done any Javascript programming beyond the "Hello World" stage.

Both apps have search engines that uses the Ransack gem (for the search form) and the Kaminari gem (provides paginated results).  The search pages are http://www.bargainstockfunds.com/funds and http://www.dopplervalueinvesting.com/stocks , respectively.  The URLs for the source code are https://github.com/jhsu802701/bsf and https://github.com/jhsu802701/dvi , respectively.

In the production environment (the one that sees the light of day), the "add field" and "remove" buttons on the Doppler Value Investing search page work, but the "add field" and "remove" buttons on the Bargain Stock Funds page do not work.  What's even stranger is the fact that the "add field" and "remove" buttons do work in the development environment.  Yes, the Bargain Stock Funds search page works in the development environment but not in the production environment.

I posted about this on the ruby.mn Google group, and Joshua Wehner suggested that I have a problem with JavaScript and/or CoffeeScript.  Thus, I've decided to post here as well, as this is the forum where the top JavaScript people congregate.

The JavaScript/CoffeeScript file on the Bargain Stock Funds site is app/assets/javascripts/funds.js.coffee script.  The analogous file on the Doppler Value Investing site is app/assets/javascripts/stocks.js.coffee .  Both have the following code:

# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file:
http://jashkenas.github.com/coffee-script/
jQuery ->
$('form').on 'click', '.remove_fields', (event) ->
$(this).closest('.field').remove()
event.preventDefault()

$('form').on 'click', '.add_fields', (event) ->
time = new Date().getTime()
regexp = new RegExp($(this).data('id'), 'g')
$(this).before($(this).data('fields').replace(regexp, time))
event.preventDefault()

Exactly how can I get an error message to appear?  Until I get an error message, I have no way of properly troubleshooting this.  I have downloaded and installed FireBug, and I'm in the process of trying to make sense of it.

--
Jason Hsu <[address removed]>



--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
http://www.meetup.com/JavaScriptMN/
This message was sent by Jason Hsu, Rubyist ([address removed]) from JavaScriptMN.
To learn more about Jason Hsu, Rubyist, visit his/her member profile: http://www.meetup.com/JavaScriptMN/members/844108/
Set my mailing list to email me

As they are sent
http://www.meetup.com/JavaScriptMN/list_prefs/?pref=1

In one daily email
http://www.meetup.com/JavaScriptMN/list_prefs/?pref=2

Don't send me mailing list messages
http://www.meetup.com/JavaScriptMN/list_prefs/?pref=0
Meetup, POB 4668 #37895 NY NY USA 10163 | [address removed]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by James Greene ([address removed]) from JavaScriptMN.
To learn more about James Greene, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, POB 4668 #37895 NY NY USA 10163 | [address removed]



--
Kevin Whinnery
@kevinwhinnery




--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Kevin Whinnery ([address removed]) from JavaScriptMN.
To learn more about Kevin Whinnery, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, POB 4668 #37895 NY NY USA 10163 | [address removed]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Adam Terlson ([address removed]) from JavaScriptMN.
To learn more about Adam Terlson, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, POB 4668 #37895 NY NY USA 10163 | [address removed]





--
Please Note: If you hit "REPLY", your message will be sent to everyone on this mailing list ([address removed])
This message was sent by Eric Caron ([address removed]) from JavaScriptMN.
To learn more about Eric Caron, visit his/her member profile
Set my mailing list to email me As they are sent | In one daily email | Don't send me mailing list messages

Meetup, POB 4668 #37895 NY NY USA 10163 | [address removed]

Our Sponsors

  • Twilio

    Super simple API for SMS, MMS, Voice/VoIP in native mobile or web apps

  • CoCo Co-Working

    Our gracious hosts!

People in this
Meetup are also in:

Sign up

Meetup members, Log in

By clicking "Sign up" or "Sign up using Facebook", you confirm that you accept our Terms of Service & Privacy Policy