def a
if Time.zone.now.monday?
if Time.zone.now == Time.zone.now.noon
puts "this is the right time"
else
puts "sorry, this is not the time"
end
else
puts "sorry, not today man"
git push heroku localbranch:master
You should put your function inside a variable so that you can access it like object.
var toggleVis = (function() {
return {
showSomething : function () {
console.log("showSomething");
},
hideSomething : function () {
ModelName.where("date > ?", "2015-11-22")
Disclaimer
I'm not working for Poslaju and I don't provide support for this.
Endpoint:
http://api.pos.com.my/v2TrackNTraceWebApi/api/Details/[TRACKING_NUMBER]?callback=result&sKey=7oHHMvxM0&_=1447773442872
Step 1: Download the JS file (example: abc.min.js
).
Step 2: Save it inside vendor/assets/javascripts/
folder.
Step 3: To use it inside specific view, put this tag <%= javascript_include_tag 'abc.min' %>
inside the view (*.html.erb
)
- And put this inside
config/initializers/assets.rb
file:Rails.application.config.assets.precompile += %w( abc.min.js )
Step 4: To use it globally inside the Rails app, put this inside application.js
file:
respond_to do |format|
format.js {
render :template => "path/to/file.js.erb",
:layout => false
}
end
Example:
git checkout master
git branch --merged master | grep -v master | xargs git branch -d
- Done
-
cd /usr/local/bin
-
ln -s "/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl" subl