« first day  last day (14 days later) » 

12:01 AM
still acting funky
yea better i think
but when two checks
refresh third check appears
without having checked the box
 
because the second time the ajax seems to be firing twice
btw, in your application.js file, does it have an include statement for your habit.js file?
or any other js file?
 
good call
i had your older code copy and pasted in there
but i think the issue remains
 
ok so that's why it's fireing twice, because it's listed twice
 
yea it does
issue persists tho even tho i took it out
 
can you paste your application.js file?
 
12:07 AM
do i need to restart rails
// This is a manifest file that'll be compiled into application.js, which will include all the files
// listed below.
//
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
//
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
// compiled file.
//
// Read Sprockets README (https://github.com/sstephenson/sprockets#sprockets-directives) for details
 
i don' tthink so
and habit.js is in the same directory as application.js?
 
they are both in
app/assets/javascripts
i put this in initializers
Rails.application.config.assets.precompile += %w( habit.js )
 
ok so i remember that you have a javascript include tag specifiaclly for habit.js in your html.erb file?
ok remove that line
 
yea first line: <%= javascript_include_tag "habit.js" %>
 
and remove that line
its redundant
 
12:09 AM
which line?
 
the include tag
 
just out of curiosity how is that redundant?
 
because the //= require_tree . line in your application.js file includes everything in the same directory, including habit.js
 
I see
and guess what?
WE GOT IT!!!!!
 
nice!
 
12:12 AM
WOOOOHOOOOOO
I'M PARTYING TONIGHT
 
let me edit my answer so its the updated code
hehe
 
I'm going to do a shot for you
two shots
this has been the biggest bitch
Thank you soo soo much
Is there anything i can do for u?
 
not really. just be sure to accept my answer now that I corrected my errors. and if you see any more errors in my answer feel free to edit it
 
Okay will do Ryan. Enjoy the hockey and thank you so much for your time and expertise
 
no problem. will do. the lightning already won but i'm hopeing the rays win too
 
12:18 AM
You're on a roll so I wouldn't doubt it :p
 
12:30 AM
bad news
its not consistently firing
damn
i celebrated too soon
 

« first day  last day (14 days later) »