This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Option 1 | |
pharmacies = [] | |
Pharmacy.all.each do |pharmacy| | |
if pharmacy.recurrent_days.present? | |
recurrent_days = pharmacy.recurrent_days.split(',').map { |day| day.to_i } | |
pharmacies << pharmacy if recurrent_days.include?(Time.now.wday) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* | |
* Gulpfile setup | |
* | |
* @since 1.0.0 | |
* @author Veliz Fabián Horacio | |
* @package rhuoee | |
*/ | |
'use strict'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
rails generate devise:views | |
gem install html2slim | |
for file in app/views/devise/**/*.erb; do erb2slim $file ${file%erb}slim && rm $file; done |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Get the Heroku db as detailed here: | |
heroku pgbackups:capture --expire --remote your_remote_repository | |
curl -o latest.dump `heroku pgbackups:url --remote your_remote_repository` | |
pg_restore --verbose --clean --no-acl --no-owner -h localhost -U user -d database latest.dump | |
rm latest.dump |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class CreateTweets < ActiveRecord::Migration | |
def change | |
create_table :tweets do |t| | |
t.attachment :image | |
t.text :body | |
t.belongs_to :user, index: true | |
t.timestamps | |
end |